Configure Sonar to see Integration Tests (v6.2)

How to visualize Integration Tests in Sonar ?

Currently I only see :

  • the global coverage (UT + IT)
  • the number of UT
  • I read somewhere we had to configure a widget in the GUI : I didn't see any option which could do that.

    Documentation states :

    If coverage by unit tests is not computed with JaCoCo, overall coverage = integration test coverage.

    But in my case I see that the coverage is changing when I change my UTs (or ITs). Moreover I see jacoco reports in the targets :

  • jacoco.exec
  • jacoco-it.exec
  • I finaly tryed the official Sonar samples : it is the same ! I didn't find any sample with a clear separation between :

  • Unit test coverage
  • Integration test coverage
  • Overall test coverage
  • And sorry but Sonar documentation and samples have to be improved...

    Context : sonar6.2, java8, spring boot, modular project, maven, surefire & failsafe


    Starting in SonarQube 6.2, all test results are merged into simply "coverage". This was done on the theory that by and large, most people don't care how their code is covered, only that it is covered.

    With this change, some math inconsistencies w/r/t how Overall Coverage was calculated from unit tests versus integration tests were eliminated, and additionally the ability to feed many different coverage reports was added. (Some people have unit, integration, smoke, ... tests).

    Regarding

    I read somewhere we had to configure a widget in the GUI : I didn't see any option which could do that.

    In 6.2 dashboards were dropped, so there are no widgets to be configured. Coverage is shown automatically on the project home page.

    链接地址: http://www.djcxy.com/p/59910.html

    上一篇: 无源代码集成测试用例的jacoco代码覆盖率

    下一篇: 配置声呐以查看集成测试(v6.2)