Reputation: 1260
I have the following command :
java -javaagent:jmockit.jar -cp ./out:junit.jar:hamcrest-core-1.3.jar org.junit.runner.JUnitCore TestCompareNumbers
where TestCompareNumbers is my test class for which i want a coverage report.
The result is :
JUnit version 4.12-beta-3
.....
Time: 0.011
OK (5 tests)
But a coverage report file hasnt been generated. I guess that Ive missed an option, I searched on google but i have no answer for that. Thanks!
Upvotes: 0
Views: 239
Reputation: 1171
If your are looking for coverage using jmockit for a non-jmockit based code you should use javaagent= jmockit-coverage.jar
From the jmockit documentation
When not using the JMockit mocking APIs, code coverage can still be activated without adding any jar to the classpath. Instead, run with "-javaagent:/jmockit-coverage.jar" as a JVM initialization parameter.
Upvotes: 1