Venkat
Venkat

Reputation: 273

coverage.xml not generated even though build successful in jenkins and cobertura instrumentation was successful

I am using Maven with jenkins and sonar to build src and generate reports on Sonar. I see build was successful in Jenkins (sonar added as post build action) but fails to create coverage.xml in local system. Due to which code coverage is unavailable in Sonar, it just shows up -(empty). I am building a project which has around 4000+ java source files and corresponding JUnit classes.

I am using cobertura-maven-plugin 2.5.1 in pom.xml and I could see this plugin instrumentation was successful while building the code.

In logs I could see that, Cobertura report not found at //coverage.xml message.

Could you please help me on this regard.

Upvotes: 0

Views: 1272

Answers (1)

Venkat
Venkat

Reputation: 273

coverage.xml was not generated due to OutOfMemeryError:heapspace. Since my project is such a big project when I set heap memory to 2GB and cobertura plugin memory to 1.5GB sonar gets code coverage displayed. Heap memory set with Jenkins post build action sonar configuration. Cobertura memory can be configured either in Sonar settings or in your pom.xml.

Upvotes: 1

Related Questions