Skip to content

Commit 1bd0055

Browse files
authored
CI: UITest for crash recoverability (#2666)
Created a ui test for iOS-Swift sample that press the crash button and try to open the app again. If we introduce any error in the crash report process this test may identify it.
1 parent 8526e93 commit 1bd0055

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ class LaunchUITests: XCTestCase {
2020
super.tearDown()
2121
}
2222

23+
func testCrashRecovery() {
24+
app.buttons["crash"].tap()
25+
if app.buttons["crash"].exists {
26+
XCTFail("App did not crashed")
27+
}
28+
app.launch()
29+
waitForExistenseOfMainScreen()
30+
}
31+
2332
func testBreadcrumbData() {
2433
let breadcrumbLabel = app.staticTexts["breadcrumbLabel"]
2534
breadcrumbLabel.waitForExistence("Breadcrumb label not found.")

0 commit comments

Comments
 (0)