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
RoyalRoyal 

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.

Thanks. 
 
PratikPratik (Salesforce Developers) 
Hi,

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:
http://salesforce.stackexchange.com/questions/24082/code-coverage-on-dev-console
http://stackoverflow.com/questions/12911480/is-there-a-good-way-to-get-a-code-coverage-report-for-apex-code

Thanks,
Pratik

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"
https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzlpEAD

Please let us know if this will help you

Thanks
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 : https://testgen.herokuapp.com/TestGen.jsp

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 

Thanks
Praveen.
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.
rnatrajrnatraj
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.
https://codecoveragereportgenerator.herokuapp.com/

User-added imageUser-added image
Sandy SapientSandy Sapient
https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FKAQ2UAP&tab=r
Todd GillTodd Gill
The Visual Studio Code extension: "ForceCode (https://marketplace.visualstudio.com/items?itemName=JohnAaronNelson.ForceCode" target="_blank)" provides a report of code coverage for all classes, whether or not they have test classes.

https://marketplace.visualstudio.com/items?itemName=JohnAaronNelson.ForceCode

Example of ForceCode code coverage report 2020


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