title: Sonar does not pick up Unit Tests Results even thought Code Coverage is generated
body: <p>I am running SonarQuebe 6.2 on my local machine, I have Spring Boot Java 8 project with written unit tests that I want to upload to Sonar for static analysis all together with code coverage.<br>
  Code coverage is generated - I have my JaCoCo HTML report, JUnit XML test files are generated but my Sonar seems to miss Unit Tests result even thought that Code Coverage is diplayed:<br>
  pom.xml:  </p>
  
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.5.2.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;com.h2database&lt;/groupId&gt;
          &lt;artifactId&gt;h2&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.powermock&lt;/groupId&gt;
          &lt;artifactId&gt;powermock-module-junit4&lt;/artifactId&gt;
          &lt;version&gt;1.6.6&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.powermock&lt;/groupId&gt;
          &lt;artifactId&gt;powermock-api-mockito&lt;/artifactId&gt;
          &lt;version&gt;1.6.6&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.facebook4j&lt;/groupId&gt;
          &lt;artifactId&gt;facebook4j-core&lt;/artifactId&gt;
          &lt;version&gt;2.4.8&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;net.sf.dozer&lt;/groupId&gt;
          &lt;artifactId&gt;dozer&lt;/artifactId&gt;
          &lt;version&gt;5.5.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-java8&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
          &lt;artifactId&gt;commons-csv&lt;/artifactId&gt;
          &lt;version&gt;1.4&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;finalName&gt;${project.artifactId}&lt;/finalName&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.6.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.8&lt;/source&gt;
                  &lt;target&gt;1.8&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
              &lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;0.7.9&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-prepare-agent&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;prepare-agent&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-report&lt;/id&gt;
                      &lt;phase&gt;prepare-package&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;report&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
                  &lt;execution&gt;
                      &lt;id&gt;default-check&lt;/id&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;check&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;/execution&gt;
                   &lt;execution&gt;
                      &lt;id&gt;generate-code-coverage-report&lt;/id&gt;
                      &lt;phase&gt;test&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;report&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;  
  </code></pre>
  
  <p>My sonar-project.properties: </p>
  
  <pre><code>sonar.projectKey=org.eventizer:EventizerServer
  sonar.projectName=EventizerServer
  sonar.projectVersion=1.0
  
  sonar.log.level=DEBUG
  
  sonar.sources=src/main/
  
  sonar.language=java
  sonar.java.source=1.8
  
  sonar.sourceEncoding=UTF-8
  
  sonar.java.binaries=target/classes/org/eventizer/eventizerserver/
  sonar.java.test.binaries=target/test-classes/org/eventizer/eventizerserver/
  sonar.tests=src/test/
  
  sonar.java.coveragePlugin=jacoco
  sonar.jacoco.reportPaths=target/jacoco.exec
  sonar.junit.reportPaths=target/surefire-reports/  
  </code></pre>
  
  <p>I am running this mvn command:<br>
  mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent test -Dmaven.test.failure.ignore=true<br>
  As a result I am getting target directory with following output:<br>
  <a href="https://i.stack.imgur.com/WWW9l.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WWW9l.png" alt="Target output directory"></a></p>
  
  <p>Classes directory that is set for <code>sonar.java.binaries</code>:<br>
  <a href="https://i.stack.imgur.com/aMWSc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aMWSc.png" alt="enter image description here"></a>  </p>
  
  <p>Test classes directory that is set for <code>sonar.java.test.binaries</code>:<br>
  <a href="https://i.stack.imgur.com/ZGhNm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZGhNm.png" alt="enter image description here"></a>  </p>
  
  <p>Surefire JUnit test reports directory that is set for     <code>sonar.junit.reportPaths</code>:<br>
  <a href="https://i.stack.imgur.com/GChpf.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GChpf.png" alt="enter image description here"></a>  </p>
  
  <p>JaCoCo report output directory:<br>
  <a href="https://i.stack.imgur.com/09cjC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/09cjC.png" alt="enter image description here"></a>  </p>
  
  <p>JaCoCo HTML report in browers:<br>
  <a href="https://i.stack.imgur.com/OtSx9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/OtSx9.png" alt="enter image description here"></a>  </p>
  
  <p>After that I am running <code>sonar-scanner.bat</code>, below some important (I tihnk so) outputs:<br>
  <a href="https://i.stack.imgur.com/T6tWg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/T6tWg.png" alt="enter image description here"></a><br>
  <a href="https://i.stack.imgur.com/7qdJE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7qdJE.png" alt="enter image description here"></a>  </p>
  
  <p>My Sonar web instance project analysis:
  <a href="https://i.stack.imgur.com/AQmPY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AQmPY.png" alt="enter image description here"></a> </p>
  
  <p>And I really do not have idea why this is happening since it looks like everything got generated properly. Since yesterday I think I have tried everything on StackOverflow so please do not mark it as duplicate.<br>
  This is even weirder because when I access Coverage metrics for this project I can see that 100% Unit tests passed:<br>
  <a href="https://i.stack.imgur.com/a9qNm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/a9qNm.png" alt="enter image description here"></a></p>