XCTestCase失败后停止

时间:2018-07-09 11:30:22

标签: ios swift xcuitest xctestcase

我有一个XCTestCase,但是如果测试失败-该应用程序立即退出。 我确实将此行更改为以下内容:

continueAfterFailure = true

,失败后仍然退出应用程序。 有人知道UI测试失败后如何保持应用程序正常运行吗?找不到解决方案。

1 个答案:

答案 0 :(得分:1)

默认情况下,测试用例运行完毕后,该应用将以tearDown方法退出。仅在需要时,我们需要重写tearDown方法以终止应用程序。

例如XCUITest Class teardown isnt deleting the app. But works if its instance teardown. What am I doing wrong?