6

I can invoke mvn cobertura:cobertura to instrument, run unit tests (using surefire), and generate reports.

I can invoke mvn verify to run unit tests and integration tests (using the failsafe Maven plugin).

But how do I call Maven to instrument, run unit tests and integration tests, and generate reports? The answer to Running integration tests with Cobertura Maven plugin did not work for me, and also I would not want to call verify with every Cobertura run, but only for nightly coverage.

Community
  • 1
  • 1
Michael Piefel
  • 18,660
  • 9
  • 81
  • 112
  • 1
    See my answer on [http://stackoverflow.com/questions/8034913/cobertura-and-jetty][1] . I don't post it again because it is long. [1]: http://stackoverflow.com/questions/8034913/cobertura-and-jetty – Bang Nov 13 '11 at 10:31
  • However, I cannot accept your answer if it is in a comment. Please add the answer ‘have a look at cobertura-it’ below. – Michael Piefel Nov 16 '11 at 07:58

2 Answers2

1

You can try Jacoco and got on fly instrumentation with more flexible configuration for gathering of coverage and reporting

Andriy Plokhotnyuk
  • 7,883
  • 2
  • 44
  • 68
0

Not sure if I fully understand the question, but I always do a mvn site ...

Aquin
  • 36
  • 3