Configure Sonar to see Integration Tests (v6.2)

自作多情 提交于 2019-12-04 02:33:29

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.

Merging unit testing coverage and integration testing coverage numbers is not a good idea.

Modern unit tests that mock out all dependencies and environmental factors and have been proven to run on a developers local machine cannot by definition fail in a continuous integration environment. This makes them next to useless to run in a CI environment. Therefore, 100% unit test coverage but 0% integration test coverage means no meaningful testing is actually happening in the CI build.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!