STRUCT
GeneratedTestPlanTestableTarget
Contents
- Properties
targetselectedTestsskippedTests
- Methods
init(_:selectedTests:skippedTests:)init(stringLiteral:)target(_:selectedTests:skippedTests:)
public struct GeneratedTestPlanTestableTarget: Codable, Hashable, Sendable, ExpressibleByStringInterpolationA testable target entry used for auto-generated test plans in Geko.
Wraps a TestableTarget with optional test filtering (selected/skipped tests). Conforms to ExpressibleByStringInterpolation, so you can use a plain string wherever an GeneratedTestPlanTestableTarget is expected:
let targets: [GeneratedTestPlanTestableTarget] = [
"MyFeatureTests",
.target("MyOtherTests", skippedTests: ["MyOtherTests/testFlaky"]),
]Properties
target
public var target: TestableTargetThe underlying testable target reference that identifies which target should be included in the generated test plan.
selectedTests
public var selectedTests: [String]A list of specific tests to include in the plan.
Each entry uses the Xcode test identifier format, e.g. "MyTests/testExample" or "MyTests" for an entire suite. When non-empty, only these tests will be executed for this target. An empty array means all tests are included (subject to skippedTests).
skippedTests
public var skippedTests: [String]A list of specific tests to exclude from the plan.
Each entry uses the Xcode test identifier format, e.g. "MyTests/testExample" or "MyTests" for an entire suite. These tests will be skipped even if they would otherwise run. An empty array means no tests are skipped.
Methods
init(_:selectedTests:skippedTests:)
public init(
_ target: TestableTarget,
selectedTests: [String] = [],
skippedTests: [String] = [],
)init(stringLiteral:)
public init(stringLiteral value: String)Parameters
| Name | Description |
|---|---|
| value | The value of the new instance. |
target(_:selectedTests:skippedTests:)
public static func target(
_ target: TestableTarget,
selectedTests: [String] = [],
skippedTests: [String] = [],
) -> SelfCreates an GeneratedTestPlanTestableTarget with optional test filtering.
This factory method provides a more readable call-site syntax:
.target("MyTests", selectedTests: ["MyTests/testImportant"])- Parameters:
- target: The testable target to include.
- selectedTests: Tests to run exclusively. Empty means run all.
- skippedTests: Tests to skip. Empty means skip none.
- Returns: A configured
GeneratedTestPlanTestableTarget.
Parameters
| Name | Description |
|---|---|
| target | The testable target to include. |
| selectedTests | Tests to run exclusively. Empty means run all. |
| skippedTests | Tests to skip. Empty means skip none. |
