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
cooldamselcooldamsel 

Average test coverage across all Apex Classes

Hi,

 

I have 5 controller classes and one visualforce page. The code coverage for my classes is 98% in 3classes and 100% in 2classes. The above code coverage is in my sandbox environment. But when i move my code to Development and validate am getting the following error.

'Average test coverage across all Apex Classes and Triggers is 71%, at least 75% test coverage is required'.

 


Please help me...

Best Answer chosen by cooldamsel
willardwillard
It looks like you are moving other things besides those 5 classes. You must ensure the ALL the code within your org has 75% coverage or greater.

All Answers

Dhaval PanchalDhaval Panchal
It will count total coverage for target environment. Try to calculate total coverage for your target environment. If it is below 75% then you have to complete code coverage for other classes (which are in target environment and other then your 5 classes).
willardwillard
It looks like you are moving other things besides those 5 classes. You must ensure the ALL the code within your org has 75% coverage or greater.
This was selected as the best answer
cooldamselcooldamsel
The code coverage for all the classes and triggers in my organisation is 75%. But still i get the issue.
Dhaval PanchalDhaval Panchal
but what is code coverage of target environment?