function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mark Ravitz 13Mark Ravitz 13 

Find classes with least unit test coverage.

Hi,  I'm working to clean up a messy org and my current challenge is to remove the Volunteers App. There are loads of dependencies to delete including a lot of apex code, before I can uninstall the app.  I'm stuck because the apex test coverage for the org is around 76%, and when I remove the offending apex it drops to 74% which stops the deployment.

How do I find other classes in the org which have minimal or no coverage, so I can cover or delete them.  I read there was a test-coverage console window in the dev console under the  Test tab but I don't see such a thing.

Any help would be greatly appreciated.  Thanks,
Mark

 
Best Answer chosen by Mark Ravitz 13
Amit Chaudhary 8Amit Chaudhary 8
Hi Mark Ravitz 13,

There are two way to see code coverage of all classes
1) Developer console:- You can see only you canot download the result
2) App Exchange product ( Code Coverage Report ) :- With this app you can download the result in exl.

User-added image
LINK of APP:- https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzlpEAD

How to configure APP
1) http://amitsalesforce.blogspot.in/2015/09/code-coverage-report-in-excel-format.html

Please let us know if this will help you.

Thanks
Amit Chaudhary

All Answers

pigginsbpigginsb
Are you clicking on "Tests" in the lower panel of the Developer Console? There is a section on the right side of this view called "Overall Code Coverage", and you can sort by % covered.
Developer Console with Tests tab selected in lower panel
Amit Chaudhary 8Amit Chaudhary 8
Hi Mark Ravitz 13,

There are two way to see code coverage of all classes
1) Developer console:- You can see only you canot download the result
2) App Exchange product ( Code Coverage Report ) :- With this app you can download the result in exl.

User-added image
LINK of APP:- https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzlpEAD

How to configure APP
1) http://amitsalesforce.blogspot.in/2015/09/code-coverage-report-in-excel-format.html

Please let us know if this will help you.

Thanks
Amit Chaudhary
This was selected as the best answer