Type Method

tearDown()

Provides an opportunity to perform cleanup after a test case ends.

Declaration

class func tearDown()

Discussion

The tearDown() class method is called exactly once for a test case, after its final test method completes. Override this method to perform any cleanup after all test methods have ended.

See Also

Customizing Test Setup and Teardown

Understanding Setup and Teardown for Test Methods

Prepare initial state before tests run and perform cleanup after tests complete.

class func setUp()

Provides an opportunity to customize initial state before a test case begins.

func addTeardownBlock(() -> Void)

Registers a block of teardown code to be run after the current test method ends.