Xcode 5 Product -> Test 显示为灰色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23901615/
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
Xcode 5 Product -> Test is grayed out
提问by Boon
My Xcode 5 Product -> Test is grayed out but I can still run my unit tests directly by clicking play from the Test Navigator.
我的 Xcode 5 Product -> Test 是灰色的,但我仍然可以通过单击 Test Navigator 中的 play 直接运行我的单元测试。
Any idea what's causing Product -> Test to gray out?
知道是什么导致 Product -> Test 变灰吗?
采纳答案by matt
It's because the Scheme is incorrectly configured (for the Test action). Set the test target and check those checkboxes.
这是因为 Scheme 配置不正确(对于 Test 操作)。设置测试目标并选中这些复选框。
回答by spfursich
For me, the issue was that my scheme didn't have the test project listed. Go to Product->Scheme->Edit Scheme then choose Test on the left, and add the tests to this scheme.
对我来说,问题是我的方案没有列出测试项目。转到 Product->Scheme->Edit Scheme 然后选择左侧的 Test,并将测试添加到此方案中。