Reputation: 96491
How can i determine what percentage of my methods (and code) are covered by jUnit tests? I am assuming there is a more sophisticated way then simply counting ... and 1 and 2 and ..
I specifically wonder how will such counting be handled when single method is covered by 'n' tests.
Upvotes: 39
Views: 59036
Reputation: 5072
I would suggest to go for Cobertura for code coverage. It gives detailed information and can give you line by line coverage as well as branch coverage.
Upvotes: 3
Reputation: 882481
This presentation points to several tools you can use for the purpose.
Cenqua Clover $250-$2500 payware http://www.cenqua.com/clover/
Cobertura (GPL): http://cobertura.sourceforge.net/
Coverlipse Eclipse plug-in: http://coverlipse.sourceforge.net/index.php
Jester: http://jester.sourceforge.net/
Upvotes: 3