From the course: Introduction to Test Classes in Salesforce
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Initial test class modifications - Salesforce Tutorial
From the course: Introduction to Test Classes in Salesforce
Initial test class modifications
- [Instructor] Let's start by looking at the Test Class Modifications. What are things that are commonly done once the test class is created in order for us to start actually writing our test code? First and foremost, we have to decide whether we're going to use a test utility, or a test factory, or a static resource. I personally am not going to spend a lot of time talking about static resources and using that to load test data. Although it's an excellent method to do that, I have found in my personal experience in working with Salesforce admins that when they have to make modifications to the test data, that actually exporting the static resource, modifying it correctly, importing it back in, and getting everything to match up can be somewhat challenging especially for newer admins. I do include a link in the slides. If you would like more information on how to use a static resource, and I would encourage anybody that runs into an org where they're using static resources to go…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Basic test class for Apex code2m 56s
-
(Locked)
Test data creation and validation1m 51s
-
(Locked)
Naming convention: Test classes1m 24s
-
(Locked)
Initial test class modifications2m 54s
-
(Locked)
Coding example: Test utility11m 7s
-
(Locked)
Testing using a test factory1m 41s
-
(Locked)
Set global values for the test factory2m 33s
-
(Locked)
Set up a test factory2m 29s
-
(Locked)
Customize a test factory3m 4s
-
Testing with a test factory5m 46s
-
-
-
-