我所做的只是将项目更新为Xcode 5.现在,当我尝试运行测试时,我收到此错误
if [ "${TEST_AFTER_BUILD}" = "YES" ]; then
Error ${LINENO} "RunUnitTests is obsolete. To run unit tests for your target, use the Test scheme action in the Xcode IDE and the test action in xcodebuild."
Note ${LINENO} "You can remove the Run Script build phase that invokes RunUnitTests from your unit test bundle target."
# Exit with EX_UNAVAILABLE to indicate that this subsystem is unavailable.
exit 69
fi
Error ${LINENO} "RunUnitTests is obsolete. To run unit tests for your target, use the Test scheme action in the Xcode IDE and the test action in xcodebuild."
突出显示为红色。我搜索了这个问题,但找不到任何答案。可能是什么问题,我该如何解决?
答案 0 :(得分:7)
您很可能将构建设置Test After Build设置为YES。 Xcode 5不支持Test After Build构建设置。将Build After Build设置为NO并且错误应该消失。
答案 1 :(得分:2)
使用此命令。
xcodebuild test -scheme <YOUR SCHEME NAME HERE> -destination OS=6.1,name=iPhone
我也用Google搜索并找到这个网站。 http://petosoft.wordpress.com/2013/06/25/running-unit-tests-using-jenkins-and-xcodebuild-on-xcode-5-0/
答案 2 :(得分:1)
TEST_AFTER_BUILD选项成为Xcode 5中的用户定义设置。只需将其删除即可。