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

how to get test class code coverage report ?

hi All,
 I am working on test class every day, but by end of the day, i need to prepare xls sheet, like which class pass or failed, if pass what is code coverage like that,  so is there ant tool or easy methodalogy to get all class list with their code coverage and lines of covered .
please let me know if know any one, it's greate help to me.

PratikPratik (Salesforce Developers) 

I don't think a report can be generated on test coverage through customization.

Herer are some techniques through Developer console and other tools available:


P.S. If this answers you question, please mark it as "Best Answer" so it will help other community members too.
Amit Chaudhary 8Amit Chaudhary 8
Please try to install below App Exchange product "Code Coverage Report"

Please let us know if this will help you

Amit Chaudhary
bhanu dev jainbhanu dev jain
Hi Royal,

I have created an online tool which can give you test class code coverage of your org in excel sheet.
It can also give a snapshot of the statistics for the the current code coverage and can send email to your mailing address.
Please check :

Its a beta version now, I am working on more enhancement.
I hope this will help.
praveen yarram 4praveen yarram 4
Hi Bhanu,

looks like, your tool not working properly!
not able to login with my sandbox credentials 

bhanu DEV jain 6bhanu DEV jain 6
Hi Praveen,

Thanks for checking the tool.
You would require to add security token with password (password+token) or need to add IP ranges to your profile to allow the tool to acces the org coverage.
Try it with token or add IP range, I tried the tool its working.
Let me know if you find any issue.
Go to Dev Console and click on Test -> Run all Test
You should see the Overall Code coverage and coverage for individual class in the Test tab at the bottom (right)
Vishnu VaishnavVishnu Vaishnav
Code Coverage Report Generator:
The application provides the view of all code coverage from the organization and can generate excel sheet of all code coverage.

User-added imageUser-added image
Sandy SapientSandy Sapient
Todd GillTodd Gill
The Visual Studio Code extension: "ForceCode (" target="_blank)" provides a report of code coverage for all classes, whether or not they have test classes.

Example of ForceCode code coverage report 2020

Todd GillTodd Gill
And of course, the Developer Console provides the same information