LaunchEnvironmentWithSingleValue

public protocol LaunchEnvironmentWithSingleValue : LaunchEnvironmentProtocol

Protocol defining minimal requirements for launch environment option with single values. Provides default implementation for handling singe launch environment by providing key and value.

Example:

public struct SimpleLaunchEnvironment: LaunchEnvironmentWithSingleValue {

    public typealias Value = String
    public let key = "LAUNCH_KEY"
    public var value: String
}

let simple = SimpleLaunchEnvironment(value: "LaunchValue")
  • key

    String representation of the environment key.

    Declaration

    Swift

    var key: String { get }
  • Value of the launch argument.

    Declaration

    Swift

    var value: Value { get }
  • uniqueIdentifier Extension method

    Unique value to use when comparing with other launch options.

    Declaration

    Swift

    var uniqueIdentifier: String { get }
  • launchEnvironments Extension method

    Dictionary added to XCUIApplication launchEnviroment.

    Declaration

    Swift

    var launchEnvironments: [String : String]? { get }
  • launchEnvironments Extension method

    launchEnvironments value depends on shouldCleanBefore, if true - CleanFlag (defined in CleanableLaunchEnvironment) is added at the beginning of LaunchEnvironment value.

    Example:

    CleanableSimpleLaunchEnvironment(value: "PGS_WITH_LOVE", shouldCleanBefore: true).launchEnvironments
    

    Output:

    ["LAUNCH_KEY": "AM_CLEAN_DATA_FLAG,PGS_WITH_LOVE"]
    

    Declaration

    Swift

    var launchEnvironments: [String : String]? { get }