Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check dynamic class usage in very big java project

I have a pretty big Java project with very low code coverage, and want to increase the number of test cases. Is there any way to measure which classes are used the most in runtime? This way we can measure which classes we need to cover first. The project is a web app running over tomcat & websphere if it is important.

like image 698
Alex Luberg Avatar asked Oct 27 '25 03:10

Alex Luberg


1 Answers

Yes.

There are tools that replace the standard Classloader so that they instrument classes for coverage as those classes are loaded.

I think that Clover and Emma were the best ones that I've used. Emma is free, but doesn't appear to be very active since 2005.

like image 86
Burleigh Bear Avatar answered Oct 28 '25 18:10

Burleigh Bear



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!