Is there a way to reset the app between tests in Swift XCTest UI?
问题 Is there an API call within XCTest that I can put into the setUP() or tearDown() to reset the app between tests? I looked in the dot syntax of XCUIApplication and all I saw was the .launch() OR is there a way to call a shell script in Swift? I could then call xcrun in-between test methods to reset the simulator. 回答1: You can add a "Run Script" phase to build phases in your test target to uninstall the app before running unit tests against it, unfortunately this is not between test cases,