You need to sign in to do that
Don't have an account?
Nicole Sackin
Code Coverage Failure: Problem with Apex trigger when I try to validate it in my production environment.
I have created an Apex trigger in my sandbox environment but I am receiving an error message when I try to validate it in my production environment. It is saying
Code Coverage Failure.
Your organization's code coverage is 73%. You need at least 75% coverage to complete this deployment. Also, the following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.
Code Coverage Failure.
Your organization's code coverage is 73%. You need at least 75% coverage to complete this deployment. Also, the following triggers have 0% code coverage. Each trigger must have at least 1% code coverage.
Find the class with the worst coverage.
Find it's test class and rewrite / adjust as required to increase your test coverage for that class.
Include the updated test class in your deployment.
regards
Andrew
All Answers
Every trigger must have some test coverage. Try to compile and run related test classes.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_code_coverage_best_pract.htm
Thanks,
Vinay Kumar
Find the class with the worst coverage.
Find it's test class and rewrite / adjust as required to increase your test coverage for that class.
Include the updated test class in your deployment.
regards
Andrew