Emcee
119 строк · 5.4 Кб
1import Foundation
2
3public struct XcTestRun: Equatable {
4
5/// Xcode tests target name. This could be any possilbe value in case if this is unknown.
6public let testTargetName: String
7
8public let bundleIdentifiersForCrashReportEmphasis: [String]
9
10/// Paths to all apps UI test can access, including uiTargetAppPath
11public let dependentProductPaths: [String]
12
13/// A path to the test bundle to be tested
14public 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.
20public let testHostPath: String
21
22/// Bundle id of test host app, e.g. com.company.SomeApp or com.apple.test.SomeAppUITests-Runner
23public let testHostBundleIdentifier: String
24
25/// A path to the target application for UI tests. The parameter is mandatory for UI tests only.
26public let uiTargetAppPath: String?
27
28/// The environment variables from the scheme test action that xcodebuild will provide to the test host process.
29public let environmentVariables: [String: String]
30
31/// The command line arguments from the scheme test action that xcodebuild will provide to the test host process.
32public let commandLineArguments: [String]
33
34/// The environment variables that xcodebuild will provide to the target application during UI tests.
35public let uiTargetAppEnvironmentVariables: [String: String]
36
37/// The command line arguments that xcodebuild will provide to the target application during UI tests.
38public let uiTargetAppCommandLineArguments: [String]
39
40/// Should Main Thread Checker be enabled or not.
41public 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]
46public 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]
52public let onlyTestIdentifiers: [String]
53
54/// Additional testing environment variables that xcodebuild will provide to the TestHostPath process.
55public let testingEnvironmentVariables: [String: String]
56
57/// Indicates this is UI test run.
58public let isUITestBundle: Bool
59
60/// Indicates this is application test run.
61public let isAppHostedTestBundle: Bool
62
63/// true for Xcode UI tests.
64public 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`.
68public let testTargetProductModuleName: String
69
70public let systemAttachmentLifetime: XcTestRunAttachmentLifetime
71
72public let userAttachmentLifetime: XcTestRunAttachmentLifetime
73
74public init(
75testTargetName: String,
76bundleIdentifiersForCrashReportEmphasis: [String],
77dependentProductPaths: [String],
78testBundlePath: String,
79testHostPath: String,
80testHostBundleIdentifier: String,
81uiTargetAppPath: String?,
82environmentVariables: [String: String],
83commandLineArguments: [String],
84uiTargetAppEnvironmentVariables: [String: String],
85uiTargetAppCommandLineArguments: [String],
86uiTargetAppMainThreadCheckerEnabled: Bool,
87skipTestIdentifiers: [String],
88onlyTestIdentifiers: [String],
89testingEnvironmentVariables: [String: String],
90isUITestBundle: Bool,
91isAppHostedTestBundle: Bool,
92isXCTRunnerHostedTestBundle: Bool,
93testTargetProductModuleName: String,
94systemAttachmentLifetime: XcTestRunAttachmentLifetime,
95userAttachmentLifetime: XcTestRunAttachmentLifetime
96) {
97self.testTargetName = testTargetName
98self.bundleIdentifiersForCrashReportEmphasis = bundleIdentifiersForCrashReportEmphasis
99self.dependentProductPaths = dependentProductPaths
100self.testBundlePath = testBundlePath
101self.testHostPath = testHostPath
102self.testHostBundleIdentifier = testHostBundleIdentifier
103self.uiTargetAppPath = uiTargetAppPath
104self.environmentVariables = environmentVariables
105self.commandLineArguments = commandLineArguments
106self.uiTargetAppEnvironmentVariables = uiTargetAppEnvironmentVariables
107self.uiTargetAppCommandLineArguments = uiTargetAppCommandLineArguments
108self.uiTargetAppMainThreadCheckerEnabled = uiTargetAppMainThreadCheckerEnabled
109self.skipTestIdentifiers = skipTestIdentifiers
110self.onlyTestIdentifiers = onlyTestIdentifiers
111self.testingEnvironmentVariables = testingEnvironmentVariables
112self.isUITestBundle = isUITestBundle
113self.isAppHostedTestBundle = isAppHostedTestBundle
114self.isXCTRunnerHostedTestBundle = isXCTRunnerHostedTestBundle
115self.testTargetProductModuleName = testTargetProductModuleName
116self.systemAttachmentLifetime = systemAttachmentLifetime
117self.userAttachmentLifetime = userAttachmentLifetime
118}
119}
120