You need to sign in to do that
Don't have an account?
Rajendra Mukka
Batch class with enough coverage in full sandbox failed during Production deployment.
Error Message:
Code Coverage Failure
Your code coverage is 12%. You need at least 75% coverage to complete this deployment.
Code Coverage Failure
Your code coverage is 12%. You need at least 75% coverage to complete this deployment.
Check all the fields used in the batch class are in production also and try to get 90% Code coverage in the sandbox and move the code into production.
Thanks
Vinuthh S
- Every trigger must have some test coverage.
- All classes and triggers must compile successfully.
*******************************If I have a deployment that fails like this I do the following
1. Run all tests in production.
You may have tests that are failing, commonly due to the addition of a new validation rule (among a million other reasons). If this is the case take steps to fix the test failures, such as turning off the offending validation rules, until you're able to get your code coverage up enough for you to deploy.
2. Run all tests in the source org
It's possible that you're deployment is causing test to fail. Running all tests in the source sandbox will let you know if that's the case. Once you fix the failures in the sandbox and confirm you've got enough code coverage build a new change set and redeploy.
3. Deploy Class with test class
If you're still getting good test coverage on both sides you'll need to dig a little harder. Try to deploy same class with test class.