Activity Forums Salesforce® Discussions 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.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos