Open shankybnl opened 6 years ago
Writing the DB clover coverage files in the same location is not sufficient. The way this feature is intended to work is by having Gradle drive the integration tests. If you have an external process using Tomcat generate DB files they are not getting merged since that is not how the plugin expects the clover.db files.
If you want this to work you need to create a new integration test harness that runs the Tomcat server with the instrumented JAR file from within the Gradle build. This will allow the plugin to see the clover.db files in the expected location and merge them.
A poor alternative is to use a dummy integration test configuration that does not generate any output but only configures the location of the integration test clover.db files. Then run the Tomcat integration tests and execute the cloverAggregateReports
task to merge the databases and produce the report.
I have not attempted this myself but fro what I know it should be possible with a little effort to get it done.
Hi,
My integration and unit tests db files are written at the same location. On executing
gradle cloverAggregateReports
, code coverage by integration tests is not picked up in the report.I have provided same submodule location where unit tests db files are created. I can see new db files gets created when integration tests are executed from different repo and instrumented war is deployed on tomcat. Same gets printed in the logs as well
More details are present under this issue: https://github.com/bmuschko/gradle-clover-plugin/issues/97