Enable parallel UI test execution via per-session data isolation
Each test class now gets a unique session ID (UUID) passed to the app via UI_TEST_SESSION_ID environment variable. The app uses this to: - Route GroupUserDefaults to a session-specific UserDefaults suite, preventing tests from clobbering each other's AppStorage state - Create an in-memory SwiftData container instead of the shared on-disk App Group store, eliminating SQLite contention Refactored 8 test classes that bypassed BaseUITestCase.setUp() with custom launch args — they now use overridable `localeArguments` and `extraLaunchArguments` properties, keeping session ID injection centralized. Added `relaunchApp(resetState:bypassSubscription:)` to BaseUITestCase for tests that need mid-test relaunch with different subscription state. Includes a ParallelUITests.xctestplan with class-level parallelism enabled and random execution ordering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"configurations" : [
|
||||
{
|
||||
"id" : "9A1B2C3D-4E5F-6A7B-8C9D-0E1F2A3B4C5D",
|
||||
"name" : "Parallel UI Tests",
|
||||
"options" : {
|
||||
"testExecutionOrdering" : "random"
|
||||
}
|
||||
}
|
||||
],
|
||||
"defaultOptions" : {
|
||||
"maximumTestExecutionTimeAllowance" : 180,
|
||||
"testTimeoutsEnabled" : true
|
||||
},
|
||||
"testTargets" : [
|
||||
{
|
||||
"parallelizable" : true,
|
||||
"target" : {
|
||||
"containerPath" : "container:Reflect.xcodeproj",
|
||||
"identifier" : "Tests iOS",
|
||||
"name" : "Tests iOS"
|
||||
}
|
||||
}
|
||||
],
|
||||
"version" : 1
|
||||
}
|
||||
Reference in New Issue
Block a user