Configuration
A type containing settings for preparing and running tests.
This declaration is gated by at least one @_spi attribute.
struct ConfigurationA type containing settings for preparing and running tests.
This declaration is gated by at least one @_spi attribute.
struct Configurationimport TestingCreate and run tests for your Swift packages and Xcode projects.
protocol Sendableinit() Initialize an instance of this type representing the default configuration.
static var current: Self? { get }The configuration for the current task, if any.
var defaultTestTimeLimit: Duration? { get set }The default amount of time a test may run for before timing out if it does not have an instance of TimeLimitTrait applied to it.
var deliverExpectationCheckedEvents: BoolWhether or not events of the kind expectationChecked(_:) should be delivered to this configuration’s eventHandler closure.
var eventHandler: Event.HandlerThe event handler to which events should be passed when they occur.
var exitTestHandler: ExitTest.HandlerA handler that is invoked when an exit test starts.
var isMainActorIsolationEnforced: BoolWhether or not synchronous test functions need to run on the main actor.
var isParallelizationEnabled: BoolWhether or not to parallelize the execution of tests and test cases.
var maximumTestTimeLimit: Duration? { get set }The maximum amount of time a test may run for before timing out, regardless of the value of defaultTestTimeLimit or individual instances of TimeLimitTrait applied to it.
var repetitionPolicy: RepetitionPolicyWhether or not, and how, to iterate the test plan repeatedly.
var testCaseFilter: TestCaseFilterThe test case filter to which test cases should be filtered when run.
var testFilter: TestFilterThe test filter to which tests should be filtered when run.
var testTimeLimitGranularity: Duration { get set }The granularity to enforce on test time limits.
struct RepetitionPolicyA type describing whether or not, and how, to iterate a test plan repeatedly.
struct TestFilterA type that handles filtering tests.
typealias TestCaseFilter = (_ testCase: Test.Case, _ test: Test) -> BoolA function that handles filtering test cases.