Release 10.2.2 and later include improvements related to collecting coverage.
Collecting Coverage for Unit Tests
In Jtest versions earlier than 10.2.2, you to collect coverage by static instrumentation of class files. Release 10.2.2 (build system plugins 1.2.4) introduced collecting coverage for tests by runtime bytecode instrumentation using Jtest JVM agent. This involved the following changes in the Jtest Plugins for Maven, Gradle, and Ant:
Maven
- The jtest:coverage goal was removed. The mvn test-compile jtest:instrument test command will yield the same results.
- The jtest:instrument and jtest:instrument-test goals were merged into single jtest:instrument goal performing both jobs, which requires to be preceded by the test-compile phase when executed from command line.
- The new
jtest:agent
goal was added.
See Testing and Analysis with Maven for details.
Gradle
- The jtest:coverage taskwas removed. The gradle jtest-instrument test command will yield the same results.
- The jtest-instrument and jtest-instrument-test tasks were merged into single jtest:instrument goal performing both jobs.
- The new
jtest-agent
goal was added.
See Testing and Analysis with Gradle for details.
Ant
- The new
jtest:agent
goal was added.
See Testing and Analysis with Ant for details.
Collecting Coverage for Applications
Maven
- The jtest:collectStaticCoverage goal was removed.
The jtest:configureAgent goal was removed.
The jtest:loadCoverage goal was removed. Application coverage data is now reported with the following command:jtestcli -staticcoverage [path to static_coverage.xml file]-runtimecoverage [dir/wint/runtime_coverage/files] -config "builtin://Calculate Application Coverage"
- The
jtest:monitor
goal was added; see Jtest Goals Reference for Maven for the list of the goal parameters.
See Application Coverage for details.