tags:

views:

34

answers:

1

Is it possible to run unit tests when a non-maven project is analyzed with Sonar, in Sonar light mode?

+1  A: 

Sonar doesn't run unit tests. But it should be able to analyze existing unit tests reports. From Reuse in Sonar unit test reports generated by other systems:

2. Using Sonar in its full capability in an ANT environment

If you are using ANT to build your applications, the main weakness so far in Sonar was that it did not allow to display Unit tests results nor Code coverage. I am sure that now you have read the first use case, you know that by using the “-Dsonar.dynamicAnalysis=reuseReports” parameter, this limitation does not exist anymore. You simply need to specify where those reports to reuse are going to be found, by using the following properties : sonar.cobertura.reportPath, sonar.clover.reportPath, sonar.surefire.reportsPath...

Pascal Thivent
Yes, I read about reuse unit tests reports, but the problem is that I don't have them. I have a multi module project, each module has an project.xml file (like in maven 1.x); and I have to analyze this project in Sonar. I managed to get the some metrics with sonar light mode, but for some modules I have to get code coverage...I have no idea know can I do this.
Mada