Xcode 8中的单元测试失败 [英] Unit Test fails in Xcode 8

查看:259
本文介绍了Xcode 8中的单元测试失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次在Xcode 8中运行单元测试时都会收到此错误消息

I get this error message every time I run my unit tests in Xcode 8

Validation for xctestrun file failed:
(
    "For these test runs, UITargetAppPath should be provided"
)


推荐答案

在项目设置中转到每个测试目标(例如MyProjectTests和MyProjectUITests),并为Host Application下拉列表选择None。
然后重新选择您的主机应用程序以获取相同的目标。
这应该重置测试目标并使XCode更少混淆。

Go to each of your test targets (e.g. MyProjectTests and MyProjectUITests) in the project settings and select "None" for the Host Application dropdown. Then reselect your Host Application back for the same targets. This should reset the test targets and make XCode less confused.

这篇关于Xcode 8中的单元测试失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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