Skip to main content
Hi

I have a trigger and its test class which runs perfectly fine in the sandbox and it also shows 76 % coverage. I also had some debug statements in both the test class and trigger and I was able to view the expected result. But when I deploy it to production, choosing run specific test classses only, it doesnt get deployed and the error is code coverage is 0. I opened the debug logs and it seems like the trigger is not getting called when test datat is inserted because I only see the debug ststaments from the test class but not from the trigger.

   Please help me to find out ehat might be the reason that it is not getting called.... It is very urgent.

 Thank you
7 respuestas
  1. 11 sept 2016, 18:46

    You can use followning dummy class to increase the test coverage -

    public class IncreaseCoverage {

    public void increaseCodeCoverage() {

    System.debug('100% code coverage');

    }

    }

    @isTest

    private class IncreaseTestCoverage_Tesst {

    private static testMethod void test_increaseCodeCoverage(){

    IncreaseCoverage ic = new IncreaseCoverage();

    ic.increaseCodeCoverage();

    }

    }

    Incluse these classes with the trigger and try to deploy again. Your trigger should get deployed.

    Later You find out the issue and deploy the correct test class and delete these both dummy classes from the production.

    Thanks, 

    Sumit Kumar Singh.
0/9000