You need to sign in to do that
Don't have an account?
West415
Code Coverage Can't Deploy to Production
In production, code coverage is showing 83%. In sandbox, it is showing 75%. I have just 1 apex class and associated test class I am trying to deploy to production, but it fails saying only 30% coverage in production.
The apex class I am trying to deploy has 90% coverage, why can't I deploy this class and associated test class to production?
Raj Vakati
The reason might be
- check that all test classes are creating their own test data and do not rely on org's data.
- Check All the Test class in prod vs sandbox
- Make sure if you are refering any settings in test class , those avaibale in prod
- Is your test class dependent on data or custom settings that only exist in your sandbox?
- Do you have extra classes or code in production? This can even be in the form of installed packages, etc.
- Test coverage is calculated based on the total number of tested Apex statements (or lines) divided by the total number of Apex statements in your organization.