<properties> <argLine>-Xmx128m</argLine> </properties> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <runOrder>random</runOrder> </configuration> </plugin>
Force coverage to 0%
By default, when no coverage report is found, the JaCoCo plugin will not set any value for coverage metric. This behaviour can be overriden to force coverage to 0% in case of a lack of report by setting the following property :
Coverage per test
Using some unit test listeners you can collect the information on which lines where covered by which tests and display them in SonarQube. See the pom.xml of the sample project to configure this and see the Component Viewer documentation to display this information in SonarQube.