You need to sign in to do that
Don't have an account?

Trigger deployment error
Hello,
I'm having problem deploying my new trigger from sandbox to production. When I attempt to deploy the trigger, I get an error message that says "Average all Apex class and trigger test coverage is 69%, at least 75% test coverage is required". How can I bypass this error for deploying the new trigger. Please advise.
Thanks
Paul
To bypass the error write the test for both negative and positive scenarios, for more than one use, for single record and bulk records..
String s;
s='';//repeat this line for more than 1000 times (you can increase if you need more coverage)
Then create test class for this class and add this both class to your trigger change set. This is a temporary solution.
Hello,
What do I have to write for the test class of the example class you mentioned in previous message? Please advise
Thanks
Paul
Hi,
Kindly Post the trigger code...
Cheers!
Below is Sample class to increase code coverage.
below is the test class for above apex class
This will improve your overall coverage, so add both class to your change set.
Thank you for the sample codes.
Paul