You need to sign in to do that
Don't have an account?
bs881026
Code coverage for classes is 100%
Hi,
I the code coverage for the classes that I am about to deploy is 100% but the overall code coverage has dropped to 70%, what is the workaround for it.
Thanks.
I the code coverage for the classes that I am about to deploy is 100% but the overall code coverage has dropped to 70%, what is the workaround for it.
Thanks.
- Please note that if the apex code and the test class have 100% code coverage and you are still unable to deploy it in production due to low code coverage.
- It means that the overall code coverage of other existing components (trigger and classes) in production is below 75% and the deployment will not be successful.
- To avoid this:
- Ensure that all classes/ triggers have above 75% code coverage.
- All classes should be valid. (Recompiled)
If the production coverage is going down because of the test classes, which is coming in Dev consolePlease follow the Tooling API for that: Why is a Test class evaluated as part of the Organization’s Code Coverage?
- https://help.salesforce.com/articleView?id=Why-is-a-Test-class-evaluated-as-part-of-the-Organization-s-Code-Coverage&language=en_US&type=1
I hope it will be helpful.Please mark it as best answer if the information is informative.
BestRegards
RahulKumar