Closed x12a1f closed 8 years ago
Hello
I think the issue is with your JacocoReport task setup. By providing
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
classDirectories = sourceSets.main.output
You're limiting your report to your web project's classes. Try specifying
additionalSourceDirs=project(':serverLib').sourceSets.main.allSource.srcDirs
Ah, thanks!
Adding both
additionalSourceDirs = files(project(':libs-server').sourceSets.main.allJava.srcDirs)
additionalClassDirs = project(':libs-server').sourceSets.main.output
seems to do the trick.
Many thanks for the hint!
Hi,
Thanks for continue supporting this.
I have a question about integration tests and coverage and I was hoping you can provide some clues on how to do this.
I have a server project setup using gretty and jacoco which work fine. This server is using a library (in the same gradle project) which I would like to have tested through the integration test but I'm having difficulties to configure this.
How can I include coverage for a library in the server side code coverage report?
I used the settings as provided in the gretty documentation to setup the integration tests:
I hope you can provide some hints on how to do this. Thanks!