JaCoCo - SonarQube - No information about coverage per test

前端 未结 4 1486
清歌不尽
清歌不尽 2021-01-03 21:35

I\'m using JaCoCo for Code Coverage. The Unit Test reports are created with junit and they are imported correctly, so that the unit test information is shown properly. The <

4条回答
  •  臣服心动
    2021-01-03 22:32

    With this Maven configuration I am able to see coverage per test data.

    You need to configure sonar-jacoco-listeners to get coverage per test.

    Please be aware that it is deprecated by sonar: "this feature is deprecated at SonarQube level and will no longer receive further improvements/maintenance."

        false
                
                false
                false
    
                
                jacoco
                reuseReports
                ${project.reporting.outputDirectory}/jacoco-ut.exec
                java
    
    
    
                
                    org.apache.maven.plugins
                    maven-surefire-plugin
                    2.12.4
                    
                      
                        
                          listener
                          org.sonar.java.jacoco.JUnitListener
                        
                      
                    
                
    
                
                    org.jacoco
                    jacoco-maven-plugin
                    0.8.1
                    
                        ${sonar.jacoco.reportPaths}
                        true
                    
                    
                        
                            agent
                            
                              prepare-agent
                            
                          
                    
                
    
    
    
            
                org.jacoco
                org.jacoco.agent
                0.8.1
                runtime
            
            
              org.codehaus.sonar-plugins.java
              sonar-jacoco-listeners
              1.2
              test
            
    

提交回复
热议问题