Activity › Forums › Salesforce® Discussions › What are the best practices to write a test class?

  • Aditya

    Member
    March 5, 2020 at 3:30 PM

    Salesforce Apex Test Class Best Practices
    Do not put (seeAllData = true) in test class otherwise, use it for exceptional cases.
    Use @isTest at the Top for all the test classes.
    Test in bulk: Test to see if your code can run on 200 records at once.
    Avoid Using Hard Coding Ids anywhere in test Class or any apex class

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Free 5 Day Salesforce Challenge!

Video in

To access the signup form head over to www.talentstacker.com/Salesforce TalentStacker Podcast Salesforce Episode: https://talentstacker.libsyn.com/how-to-earn-60k-100k-a-year-within-6-months-without-a-college-degree-say-what-salesforce-career-development-path-with-bradley-rice Do you already have a job as a Salesforce Professional and…