Emcee

Форк
0
/
XcTestRun.swift 
119 строк · 5.4 Кб
1
import Foundation
2

3
public struct XcTestRun: Equatable {
4

5
    /// Xcode tests target name. This could be any possilbe value in case if this is unknown.
6
    public let testTargetName: String
7

8
    public let bundleIdentifiersForCrashReportEmphasis: [String]
9

10
    /// Paths to all apps UI test can access, including uiTargetAppPath
11
    public let dependentProductPaths: [String]
12

13
    /// A path to the test bundle to be tested
14
    public let testBundlePath: String
15

16
    /// A path to the test host.
17
    /// For framework tests, this should be a path to the xctest command line tool.
18
    /// For application hosted tests, this should be a path the application host.
19
    /// For UI tests, this should be a path to the test runner application that the UI test target produces.
20
    public let testHostPath: String
21

22
    /// Bundle id of test host app, e.g. com.company.SomeApp or com.apple.test.SomeAppUITests-Runner
23
    public let testHostBundleIdentifier: String
24

25
    /// A path to the target application for UI tests. The parameter is mandatory for UI tests only.
26
    public let uiTargetAppPath: String?
27

28
    /// The environment variables from the scheme test action that xcodebuild will provide to the test host process.
29
    public let environmentVariables: [String: String]
30

31
    /// The command line arguments from the scheme test action that xcodebuild will provide to the test host process.
32
    public let commandLineArguments: [String]
33

34
    /// The environment variables that xcodebuild will provide to the target application during UI tests.
35
    public let uiTargetAppEnvironmentVariables: [String: String]
36

37
    /// The command line arguments that xcodebuild will provide to the target application during UI tests.
38
    public let uiTargetAppCommandLineArguments: [String]
39

40
    /// Should Main Thread Checker be enabled or not.
41
    public let uiTargetAppMainThreadCheckerEnabled: Bool
42

43
    /// An array of test identifiers that xcodebuild should exclude from the test run.
44
    /// Identifiers for both Swift and Objective-C tests are:
45
    /// Test-Class-Name[/Test-Method-Name]
46
    public let skipTestIdentifiers: [String]
47

48
    /// An array of test identifiers that xcodebuild should include in the test run.
49
    /// All other tests will be excluded from the test run.
50
    /// Identifiers for both Swift and Objective-C tests are:
51
    /// Test-Class-Name[/Test-Method-Name]
52
    public let onlyTestIdentifiers: [String]
53

54
    /// Additional testing environment variables that xcodebuild will provide to the TestHostPath process.
55
    public let testingEnvironmentVariables: [String: String]
56

57
    /// Indicates this is UI test run.
58
    public let isUITestBundle: Bool
59

60
    /// Indicates this is application test run.
61
    public let isAppHostedTestBundle: Bool
62

63
    /// true for Xcode UI tests.
64
    public let isXCTRunnerHostedTestBundle: Bool
65
    
66
    /// The module name of this test target, as specified by the target's `PRODUCT_MODULE_NAME` build setting in Xcode.
67
    /// `.` and `-` symbols usually are replaced with `_`, e.g. `Some.SDK` becomes `Some_SDK`.
68
    public let testTargetProductModuleName: String
69
    
70
    public let systemAttachmentLifetime: XcTestRunAttachmentLifetime
71
    
72
    public let userAttachmentLifetime: XcTestRunAttachmentLifetime
73

74
    public init(
75
        testTargetName: String,
76
        bundleIdentifiersForCrashReportEmphasis: [String],
77
        dependentProductPaths: [String],
78
        testBundlePath: String,
79
        testHostPath: String,
80
        testHostBundleIdentifier: String,
81
        uiTargetAppPath: String?,
82
        environmentVariables: [String: String],
83
        commandLineArguments: [String],
84
        uiTargetAppEnvironmentVariables: [String: String],
85
        uiTargetAppCommandLineArguments: [String],
86
        uiTargetAppMainThreadCheckerEnabled: Bool,
87
        skipTestIdentifiers: [String],
88
        onlyTestIdentifiers: [String],
89
        testingEnvironmentVariables: [String: String],
90
        isUITestBundle: Bool,
91
        isAppHostedTestBundle: Bool,
92
        isXCTRunnerHostedTestBundle: Bool,
93
        testTargetProductModuleName: String,
94
        systemAttachmentLifetime: XcTestRunAttachmentLifetime,
95
        userAttachmentLifetime: XcTestRunAttachmentLifetime
96
    ) {
97
        self.testTargetName = testTargetName
98
        self.bundleIdentifiersForCrashReportEmphasis = bundleIdentifiersForCrashReportEmphasis
99
        self.dependentProductPaths = dependentProductPaths
100
        self.testBundlePath = testBundlePath
101
        self.testHostPath = testHostPath
102
        self.testHostBundleIdentifier = testHostBundleIdentifier
103
        self.uiTargetAppPath = uiTargetAppPath
104
        self.environmentVariables = environmentVariables
105
        self.commandLineArguments = commandLineArguments
106
        self.uiTargetAppEnvironmentVariables = uiTargetAppEnvironmentVariables
107
        self.uiTargetAppCommandLineArguments = uiTargetAppCommandLineArguments
108
        self.uiTargetAppMainThreadCheckerEnabled = uiTargetAppMainThreadCheckerEnabled
109
        self.skipTestIdentifiers = skipTestIdentifiers
110
        self.onlyTestIdentifiers = onlyTestIdentifiers
111
        self.testingEnvironmentVariables = testingEnvironmentVariables
112
        self.isUITestBundle = isUITestBundle
113
        self.isAppHostedTestBundle = isAppHostedTestBundle
114
        self.isXCTRunnerHostedTestBundle = isXCTRunnerHostedTestBundle
115
        self.testTargetProductModuleName = testTargetProductModuleName
116
        self.systemAttachmentLifetime = systemAttachmentLifetime
117
        self.userAttachmentLifetime = userAttachmentLifetime
118
    }
119
}
120

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.