Structure
TestAction.Options
Configuration for the test action.
struct OptionsTopics
Initializers
init(from: any Decoder) throwsinit(scheme: String?, destinations: [String]?, destination: String?, configuration: String?, enableCodeCoverage: Bool?, resultBundlePath: String?, testPlan: String?, onlyTesting: [String]?, skipTesting: [String]?, retryOnFailure: Bool?, rerunFailedTests: TestAction.FailedTestRerunOptions?, reportPath: String?, infrastructureRetry: TestAction.InfrastructureRetryOptions?, kind: TestKind?, scope: GradleTaskScope?, module: String?, buildVariant: String?, task: String?, devices: TestDeviceConfig?)Creates
Optionsfor the test action.
Instance Properties
var buildVariant: String?Build variant to test (e.g.
"debug","release"). Default:debug. (Android only)var configuration: String?Build configuration. Default:
Debug.var destination: String?Single simulator or device destination string.
var destinations: [String]?One or more xcodebuild destination strings.
var devices: TestDeviceConfig?Device configuration for instrumented test runs. (Android only)
var enableCodeCoverage: Bool?Whether to enable code coverage collection. (iOS only) When
trueandresultBundlePathis not set, a default path of./build/<scheme>-tests.xcresultis used automatically.var infrastructureRetry: TestAction.InfrastructureRetryOptions?Retries the entire iOS test invocation for transient simulator/runner failures.
var kind: TestKind?What category of test to run. Drives device orchestration behavior. (Android only)
var module: String?Gradle module to test (e.g.
"app"). Defaults toconfig.androidModule. (Android only)var onlyTesting: [String]?Restrict the run to specific test targets or test cases. (iOS only) Each entry maps to a separate
-only-testingargument. Example:["MyAppTests/MyFeatureTests", "MyAppTests/MyFeatureTests/testSomething"]var reportPath: String?Optional path to write a structured JSON test report.
var rerunFailedTests: TestAction.FailedTestRerunOptions?Selectively rerun only the failed tests when the runner supports it.
var resultBundlePath: String?Path to write the
.xcresultbundle. Auto-derived whenenableCodeCoverageistrueand this isnil. (iOS only)var retryOnFailure: Bool?Automatically retry failing tests once before reporting failure. (iOS only)
var scheme: String?Xcode scheme containing the test targets.
var scope: GradleTaskScope?Where to qualify the Gradle task from. (Android only)
var skipTesting: [String]?Skip specific test targets or test cases. (iOS only) Each entry maps to a separate
-skip-testingargument.var task: String?Explicit Gradle task name to run (e.g.
"testDebugUnitTest"). (Android only)var testPlan: String?Test plan name to run (if multiple plans exist). (iOS only)
Relationships
Conforms To
Swift.DecodableSwift.EncodableSwift.SendableSwift.SendableMetatype