Xcode UI Testing not failing even though app crashes with SIGABRT

Viewed 338

After the iOS 11 upgrade I found a crash in my application related to the share sheet and saving an image due to the newly added permission checks. That is all good, easy fix. However, I wanted to write a UI automation test to check for this type of thing in the future since I've been burned twice now.

So I wrote the test and it crashes as expected when i run through Xcode, however when I hit continue on the debugger (after the SIGABRT) the test says it completes successfully and is not reporting a failure.

Tried googling but can't find anything relevant, anyone know why the test would say passed when the app crashes?

Here is a code snippet from test, it selects the option appropriately and then SIGABRT, Xcode catches it and when i hit continue the test says it passes. If I put more items after the line causing the crash the test just spins indefinitely.

    let shareButton = app.tables.tables.buttons["share"]
    shareButton.tap()

    let shareSheet = app.sheets["Share Sheet Title"]
    shareSheet.buttons["Item to Share"].tap()
    app.collectionViews.collectionViews.buttons["Save Image"].tap()

Thanks

0 Answers
Related