문제

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!

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top