Back to Browse

Generate Data for Tests | Unit Testing on the Lightning Platform

3.7K views
Feb 5, 2023
7:43

#salesforce #trailhead #salestraining #salesforcetrailhead Unit Testing on the Lightning Platform Generate Data for Tests : https://trailhead.salesforce.com/content/learn/modules/unit-testing-on-the-lightning-platform/generate-data-for-tests Create tests that load data from a CSV in @testSetup method Create and run a test class that uses a @testSetup method. To get started Download this CSV file. Upload the CSV file as a static resource named Mock_Data. Create a new Test Class named myDataGenerationTests Create a @testSetup method that loads the Mock_Data csv into Accounts Create a test method that asserts the presence of 15 accounts 00:00 Introduction 01:13 Static Resource 02:23 myDataGenerationTests

Download

0 formats

No download links available.

Generate Data for Tests | Unit Testing on the Lightning Platform | NatokHD