Português (Portuguese)
Appearance
Português (Portuguese)
Appearance
STRUCT
TestAction Contents
testPlanstargetsargumentsconfigurationattachDebuggerexpandVariableFromTargetpreActionspostActionsoptionsdiagnosticsOptionsskippedTeststargets(_:arguments:configuration:attachDebugger:expandVariableFromTarget:preActions:postActions:options:diagnosticsOptions:skippedTests:)testPlans(_:configuration:attachDebugger:preActions:postActions:)public struct TestAction: Equatable, Codable, SendableAn action that tests the built products.
You can create a test action with either a set of test targets or test plans using the .targets or .testPlans static methods respectively.
testPlans public var testPlans: [Path]?List of test plans. The first in the list will be the default plan.
targets public var targets: [TestableTarget]A list of testable targets, that are targets which are defined in the project with testable information.
arguments public var arguments: Arguments?Command line arguments passed on launch and environment variables.
configuration public var configuration: ConfigurationNameBuild configuration to run the test with.
attachDebugger public var attachDebugger: BoolWhether a debugger should be attached to the test process or not.
expandVariableFromTarget public var expandVariableFromTarget: TargetReference?A target that will be used to expand the variables defined inside Environment Variables definition (e.g. $SOURCE_ROOT)
preActions public var preActions: [ExecutionAction]A list of actions that are executed before starting the tests-run process.
postActions public var postActions: [ExecutionAction]A list of actions that are executed after the tests-run process.
options public var options: TestActionOptionsList of options to set to the action.
diagnosticsOptions public var diagnosticsOptions: SchemeDiagnosticsOptionsList of diagnostics options to set to the action.
skippedTests public var skippedTests: [String]?List of testIdentifiers to skip to the test
targets(_:arguments:configuration:attachDebugger:expandVariableFromTarget:preActions:postActions:options:diagnosticsOptions:skippedTests:) public static func targets(
_ targets: [TestableTarget],
arguments: Arguments? = nil,
configuration: ConfigurationName = .debug,
attachDebugger: Bool = true,
expandVariableFromTarget: TargetReference? = nil,
preActions: [ExecutionAction] = [],
postActions: [ExecutionAction] = [],
options: TestActionOptions = .options(),
diagnosticsOptions: SchemeDiagnosticsOptions = .options(),
skippedTests: [String] = []
) -> SelfReturns a test action from a list of targets to be tested.
| Name | Description |
|---|---|
| targets | List of targets to be tested. |
| arguments | Arguments passed when running the tests. |
| configuration | Configuration to be used. |
| attachDebugger | A boolean controlling whether a debugger is attached to the process running the tests. |
| expandVariableFromTarget | A target that will be used to expand the variables defined inside Environment Variables definition. When nil, it does not expand any variables. |
| preActions | Actions to execute before running the tests. |
| postActions | Actions to execute after running the tests. |
| options | Test options. |
| diagnosticsOptions | Diagnostics options. |
testPlans(_:configuration:attachDebugger:preActions:postActions:) public static func testPlans(
_ testPlans: [Path],
configuration: ConfigurationName = .debug,
attachDebugger: Bool = true,
preActions: [ExecutionAction] = [],
postActions: [ExecutionAction] = []
) -> SelfReturns a test action from a list of test plans.
| Name | Description |
|---|---|
| testPlans | List of test plans to run. |
| configuration | Configuration to be used. |
| attachDebugger | A boolean controlling whether a debugger is attached to the process running the tests. |
| preActions | Actions to execute before running the tests. |
| postActions | Actions to execute after running the tests. |