Create two coverage reports in one jenkins assembly

I have a jenkins build that builds my entire java / angularJS project. It runs testNG tests for the java part and karma tests for the javascript part. Therefore, I can generate one testNG report (for java) and one junit report (for karma test) in my jenkins build. It works very well.

So far, I have used cobertura to report on my Java tests. But now I would like to add also a coverage report for my karma tests (created by Istanbul with cobertype type). The problem is that in Jenkins, I am allowed to generate only one coverage report in the assembly (I cannot add more than the post coportura report report is posting). So how can I get these two coverage reports in the same jenkins assembly?

thanks a lot

+6
source share
2 answers

If I'm right, you cannot use the same plugin twice as a post-build action (note that I'm not sure). I ran into this problem when I was working as a Jenkins plugin developer for a company, and the solution was to use a plugin that does the same thing.

For example: for JUnit reports, there is the official JUnit plugin, as well as XUnit. For my problem it was easy.

So, maybe you can find a plug-in that does the same thing as Cobertura, or you can change the output format of java coverage or karma coverage. For example, for java you can use EclEmma or Jacoco ...

0
source

There is a good plugin called Plugin for HTML Publisher . You can create HTML reach reports and publish as many reports as you want for different names in the same Jenkins project. For example, I generate html reports using karma + istanbul and then publish them to Jenkins.

In JUnit xml report files. You should import JUnit after listing all the files, probably from different directories, but you can distinguish them from the correct package names inside the files.

0
source

Source: https://habr.com/ru/post/976340/


All Articles