Configure Sonar to see integration tests (v6.2)

How to visualize integration tests in sonar?

Currently, I only see:

  • global reach (UT + IT)
  • amount of UT

enter image description here

I read somewhere that we needed to configure the widget in the GUI: I did not see any option that could do this.

Documentation Status:

If unit test coverage is not calculated using JaCoCo, overall coverage = integration test coverage.

But in my case, I see that coverage changes when I change my UT (or IT). Moreover, I see jacoco reports in reports:

  • jacoco.exec
  • jacoco-it.exec

I finally tried the official sonar samples: it's the same! I did not find a single sample with a clear separation between:

  • Unit test coverage
  • Integration Testing
  • Overall testing coverage

And sorry, Sonar documents and samples need to be improved ...

Context: sonar6.2, java8, spring loading, modular project, maven, confidence and fault tolerance

+6
source share
1 answer

Starting with SonarQube 6.2, all test results are combined into a simple “cover”. This was done according to the theory that in most cases, most people do not care about how their code is covered, only that it is covered.

With this change, some w / r / t math inconsistencies were eliminated, as the total coverage was calculated from unit tests compared to integration tests, and the ability to submit many different coverage reports was added. (Some people have a unit of measure, integration, smoke, ...).

Relatively

I read somewhere that we needed to configure the widget in the GUI: I did not see any option that could do this.

Toolbars were removed in 6.2, so there is no widget to configure. Coverage is displayed automatically on the main page of the project.

+5
source

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


All Articles