You need to sign in to do that
Don't have an account?
Samuel Wolfe
Create one shared record for all tests in a class
I have a test class with 70+ tests in it. Every single tests needs to create an Account, a Contact, and several custom objects. All of these Accounts, Contacts, etc... are the exact same.
Since all of these records need to be inserted again in every test case, this test class takes a very long time to run. Is it possible to create the account/contacts/etc... only 1 time, and have it be accessible in every test class so I don't have to re-insert them 77 times each?
Since all of these records need to be inserted again in every test case, this test class takes a very long time to run. Is it possible to create the account/contacts/etc... only 1 time, and have it be accessible in every test class so I don't have to re-insert them 77 times each?
Manto
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_testsetup_using.htm