Skip to main content

Set-Up and Tear Down

The %UnitTest.TestCaseOpens in a new tab class provides methods that can be used to set up a test environment before a test or set of tests executes and then tear down that environment after the tests are finished. Here are descriptions of these methods:

Method

Description

OnBeforeAllTests

Executes once before any of the test methods in a test class execute. Can set up a test environment.

OnAfterAllTests

Executes once after all of the test methods in a test class execute. Can tear down a test environment.

OnBeforeOneTest

Executes immediately before each test method in a test class executes.

OnAfterOneTest

Executes immediately after each test method in a text class executes.

FeedbackOpens in a new tab