1

How can I configure netbeans 6.7 to enable code coverage for maven2 projects?

I tried tinkering with the following http://sharebear.co.uk/blog/2009/01/21/code-coverage-maven-projects-netbeans/ though had no luck

Thanks

joshjdevl
  • 7,092
  • 12
  • 45
  • 57

1 Answers1

1

I followed the guide at http://sharebear.co.uk/blog/2009/01/21/code-coverage-maven-projects-netbeans/ and it did work for me, using Netbeans 6.8.

One mistake I made was to create a first dummy unit test case with only an assert(true), and not accessing any of the instrumented code. This produced no coverage.ec file, which got me stumped for a while.

  • I just got it to work on Netbean 6.9.1. The mistake I made was I had already activated the code coverage plugin before going through the guide on sharebear. I deactivated it, restarted IDE, reactivated and poof, lots of green lines. – Hafthor Jan 19 '11 at 00:41
  • Also, my build would fail tests, but Test would work. Removing Cobertura fixed that. – Hafthor Jan 19 '11 at 16:32