Skip to content

STRUCT

GeneratedTestPlan ​

Contents

  • Properties
    • name
    • directory
    • configurations
    • defaultOptions
    • testTargets
    • targetSelection
    • path
    • isDefault
  • Methods
    • init(name:directory:configurations:defaultOptions:testTargets:targetSelection:)
swift
public struct GeneratedTestPlan: Codable, Hashable, Sendable

A test plan that Geko generates during project generation.

Unlike a TestPlan that references an existing .xctestplan file on disk, a generated test plan is described declaratively and its .xctestplan file is produced by Geko. Test targets can be listed explicitly via testTargets or resolved automatically from targetSelection scopes.

Properties ​

name ​

swift
public var name: String

Name of the test plan

directory ​

swift
public var directory: FilePath?

The path to the folder where the test plan will be generated. If the path is nil, it will be written to Derived/TestPlans/<name>.xctestplan

configurations ​

swift
public var configurations: [Configuration]

Configurations

defaultOptions ​

swift
public var defaultOptions: Options?

Default options

testTargets ​

swift
public var testTargets: [GeneratedTestPlanTestableTarget]

Explicit test targets to include in the generated test plan.

targetSelection ​

swift
public var targetSelection: [TestableTargetSelectionScope]

Scopes that resolve which test targets to include in the generated test plan.

path ​

swift
public var path: FilePath

The path where the generated test plan is written.

isDefault ​

swift
public var isDefault: Bool

Whether this test plan is the default plan.

Methods ​

init(name:directory:configurations:defaultOptions:testTargets:targetSelection:) ​

swift
public init(
    name: String,
    directory: FilePath?,
    configurations: [Configuration],
    defaultOptions: Options?,
    testTargets: [GeneratedTestPlanTestableTarget],
    targetSelection: [TestableTargetSelectionScope],
)