Skip to content

Commit 9f9cd4f

Browse files
authored
XCTest - Add Support for Multiple Test Configurations in a Single .xctestrun File (#572)
This PR introduces support for handling multiple test configurations within a single xctestrun file. Previously we assumed a single test configuration, which limited its flexibility when working with more complex test setups commonly found in Xcode UI testing workflows.
1 parent 1dca9df commit 9f9cd4f

5 files changed

+800
-271
lines changed

ios/testmanagerd/testdata/contains_invalid_test_configuration.xctestrun

-173
Original file line numberDiff line numberDiff line change
@@ -2,179 +2,6 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>TestConfigurations</key>
6-
<array>
7-
<dict>
8-
<key>Name</key>
9-
<string>Test Scheme Action</string>
10-
<key>TestTargets</key>
11-
<array>
12-
<dict>
13-
<key>BlueprintName</key>
14-
<string>FakeCounterAppUITests</string>
15-
<key>BlueprintProviderName</key>
16-
<string>FakeCounterApp</string>
17-
<key>BlueprintProviderRelativePath</key>
18-
<string>FakeCounterApp.xcodeproj</string>
19-
<key>BundleIdentifiersForCrashReportEmphasis</key>
20-
<array>
21-
<string>saucelabs.FakeCounterApp</string>
22-
<string>saucelabs.FakeCounterAppUITests</string>
23-
</array>
24-
<key>ClangProfileDataDirectoryPath</key>
25-
<string>__DERIVEDDATA__/Build/ProfileData</string>
26-
<key>CommandLineArguments</key>
27-
<array/>
28-
<key>DefaultTestExecutionTimeAllowance</key>
29-
<integer>600</integer>
30-
<key>DependentProductPaths</key>
31-
<array>
32-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterApp.app</string>
33-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterApp.app/PlugIns/FakeCounterAppTests.xctest</string>
34-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterAppUITests-Runner.app</string>
35-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterAppUITests-Runner.app/PlugIns/FakeCounterAppUITests.xctest</string>
36-
</array>
37-
<key>DiagnosticCollectionPolicy</key>
38-
<integer>1</integer>
39-
<key>EnvironmentVariables</key>
40-
<dict>
41-
<key>APP_DISTRIBUTOR_ID_OVERRIDE</key>
42-
<string>com.apple.AppStore</string>
43-
<key>OS_ACTIVITY_DT_MODE</key>
44-
<string>YES</string>
45-
<key>SQLITE_ENABLE_THREAD_ASSERTIONS</key>
46-
<string>1</string>
47-
<key>TERM</key>
48-
<string>dumb</string>
49-
</dict>
50-
<key>IsUITestBundle</key>
51-
<true/>
52-
<key>IsXCTRunnerHostedTestBundle</key>
53-
<true/>
54-
<key>ParallelizationEnabled</key>
55-
<true/>
56-
<key>PreferredScreenCaptureFormat</key>
57-
<string>screenRecording</string>
58-
<key>ProductModuleName</key>
59-
<string>FakeCounterAppUITests</string>
60-
<key>SystemAttachmentLifetime</key>
61-
<string>deleteOnSuccess</string>
62-
<key>TestBundlePath</key>
63-
<string>__TESTHOST__/PlugIns/FakeCounterAppUITests.xctest</string>
64-
<key>TestHostBundleIdentifier</key>
65-
<string>saucelabs.FakeCounterAppUITests.xctrunner</string>
66-
<key>TestHostPath</key>
67-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterAppUITests-Runner.app</string>
68-
<key>TestLanguage</key>
69-
<string></string>
70-
<key>TestRegion</key>
71-
<string></string>
72-
<key>TestTimeoutsEnabled</key>
73-
<false/>
74-
<key>TestingEnvironmentVariables</key>
75-
<dict/>
76-
<key>ToolchainsSettingValue</key>
77-
<array/>
78-
<key>UITargetAppCommandLineArguments</key>
79-
<array/>
80-
<key>UITargetAppEnvironmentVariables</key>
81-
<dict>
82-
<key>APP_DISTRIBUTOR_ID_OVERRIDE</key>
83-
<string>com.apple.AppStore</string>
84-
</dict>
85-
<key>UITargetAppPath</key>
86-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterApp.app</string>
87-
<key>UserAttachmentLifetime</key>
88-
<string>deleteOnSuccess</string>
89-
</dict>
90-
</array>
91-
</dict>
92-
<dict>
93-
<key>Name</key>
94-
<string>Test Scheme Action</string>
95-
<key>TestTargets</key>
96-
<array>
97-
<dict>
98-
<key>BlueprintName</key>
99-
<string>FakeCounterAppUITests</string>
100-
<key>BlueprintProviderName</key>
101-
<string>FakeCounterApp</string>
102-
<key>BlueprintProviderRelativePath</key>
103-
<string>FakeCounterApp.xcodeproj</string>
104-
<key>BundleIdentifiersForCrashReportEmphasis</key>
105-
<array>
106-
<string>saucelabs.FakeCounterApp</string>
107-
<string>saucelabs.FakeCounterAppUITests</string>
108-
</array>
109-
<key>ClangProfileDataDirectoryPath</key>
110-
<string>__DERIVEDDATA__/Build/ProfileData</string>
111-
<key>CommandLineArguments</key>
112-
<array/>
113-
<key>DefaultTestExecutionTimeAllowance</key>
114-
<integer>600</integer>
115-
<key>DependentProductPaths</key>
116-
<array>
117-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterApp.app</string>
118-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterApp.app/PlugIns/FakeCounterAppTests.xctest</string>
119-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterAppUITests-Runner.app</string>
120-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterAppUITests-Runner.app/PlugIns/FakeCounterAppUITests.xctest</string>
121-
</array>
122-
<key>DiagnosticCollectionPolicy</key>
123-
<integer>1</integer>
124-
<key>EnvironmentVariables</key>
125-
<dict>
126-
<key>APP_DISTRIBUTOR_ID_OVERRIDE</key>
127-
<string>com.apple.AppStore</string>
128-
<key>OS_ACTIVITY_DT_MODE</key>
129-
<string>YES</string>
130-
<key>SQLITE_ENABLE_THREAD_ASSERTIONS</key>
131-
<string>1</string>
132-
<key>TERM</key>
133-
<string>dumb</string>
134-
</dict>
135-
<key>IsUITestBundle</key>
136-
<true/>
137-
<key>IsXCTRunnerHostedTestBundle</key>
138-
<true/>
139-
<key>ParallelizationEnabled</key>
140-
<true/>
141-
<key>PreferredScreenCaptureFormat</key>
142-
<string>screenRecording</string>
143-
<key>ProductModuleName</key>
144-
<string>FakeCounterAppUITests</string>
145-
<key>SystemAttachmentLifetime</key>
146-
<string>deleteOnSuccess</string>
147-
<key>TestBundlePath</key>
148-
<string>__TESTHOST__/PlugIns/FakeCounterAppUITests.xctest</string>
149-
<key>TestHostBundleIdentifier</key>
150-
<string>saucelabs.FakeCounterAppUITests.xctrunner</string>
151-
<key>TestHostPath</key>
152-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterAppUITests-Runner.app</string>
153-
<key>TestLanguage</key>
154-
<string></string>
155-
<key>TestRegion</key>
156-
<string></string>
157-
<key>TestTimeoutsEnabled</key>
158-
<false/>
159-
<key>TestingEnvironmentVariables</key>
160-
<dict/>
161-
<key>ToolchainsSettingValue</key>
162-
<array/>
163-
<key>UITargetAppCommandLineArguments</key>
164-
<array/>
165-
<key>UITargetAppEnvironmentVariables</key>
166-
<dict>
167-
<key>APP_DISTRIBUTOR_ID_OVERRIDE</key>
168-
<string>com.apple.AppStore</string>
169-
</dict>
170-
<key>UITargetAppPath</key>
171-
<string>__TESTROOT__/Debug-iphoneos/FakeCounterApp.app</string>
172-
<key>UserAttachmentLifetime</key>
173-
<string>deleteOnSuccess</string>
174-
</dict>
175-
</array>
176-
</dict>
177-
</array>
1785
<key>__xctestrun_metadata__</key>
1796
<dict>
1807
<key>FormatVersion</key>

0 commit comments

Comments
 (0)