【问题标题】:XCTestCase stops after failureXCTestCase 失败后停止
【发布时间】:2018-07-09 11:30:22
【问题描述】:

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

continueAfterFailure = true

失败后它仍然退出应用程序。 有谁知道在 UI 测试失败后如何让应用程序保持活力?还没找到解决办法。

【问题讨论】:

    标签: ios swift xcuitest xctestcase


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-29
      • 2013-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多