Skip to content

Commit

Permalink
CI: UITest for crash recoverability (#2666)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brustolin authored Jan 30, 2023
1 parent 8526e93 commit 1bd0055
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Samples/iOS-Swift/iOS-SwiftUITests/LaunchUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ class LaunchUITests: XCTestCase {
super.tearDown()
}

func testCrashRecovery() {
app.buttons["crash"].tap()
if app.buttons["crash"].exists {
XCTFail("App did not crashed")
}
app.launch()
waitForExistenseOfMainScreen()
}

func testBreadcrumbData() {
let breadcrumbLabel = app.staticTexts["breadcrumbLabel"]
breadcrumbLabel.waitForExistence("Breadcrumb label not found.")
Expand Down

0 comments on commit 1bd0055

Please sign in to comment.