We have got SCCT to produce some pretty web-pages showing the coverage of our unit tests. And now we want to integrate this into our Jenkins continuous integration build.
I have created a Jenkins job to run the SCCT tests but how to a) fail the build if the coverage is below n% and b) how to display these pretty web-pages?
The build is a maven-multi-module project.
Cheers
We are using the jenkins cobertura plugin. SCCT emits a cobertura-format coverage xml file for each module (I didn't spot at first) and the cobertura plugin collates these. One problem is that the cobertura plugin needed to be downgraded to 1.3 as otherwise it thinks that the mojo hasn't been run and doesn't do anything.
Since this is possible for other coverage tools like cobertura via a jenkins plugin, you could either
convert the output of SCCT to something looking like the results of an existing tool and use the matching jenkins plugin.
write your own jenkins plugin, possibly borrowing code from existing plugins for other coverage tools.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With