Activity Forums Salesforce® Discussions What is the use of startTest() and stopTest() in Salesforce?

  • Manish

    Member
    April 13, 2020 at 12:29 pm

    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 test asynchronous methods. These two statements cannot be called more than once within a testMethod.

  • Sumit

    Member
    April 13, 2020 at 1:15 pm

    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 test asynchronous methods. These two statements cannot be called more than once within a testMethod

    • This reply was modified 4 years, 7 months ago by  Sumit kumar.
  • Kirandeep

    Member
    April 13, 2020 at 2:28 pm

    StartTest() and stopTest() is used in Testclass to reset the governer Limits.

  • Pooja

    Member
    April 13, 2020 at 2:58 pm

    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 test asynchronous methods. These two statements cannot be called more than once within a testMethod

Log In to reply.

Popular Salesforce Blogs