We have been using Clover driven by ant on a Jenkins build for quite some time now. The code base has grown and it's relatively large: roughly 500K NCLOC, 8500 files, 9000 classes, 8500 unit tests, 1700 acceptance/integration tests. The Jenkins build runs at night and it's quite resource intensive: for example, it requires 3 GB of memory to both compile and run all the tests.
We are wondering whether we can split this in multiple steps, so that the memory requirements are smaller, but all the data is still collected as it was run in one step and the historical reports work in the same way.
Can anybody shed some light and provide some guidance about this?
There are at least few possibilities:
1) You can split your project into several smaller modules. Instrument, compile and test them separately. Each of them will have it's own <clover-setup/> task and multiple clover.db files will be produced. After the build merge all databases using <clover-merge/> task in order to have a single Clover report.
2) You can define <fileset includes="..." excludes="..."> for <clover-setup/> and measure code coverage for most important code areas only. I recommend to exclude all generated code from instrumentation.
3) You can disable per-test code coverage (if you don't need such detail) recording. Thanks to this no clover.db*.s files will be produced (I guess that you have at least 10'000 of such files produced).
How to do this: in the <clover-setup> define that there are no test sources, e.g. <testsources dir=".." excludes="\*\*">
Main drawback: test results will not be collected by Clover so in the HTML report you have to add them manually (<clover-report>...<testresults>).
4) You can disable per-test coverage syntax highlighting in HTML report (it's disabled by default) - see <clover-report> ... <current showUniqueCoverage="false">. Clover will consume much less memory.
5) You can reduce instrumentation level from "statement" to "method" - see <clover-setup instrumentationLevel="method">. Main drawback is the much lower accuracy of course.
Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot