Activity Forums Salesforce® Discussions What is the purpose of Test.startTest() and Test.stopTest() in Salesforce? Reply To: What is the purpose of Test.startTest() and Test.stopTest() in Salesforce?

  • Kirandeep

    Member
    July 1, 2020 at 12:23 pm

    Test. startTest() and Test. stopTest() exist primarily to allow you to reset the governor limits within the context of your test execution and to be able to testasynchronous methods. These two statements cannot be called more than once within a testMethod