单元测试在 Xcode 8 中失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39589409/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unit Test fails in Xcode 8
提问by Vision Mkhabela
I get this error message every time I run my unit tests in Xcode 8
每次在 Xcode 8 中运行单元测试时都会收到此错误消息
Validation for xctestrun file failed:
(
"For these test runs, UITargetAppPath should be provided"
)
回答by yurgis
Go to each of your test targets (e.g. MyProjectTests and MyProjectUITests) in the project settings and select "None" for the "Target Application" dropdown. Then reselect your Target Application back for the same targets. This should reset the test targets and make XCode less confused.
转到项目设置中的每个测试目标(例如 MyProjectTests 和 MyProjectUITests),然后在“目标应用程序”下拉列表中选择“无”。然后为相同的目标重新选择您的目标应用程序。这应该重置测试目标并使 XCode 不那么混乱。
回答by Abdulrahman Masoud
close your Xcode and open it again it's working with me
关闭您的 Xcode 并再次打开它,它正在与我合作