Skip to content

Commit 40da768

Browse files
authored
test(UI): always wipe all data on disk before starting a new UI test (#5436)
* test: always wipe all data on disk before starting a new UI test * do it in BaseUITest.setUp so it only happens once per test case, on the first launch
1 parent bd2afd9 commit 40da768

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

Samples/iOS-Swift/iOS-Swift-UITests/BaseUITest.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ class BaseUITest: XCTestCase {
1313
continueAfterFailure = false
1414
XCUIDevice.shared.orientation = .portrait
1515
app.launchEnvironment["--io.sentry.sdk-environment"] = "ui-tests"
16+
app.launchArguments.append(contentsOf: [
17+
"--io.sentry.wipe-data"
18+
])
1619
if automaticallyLaunchAndTerminateApp {
1720
launchApp()
1821
}

Samples/iOS-Swift/iOS-Swift-UITests/ProfilingUITests.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ import XCTest
55
class ProfilingUITests: BaseUITest {
66
override var automaticallyLaunchAndTerminateApp: Bool { false }
77

8-
override func setUp() {
9-
super.setUp()
10-
11-
app.launchArguments.append(contentsOf: [
12-
"--io.sentry.wipe-data" // make sure there are no previous configuration files or profile files written
13-
])
14-
}
15-
168
func testAppLaunchesWithTraceProfiler() throws {
179
guard #available(iOS 16, *) else {
1810
throw XCTSkip("Only run for latest iOS version we test; we've had issues with prior versions in SauceLabs")

0 commit comments

Comments
 (0)