SonarQube not correctly displays unit test success
<p>First of all: this is not about SonarQube <em>not</em> displaying unit test success. There are plenty of questions &amp; answers for this topic but they weren't helpful.</p>

<p>My setup: using <code>SonarQube 5.2</code> triggered by <code>Maven 3.x</code> on <code>Jenkins 1.644</code> with default surefire tests. And that's the result in SonarQube:</p>

<p><a href="https://i.stack.imgur.com/cb1L4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cb1L4.png" alt="SonarQube output"></a></p>

<p>As you can see it displays unit test success for all projects correctly. Selecting a project brings us to package test success. And at this point it's getting strange. For example GUI package: it says 8,3 % project test success but 0,0 % package test success. How is that possible?</p>

<p>I've looked for cause in directory <code>&lt;project dir&gt;/target/surefire-reports</code> on which SonarQube analysis is based on. There you can see three generated .xml-files/classes:</p>

<p><a href="https://i.stack.imgur.com/lJlE0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lJlE0.png" alt="Surefire report files"></a></p>

<p>Some extract from the files shows us:</p>

<pre><code>Test set: xxx.gui.main.AppConfigurationTest
Tests run: 4, Failures: 0, Errors: 4, Skipped: 0

Test set: xxx.gui.main.ConfigurationHolderTest
Tests run: 7, Failures: 0, Errors: 7, Skipped: 0

Test set: xxx.gui.servlet.XxxHttpServletTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
</code></pre>

<p>Doing some calculating gives you 4 + 7 + 1 = 12 total tests and 1 / 12 (success/total) = 8,3 %! So that's where project test success is born.</p>

<p>The question is: why isn't class xxx.gui.servlet.XxxHttpServletTest displayed in SonarQube (with test success 100 % of course)? Have you got any idea?</p>