title: JaCoCo Selenium test code coverage and import to Sonar using Ant
body: <p>I am running Sonar task through Ant, triggered by Jenkins in RHEL environment. I am successfully using Cobertura for Junit code coverage and Surefire for reporting. Sonar imports  the Surefire reports fine.</p>
  
  <p>However, now I am running Selenium tests using Ant in Jenkins. I would like to report code coverage and test results to Sonar. Apparently I need the JaCoCo plugin which analyses code coverage and reports tests. I presume like for unit tests, Jenkins does the job and Sonar only imports the reports into its own repository.</p>
  
  <p>I am puzzled on how to actually do this. The web page <a href="http://www.sonarsource.org/measure-coverage-by-integration-tests-with-sonar-updated/" rel="nofollow">http://www.sonarsource.org/measure-coverage-by-integration-tests-with-sonar-updated/</a> references to the JaCoCo page <a href="http://www.eclemma.org/jacoco/trunk/doc/ant.html" rel="nofollow">http://www.eclemma.org/jacoco/trunk/doc/ant.html</a>. I am not sure what the steps are to be done. Do I need the coverage target? Should I only start the agent? Where in Ant do I start the agent? Do I need to dump stuff?</p>
  
  <p>I really appreciate all the help I can get, thanks :)</p>