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.
Miscellaneous tests - Salesforce Tutorial
From the course: Introduction to Test Classes in Salesforce
Miscellaneous tests
- [Narrator] As we're getting ready to actually start writing test code coverage, one of the things we want to look at is the miscellaneous test tags that are available that can execute both in our actual code, and in our test code. First, let's look at our code. In our code there's a couple different methods that we can use. One is something called 'test dot is running test'. This is a method that returns true if our code is actually being executed by test code. 'Test dot is running test' can be important to use in our code when we want to determine whether or not we're being executed by test code. We may want to be able to execute parts of the code that work with air handling. And in many cases, a lot of times it's very difficult to actually induce errors that could possibly come up as a user is using the code. 'Test dot is running test' would allow us to return true and thus also execute the error codes to look at what the error codes are to make sure they're returning what we…
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.