Activity › Forums › Salesforce® Discussions › What is Test Data factory in Salesforce?
-
What is Test Data factory in Salesforce?
Posted by Manish on April 9, 2020 at 1:49 PMWhat is Test Data factory in Salesforce?
Anjali replied 6 years, 1 month ago 5 Members · 4 Replies -
4 Replies
-
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. - [adinserter block='9']
-
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.
-
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.
Log In to reply.