Testng, Emma, Cobertura, coverage and JDK 7 result in ClassFormatError and VerifyError

I had same problem using maven cobertura plugin. All tests failed when run from cobertura:report. But all tests succeeded when run directly from surefire plugin. As some of you already said the problem is that coberture byte code instrumentation of is not compatible with JDK7. You can see here http://vikashazrati.wordpress.com/2011/10/09/quicktip-verifyerror-with-jdk-7/ that the exception is related … Read more

Filter JaCoCo coverage reports with Gradle

Thanks to, Yannick Welsch: After searching Google, reading the Gradle docs and going through older StackOverflow posts, I found this answer on the Official gradle forums! jacocoTestReport { afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { fileTree(dir: it, exclude: ‘com/blah/**’) })) } } Source: https://issues.gradle.org/browse/GRADLE-2955 For older gradle versions < 5.x may need to use classDirectories = files(classDirectories.files.collect { … Read more