0

Possible Duplicate:
SONAR - Measure Code Coverage using Cobertura

I have configured our ant build to use the sonar plug-in and it runs the static analysis tools and loads the results correctly into Sonar. Our test group is running system level tests and collecting code coverage with Cobertura, which works fine and we can generate xml or html cobertura reports to look at the results.

We would now like to load the resultant coverage.xml file into Sonar. When I set up an Ant target to use the existing xml report, sonar wants to also run findbugs.

Since the system level testing is done independently from the build, how can I load just the Cobertura results into Sonar? I'm okay with the 'coverage' results being stored in a separate Sonar project (separate from the static analysis results)

Thanks

Community
  • 1
  • 1
user1660532
  • 21
  • 1
  • 5
  • 1
    BTW Findbugs and Cobertura are very different tools. The former performs source code analysis, the latter measures the execution stats during a unit test execution run. – Mark O'Connor Sep 10 '12 at 18:04
  • right - for a normal build and test run with Sonar I know I can get both the static analysis and test coverage data put into sonar. However in my case, the tests are being run independently so I wanted to see if there was a way of running the sonar plug-in and just importing the coverage results without the static analysis. – user1660532 Sep 11 '12 at 18:42
  • static analysis performed by default. See the duplicate answer for details on how to configure Sonar to pick up cobertura results. – Mark O'Connor Sep 12 '12 at 19:21

0 Answers0