Integration Test Coverage in SonarQube from JaCoCo Maven plug-in showing 0%

前端 未结 5 666
天命终不由人
天命终不由人 2021-02-05 14:58

We have a multi-module multi-language maven java project with coverage analysis with jacoco. The main part of the modules is backend (Java code) with a REST API and our webapp m

5条回答
  •  日久生厌
    2021-02-05 15:18

    Considering other answers I want do add one thing, which is important to show test coverage on Sonar:

    1. you have to build project before expecting coverage to be shown: mvn clean install
    2. you have to build without -DskipTests
    3. you have to keep right configurations for plugin which run tests (surefire, failsafe, ... plugin) - coverage will be shown considering only those tests which are included in plugin configurations by or similar configurations.

提交回复
热议问题