Activity Forums Salesforce® Discussions How do I write a test class in Salesforce Apex?

  • How do I write a test class in Salesforce Apex?

     kishan updated 10 months ago 2 Members · 2 Posts
  • Mansi Tyagi

    Member
    March 22, 2021 at 4:43 pm

    How do I write a test class in Salesforce Apex?

  • kishan

    Member
    March 23, 2021 at 1:22 pm

    The test class are written under @isTest annotation. By using this annotation for test class we maintain code limit as it is not counted in it.
    The Test Class In Apex Salesforce does not have access to any of the data which is stored in the related Salesforce org by default.We need to create raw-data for test class in our test class itself. By adding SeeAllData=true to @isTest annotation i.e. @isTest(SeeAllData=true) grants the access to the all the data of the related Salesforce org.

Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos