I get the following error when trying to get coverage information for a test application when the classes are in a jar file when using jmockit-coverage 1.19:
JMockit: No classes were instrumented for coverage; please make sure that classes selected for coverage through the regular expression "com.qhrtech.emr.qa.*" are available from the runtime classpath, and that they have been compiled with debug information.
The information is correctly generated when I use jmockit-coverage 1.16 or other earlier versions.
It is also correctly generated if I have the class files outside the jar.
The application simply prints a message and waits for the user to press enter.
Steps to reproduce:
Compile the project: "mvn install".
Run the application from the command line with the following command:
"C:\Program Files\Java\jdk1.8.0_60\bin\java.exe" -classpath ./target/TestApp-1.0-SNAPSHOT.jar -javaagent:./target/runtimejars/jmockit-coverage.jar -Dcoverage-outputDir=./CodeCoverageReports -Dcoverage-classes=com.qhrtech.emr.qa.* -Dcoverage-metrics=line -Dcoverage-output=html-nocp com.qhrtech.emr.qa.testapp.TestApp
While the application is waiting for the user, attempt to generate code coverage information: