Search code examples
javaunit-testingemma

Seeing Code Coverage for a Single Class


I work on a relatively large project that has thousands of unit tests that takes a "significant" amount of time to run.

Sometime I would like to see the code coverage that a particular unit test gives. Currently I use Eclemma to get code coverage, but this only seems to be able to give me code coverage on the entire project.

Is there a way to get this reduced view?


Solution

  • Did you try using Clover? It can give coverage details pertaining to single unit test in the project. I use it and I love it.

    Install the clover plugin on eclipse.

    Enable the eclipse add in on the project via eclipse and run the unit tests to see the coverage details.