Contents

TestScoping

A protocol that tells the test runner to run custom code before or after it runs a test suite or test function.

Declaration

protocol TestScoping : Sendable

Overview

Provide custom scope for tests by implementing the scopeProvider(for:testCase:) method, returning a type that conforms to this protocol. Create a custom scope to consolidate common set-up and tear-down logic for tests which have similar needs, which allows each test function to focus on the unique aspects of its test.

Topics

Instance Methods

See Also

Creating custom traits