title: How to get Sonar to export test stats?
body: <p>I have the following Sonar Ant target defined:</p>
  
  <pre><code>&lt;target name='sonar'&gt;
      &lt;property name='sonar.sources' value='${src.dir}'/&gt;
      &lt;property name='sonar.tests' value='${test.src.dir}'/&gt;
      &lt;property name='sonar.binaries' value='build/classes'/&gt;
      &lt;path id='jars'&gt;
          &lt;fileset dir='${env.JAVA_HOME}/jre/lib' includes='*.jar'/&gt;
          &lt;fileset dir='build/lib/test' includes='*.jar'/&gt;
      &lt;/path&gt;
      &lt;pathconvert property='sonar.libraries' refid='jars' pathsep=','/&gt;
  
      &lt;exec executable='p4' outputproperty='p4.P4CLIENT'&gt;
          &lt;arg value='set'/&gt;
          &lt;arg value='P4CLIENT'/&gt;
      &lt;/exec&gt;
      &lt;propertyregex
              property='p4client'
              input='${p4.P4CLIENT}'
              regexp='P4CLIENT=([^ ]+) *.*'
              replace='\1'/&gt;
      &lt;propertyregex
              property='sonar.timestamp'
              input='${build.time}'
              regexp='_'
              replace='T'/&gt;
      &lt;sonar:sonar key='com.netflix:${module.name}' version='${p4client}@${sonar.timestamp}' xmlns:sonar='antlib:org.sonar.ant'/&gt;
  
      &lt;property name='sonar.dynamicAnalysis' value='reuseReports'/&gt;
      &lt;property name='sonar.emma.reportPath' value='${coverage.dir}'/&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>When I run 'ant sonar' and bring up Sonar in my browser, I see info about the classes in the src directory, but nothing about the stuff in the test directory.</p>
  
  <p>If I add ${test.src.dir} to sonar.sources and not set sonar.tests, I see some info about the test classes, but Sonar still reports 0 Test Successes.</p>
  
  <p>How do I get it so I can drill down to each test method and their stats?</p>