Java Testing & Code Coverage
Basic Java testing is really not that interesting, you use Junit (did I really need to include a link?), and hopefully version 4 with annotations. Once you have started writing unit tests, you may notice that there are more things you want to test, and you should probably find out how good your tests are.
Code Coverage
Code coverage reports are a great way to tell if your have written enough unit tests for your code. Generally, your tests should cover at least 90% of your code, and once you have code coverage tools, you will probably feel compelled to reach high %s of coverage. I looked around at a bunch of tools and tried out what I could. There were three tools that stood out (for good reasons, coverlipse killed my eclipse install, and I don’t really recommed trying it).
Cobertura

Cobertura
Cobertura was very easy to get running with Maven, but was a little more challenging with Ant. Generally a really good tool but not that easy to integrate into eclipse, the UIs are the most visually appealing.
CodeCover

- CodeCover Screenshot

CodeCover was really well integrated with Eclipse and works pretty well out of the box. Definite a plus. I didn’t really like the mechanism for adding classes, but if I used a normal Maven project setup, that would probably be fine. This is a good tool for local development, but the team tools are not that extensive.
Clover
Just for completeness, I should give the atlassian product mention. While a good product, Atlassian (the makers of Jira) at starting to be a little too expensive.
Overall, I like these tools a lot and hopefully this will help you get started with them.
