title: SonarQube does not display detailed report per file for fully covered classes via Gradle
body: <p>I am running a Gradle build inside the IntelliJ Java IDE. The <a href="http://www.gradle.org/docs/current/userguide/sonar_runner_plugin.html" rel="nofollow noreferrer">SonarQube runner</a> Gradle plugin is used along with the <a href="http://www.gradle.org/docs/current/userguide/jacoco_plugin.html" rel="nofollow noreferrer">JaCoCo</a> Gradle plugin.</p>
  
  <p><strong>Problem:</strong> I am getting the message <code>No information about coverage per test.</code>, (<em>not</em> a duplicate of <a href="https://stackoverflow.com/questions/16615558/no-information-about-coverage-per-test-from-sonar-with-jacoco-ant-build">this post</a>, see below) and the coverage appears in SonarQube, but only as an overall percentage, not a detailed report per file:</p>
  
  <p><img src="https://i.stack.imgur.com/2sAeK.gif" alt="SonarQube Test Coverage View"></p>
  
  <p>Am I doing something wrong? Is it a bug in SonarQube maybe (as it was <a href="https://jira.codehaus.org/browse/SONARPLUGINS-3711" rel="nofollow noreferrer">with Cobertura</a> recently)?</p>
  
  <p>Here is my build.gradle:</p>
  
  <pre><code>repositories {
      mavenCentral()
  }
  
  apply plugin: 'java'
  apply plugin: 'jacoco'
  apply plugin: 'sonar-runner'
  
  sourceCompatibility = 1.7
  project.version = '1.0'
  project.group = 'com.acme.sandbox'
  project.description = 'just a test project'
  
  dependencies {
      testCompile group: 'junit', name: 'junit', version: '4.11'
  }
  
  // JaCoCo test coverage configuration
  tasks.withType(Test) { task -&gt;
      jacoco {
          append = false
      }
  }
  
  // Sonar configuration
  sonarRunner {
    sonarProperties {
      property 'sonar.host.url', 'http://host:port'
      property 'sonar.jdbc.url', 'myJdbcURL'
      property 'sonar.jdbc.username', 'dbuser'
      property 'sonar.jdbc.password', 'dbpass'
      property 'sonar.login', 'builduser'
      property 'sonar.password', 'buildpass'
  
      property 'sonar.profile', 'profilename'
      property 'sonar.branch', 'DEV'
      property 'sonar.language', 'java'
      property 'sonar.sourceEncoding', 'UTF-8'
      property 'sonar.verbose', 'true'
      //property 'sonar.tests', "$projectDir\\src\\test\\java"
      //property 'sonar.binaries', "${buildDir}\\classes\\main,${buildDir}\\classes\\test"
  
      //property 'sonar.java.coveragePlugin', 'jacoco'
      property 'sonar.jacoco.reportPath', "${buildDir}\\jacoco\\test.exec"
      property 'sonar.junit.reportsPath', "${buildDir}\\test-results"
    }
  }
  </code></pre>
  
  <p>Now if you execute a <code>clean</code>, followed by <code>sonarRunner</code>, a JaCoCo <em>test.exec</em> file gets created and processed:</p>
  
  <pre class="lang-none prettyprint-override"><code>&lt;snip&gt;
  18:35:27.705 DEBUG - Initializers : 
  18:35:27.706 INFO  - Base dir: D:\path\to\JaCoCoTest
  18:35:27.706 INFO  - Working dir: D:\path\to\JaCoCoTest\build\sonar
  18:35:27.707 INFO  - Source dirs: D:\path\to\JaCoCoTest\src\main\java
  18:35:27.708 INFO  - Test dirs: D:\path\to\JaCoCoTest\src\test\java
  18:35:27.708 INFO  - Binary dirs: D:\path\to\JaCoCoTest\build\classes\main
  &lt;snip&gt;
  18:35:27.931 INFO  - JaCoCo IT report not found.
  18:35:27.933 INFO  - JaCoCo reports not found.
  18:35:27.938 DEBUG - Sensors : JavaSquidSensor -&gt; QProfileSensor -&gt; FindbugsSensor -&gt; CpdSensor -&gt; PmdSensor -&gt; SurefireSensor -&gt; CheckstyleSensor -&gt; InitialOpenIssuesSensor -&gt; ProfileEventsSensor -&gt; ProjectLinksSensor -&gt; VersionEventsSensor -&gt; FileHashSensor -&gt; JaCoCoSensor
  &lt;snip&gt;
  18:35:34.055 INFO  - Sensor SurefireSensor...
  18:35:34.056 INFO  - parsing D:\path\to\JaCoCoTest\build\test-results
  18:35:34.116 INFO  - Sensor SurefireSensor done: 61 ms
  &lt;snip&gt;
  18:35:34.936 INFO  - Sensor JaCoCoSensor...
  18:35:34.939 INFO  - Analysing D:\path\to\JaCoCoTest\build\jacoco\test.exec
  18:35:35.027 INFO  - No information about coverage per test.
  18:35:35.028 INFO  - Sensor JaCoCoSensor done: 92 ms
  </code></pre>
  
  <p><a href="https://stackoverflow.com/questions/16615558/no-information-about-coverage-per-test-from-sonar-with-jacoco-ant-build">This post</a> suggests to set <code>sonar.tests</code>, which I've tried to no effect. The log file shows that test sources and binaries are detected to be at the correct locations.</p>
  
  <p>FWIW, I used the same settings with a Maven build and it worked. Can't use Maven here though.</p>
  
  <p>Version numbers:</p>
  
  <ul>
  <li>SonarQube 4.3</li>
  <li>SonarQube Java Ecosystem 2.2.1</li>
  <li>Gradle 1.12 (also: 1.11)</li>
  <li>IntelliJ IDEA Ultimate 13.1.3</li>
  <li>Java 1.7</li>
  </ul>
  
  <p>Here is the <a href="http://53327882.de.strato-hosting.eu/posted/so/JaCoCoTest.zip" rel="nofollow noreferrer">full test project</a> for download, and also the <a href="http://53327882.de.strato-hosting.eu/posted/so/JaCoCoTest-SonarRunner.log" rel="nofollow noreferrer">full log</a>.</p>