How code coverage is calculated in Salesforce?

How code coverage is calculated in Salesforce?

Code coverage is calculated by dividing the number of unique Apex code lines executed during your test method execution by the total number of Apex code lines in all of your triggers and classes. (Note: these numbers do not include lines of code within your testMethods).

The test methods must provide at least 75% code coverage to move from sandbox to production.

Use the below link to find the overall code coverage

https://infallibletechie.com/2014/04/how-to-see-overall-code-coverage-in.html

Cheers!!!

Leave a Reply