我在我的 iPhone 项目中安装并运行了 KIF,并且我创建了一堆测试,当我通过 XCode 运行时这些测试完美通过。当我在命令行上使用 xcodebuild 构建相同的项目和目标时,一些从 UIPickerView 中挑选项目的测试以下列方式失败:
2013-02-02 18:46:55.950 SmartRoamAcceptanceTests[31224:c07] PASS (0.84s): Tap view with accessibility label "Choose Country"
2013-02-02 18:46:55.978 SmartRoamAcceptanceTests[31224:c07] FAIL (0.03s): Select the "United States (+1)" item from the picker
2013-02-02 18:46:55.979 SmartRoamAcceptanceTests[31224:c07] FAILING ERROR: Error Domain=KIFTest Code=0 "Failed to find picker view value with title "United States (+1)"" UserInfo=0xd01c160 {NSLocalizedDescription=Failed to find picker view value with title "United States (+1)"}
如果从 XCode IDE 构建,这些测试可以完美运行。有什么不同?