You need to sign in to do that
Don't have an account?
uma52551.3972270309784705E12
Apex Trigger code Coverage
Hi All,
After Keeping if(!Test.isRunningtest()) to escape from the test class failure can we achive 100% code covarage on our trigger? I am having only 93% code covarage to my trigger. It has to be 100% to deploy this in prod. Any Suggestion how to gain 100% without removing 'if(!Test.isRunningtest())' Thanks!
After Keeping if(!Test.isRunningtest()) to escape from the test class failure can we achive 100% code covarage on our trigger? I am having only 93% code covarage to my trigger. It has to be 100% to deploy this in prod. Any Suggestion how to gain 100% without removing 'if(!Test.isRunningtest())' Thanks!
StephenKenny
Can you post your trigger so we can see what is inside / outside of this code block? It should be possible to bring the coverage up but it depends on the code you have in your trigger. If it is alot, you may need to rewrite a large portion of it, or move all of the logic into a trigger handler class. You may decide the benifit it is not worth the effort in the end.