Skip to content

STRUCT

GeneratedTestPlanTestableTarget ​

Contents

  • Properties
    • target
    • selectedTests
    • skippedTests
  • Methods
    • init(_:selectedTests:skippedTests:)
    • init(stringLiteral:)
    • target(_:selectedTests:skippedTests:)
swift
public struct GeneratedTestPlanTestableTarget: Codable, Hashable, Sendable, ExpressibleByStringInterpolation

A 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:

swift
let targets: [GeneratedTestPlanTestableTarget] = [
    "MyFeatureTests",
    .target("MyOtherTests", skippedTests: ["MyOtherTests/testFlaky"]),
]

Properties ​

target ​

swift
public var target: TestableTarget

The underlying testable target reference that identifies which target should be included in the generated test plan.

selectedTests ​

swift
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 ​

swift
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:) ​

swift
public init(
    _ target: TestableTarget,
    selectedTests: [String] = [],
    skippedTests: [String] = [],
)

init(stringLiteral:) ​

swift
public init(stringLiteral value: String)

Parameters ​

NameDescription
valueThe value of the new instance.

target(_:selectedTests:skippedTests:) ​

swift
public static func target(
    _ target: TestableTarget,
    selectedTests: [String] = [],
    skippedTests: [String] = [],
) -> Self

Creates an GeneratedTestPlanTestableTarget with optional test filtering.

This factory method provides a more readable call-site syntax:

swift
.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 ​

NameDescription
targetThe testable target to include.
selectedTestsTests to run exclusively. Empty means run all.
skippedTestsTests to skip. Empty means skip none.