Question

Reasking my older question:

Java test coverage: who covers what?

Background: I look at sonar's coverage report for a class and want to know, which test contributes to the coverage of a specific line / branch, so that it easy to got to that test and add the test for the newly introduced if-branch.

Are there other (preferably free) alternatives to clover in the IDE? Perhaps even such that they can be included into sonar ?

Or maybe tricks to enhance, accumulate information with some scripting in emma-reports ?

Or even further, patch emma or cobertura to log the required info (instead of logging a "1" for counting, one could well log the names of class under test and the test, I assume)

Thanks!

Was it helpful?

Solution

You should definitely give a try to JaCoCo. Its integration with Sonar allows to benefit from new features, for example :

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top