尝试使用 Xcode 的新 UI 测试运行多个测试失败 [英] Attempting to run multiple tests using Xcode's new UI testing fails

查看:73
本文介绍了尝试使用 Xcode 的新 UI 测试运行多个测试失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在新的 Xcode 测试版中同时运行多个 UI 测试时,它在第一次测试后失败,并在第一次之后的每个测试中出现错误UI 测试失败:应用程序状态仍未终止".有没有人解决这个问题?

When I try to run multiple UI tests at the same time in the new Xcode beta, it fails after the first test, with the error "UI Testing Failure: App state is still not terminated" for each test after the first. Anyone got a fix for this?

推荐答案

您是否包含了一个

functearDown(){super.tearDown()}

功能?

每次测试后都需要终止应用程序状态,然后再重新初始化

It's needed to terminate the app state after each test before it is re-initialized by the

func setUp() {super.setUp();XCUIApplication().launch}

这篇关于尝试使用 Xcode 的新 UI 测试运行多个测试失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆