1
votes

I have Jenkins running JUnit tests and creating code coverage with Cobertura. This is imported to SonarQube, which shows all JUnit pass/fail and well as code coverage.

In addition to the full code coverage graphs report in SonarQube, I would like to include a timeline graph containing only a subset of the java classes from the coverage report. Haven't found a filter for this. I have found filters only for the full Sonar build, but this would require new Jenkins jobs and SonarQube projects...

1

1 Answers

0
votes

I'm not sure if this is what you are looking for but you could try the following. It is not the best way but at least a possibility. You can still not manually select the subset of projects you want to show up, but this is for a good reason (names can change, another projects has the same name, etc...)

Short form:

you can configure a filter/measure and make use of filter-based charts and your projects dashboard.

long form:

Go to "Measure" within the topline. Now add some criteria for example:

"Components": Projects; "Components of": MyTestApplication; Key contains: myTest.

Search for it and save the filter. Once you done you can go back to the projects dashboard where you want your extra statistics. Click "Configure widgets" on the upper right. Now search for the keyword "filter". I did not checked them all but belive all of those results are able to use your filter created before. Select e.g. "Filter Motion Chart" and configure it.