There is no working plugin that does code coverage for tests in maven. Please provide this functionality :) (Using emma....)
Ignore the comment above I found code coverage support through this page: http://wiki.netbeans.org/MavenCodeCoverage
I created a new profile in my pom, adding:
Then I set my profile via 'Set Configuration' and then 'magically' the new option 'Code Coverage' option appears.
I don't know - is it just me, but this is mightily unuserfriendly. And by the way the coverage plugin does not work for me, for some reaseon, but this is another bug I will raise.
This one is just about user experience
I had to go through a lot of loopholes to get the coverage thingy:
1.) Netbeans did not show me *any* sign of that it was able to do code coverage.
2.) Thus I had to search on the internet, had to install a plugin that didn't work for maven (http://wiki.netbeans.org/TutorialCodeCoveragePlugin) then tried to install another plugin (http://wiki.netbeans.org/MavenCodeCoverage), but NB said it is already installed.
3.) I needed to change my current root pom, to add the above profile. But now I can not check in the pom file, since I am not allowed to.
Please DO improve the user experience here!
Maybe similar to the current formatting via checkstyle support?
.) Add a new Code Coverage section to 'Project Properties', that would suggest to use a current configuration (profile) or create a new section or help to enable somehow the codecoverage functionality
.) Maybe even add functionality to not be POM invasive to show code coverage, such that I can see coverage without changing my POM's
This applies to Windows as well