| I reproduced your situation locally on a small example. The problem is that each time you call the CoberturaPublisher it will overwrite the previous data, as it always works on the same file (coverage.xml), so it wasn't really thought of having multiple calls in the same job. I see two solutions: 1) You have to publish them all together just once at the end. In that case if you specify multiple files they will be correctly merged (assuming it is fine for you that they get merged). So you will have just one final step like:
step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/**/Cobertura.xml'])
Which gets them and publishes them all in a single coverage step. 2) Change to the newer and more advanced coverage plugin code-coverage-api-plugin that supports multiple reports. Each line will then be something like (once the plugin is installed):
publishCoverage adapters: [coberturaAdapter(path: '**/build/Tests/NunitFast/Cobertura.xml')]
I would suggest the second one, as that new plugin has also other goodies (ie. pipeline integration) and is more actively developed, but of course up to you to decide. Of course one could also file a bug to the cobertura plugin but given the new plugin I'm not sure someone will take the task to generalize the publishing of more reports in the same job. |