Activity Forums Salesforce® Discussions Why would a developer use test startTest and test stopTest in Salesforce?

  • Why would a developer use test startTest and test stopTest in Salesforce?

    Posted by Ratnesh on February 19, 2020 at 1:36 pm

    Why would a developer use test startTest and test stopTest in Salesforce?

    Sumit replied 4 years, 9 months ago 4 Members · 3 Replies
  • 3 Replies
  • Marziya

    Member
    February 19, 2020 at 1:37 pm

    Hii Ratnesh,

    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.

  • Anjali

    Member
    February 19, 2020 at 2:10 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 test asynchronous methods

  • Sumit

    Member
    February 19, 2020 at 2:17 pm

    Hii Ratnesh,

    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.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos