Cobertura coverage for integration tests in Maven
Asked Answered
O

2

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.

Oswin answered 10/11, 2011 at 17:10 Comment(2)
See my answer on [https://mcmap.net/q/1918543/-cobertura-and-jetty][1] . I don't post it again because it is long. [1]: https://mcmap.net/q/1918543/-cobertura-and-jettyHoran
However, I cannot accept your answer if it is in a comment. Please add the answer ‘have a look at cobertura-it’ below.Oswin
P
1

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

Platter answered 11/11, 2011 at 18:41 Comment(2)
This is actually what we do now. Cobertura has issues with Java 7 and does not work with JMockit. JaCoCo does.Oswin
Jacoco does not support aggreate reports, so if you have a multi-module project you're screwedOsteitis
T
0

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

Tipsy answered 11/11, 2011 at 12:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.