Test Data Factory Patterns

Use when designing or building reusable Apex test data factories: @IsTest utility classes, SObject hierarchy construction, bulk data generation, portal user factories with System.runAs(), and @testSetup methods. NOT for test class structure and assertions (use apex/test-class-standards) or for loading data into sandboxes (use devops/data-seeding-for-testing).

PranavNagrecha 75e5c61 7 files · 37.2 KB Updated 15 repo stars

File contents

PranavNagrecha/AwesomeSalesforceSkills/tree/main/skills/apex/test-data-factory-patterns commit 75e5c6123b

Frequently asked questions

npx skillmds add pranavnagrecha/test-data-factory-patterns