+ Start a Discussion
venkatesh nookala 5venkatesh nookala 5 

code coverage check

Dear friends 

     I have question regarding code coverage. Anyone let me know what are steps to be followed to check the code coverage 
JayChenJayChen
Go to your developer console and execute your test classe.

Click on your name,
Click on Developer Console,
Click Test,
New Run,
Find the name of your test class,
Click Run,
Click File,
Open,
Find the name of your Apex Trigger or Class,
Double Click on it,
On the top left, Click "Code Coverage: None",
Once you click on the button, it'll give you the percent of your code coverage, and it highlights the codes (in blue) that are covered and those that are not (in red).

Good luck!
Ketankumar PatelKetankumar Patel
if you go to Setup --> Develop --> Apex Classes. You will find a link "Estimate your organization's code coverage" click on that and you would know your organization code coverage.

User-added image
Ketankumar PatelKetankumar Patel
To know the code coverage for individual Apex Class, you should go to it's test class then click Run Test button on top. 

User-added image

This will takes you to Apex Test Execution window and here you should click Developer Console button

User-added image 

In developer console you will know your apex class code coverage % on rightside panel and when you click on your apex class line on rightside you will see covered (blue) and uncoverd (Red) lines.

 User-added image

User-added image
 
Amit Chaudhary 8Amit Chaudhary 8
If you want to see and download the code coverage for all classes and trigger. Then please try to use below App Exchange Product.
https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000DXzlpEAD

Please let us know if that will help you

Thanks
AMit Chaudhary