Activity Forums Salesforce® Discussions What is Test Data factory in Salesforce?

  • Anuj

    Member
    April 9, 2020 at 1:56 pm

    Hi Manish,
    The TestDataFactory class is a special type of class—it is a public class that is annotated with isTest and can be accessed only from a running test. Test utility classes contain methods that can be called by test methods to perform useful tasks, such as setting up test data. Test utility classes are excluded from the org’s code size limit.

  • Shweta

    Member
    April 9, 2020 at 3:28 pm

    Test Data Factory: Any developer who spends any serious amount of time developing or fixing test code quickly discovers, creating your test data separately for each test -- especially in an environment heavy with integration tests, as SFDC usually is -- can quickly become a large problem.

  • Ratnesh

    Member
    April 11, 2020 at 3:42 pm

    It is a public class that is annotated with isTest and can be accessed only from a running test.

  • Anjali

    Member
    April 13, 2020 at 10:43 am

    Test utility classes contain methods that can be called by test methods to perform useful tasks, such as setting up test data.

Log In to reply.

Popular Salesforce Blogs