Hey, I am not able to get coverage for all the modules using the above mentioned links. We have a root project called A, which has multiple sub-projects - n1, n2, n3,... The code coverage report is successful for subprojects. We want to have the code coverage report added at the root level with this jacoco offline instrumentation approach. Gradle version - 6.6 Java version - 1.8
On Monday, February 10, 2020 at 9:14:18 PM UTC+2 Sergiy Gnatyuk wrote: > To collect cross-module code coverage using jacoco offline instrumentation > we need to add jars with instrumented classes to dependent module's > classpath. > For more details please follow by the link: > https://stackoverflow.com/questions/60009231/cross-module-code-coverage-with-jacoco-offline-instrumentation-in-gradle-mutlimo/60156859#60156859 > Also, there is a working example: > https://github.com/SurpSG/jacoco-offline-instrumentation > > > On Tuesday, February 4, 2020 at 9:40:43 PM UTC+2, Sergiy Gnatyuk wrote: >> >> I've tried to setup Jacoco(offline instrumentation) in my gradle >> multi-module project. I have to use offline instrumentation because there >> are multiple PowerMock tests in the project. >> >> I have two modules: A and B. Module A has tests that partially cover a >> code from module B but such code coverage data is missed in my summary >> report. >> >> >> My configuration based on stackoverflow answer Jacoco offline >> instrumentation Gradle script >> <https://stackoverflow.com/questions/41370815/jacoco-offline-instrumentation-gradle-script/42238982#42238982> >> >> I've created a test project that demonstrates the issue: >> https://github.com/SurpSG/jacoco-offline-instrumentation >> >> >> On the other hand, when I'm using jacoco gradle plugin I can observe that >> coverage data provided by module A for module B successfully collected >> to a summary report. >> >> I've created one more test project to demonstrate this: >> https://github.com/SurpSG/jacoco-gradle-plugin-merge-coverage >> >> >> Is it a way to collect cross-module code coverage by fixing my build >> script configuration? >> > -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/914ec493-7e39-43f5-ab2d-89c07d6e757dn%40googlegroups.com.
