您的位置:首页 > 其它

xcode6 命令行运行单元测试unit test

2015-08-14 14:49 302 查看
网上很多信息说xcode4.5版本以后不支持命令行运行unit test。其实这种说法有误。

官方文档:

应用xcodebuild test 命令行运行测试用例

https://developer.apple.com/library/prerelease/ios/documentation/DeveloperTools/Conceptual/testing_with_xcode/A3-command_line_testing.html

根据自己的实际schema配置情况,灵活调整 destination 参数。

如官网示例:

xcodebuild test -project MyAppProject.xcodeproj -scheme MyApp -destination 'platform=OS X,arch=x86_64'

而在我的配置环境下

xcodebuild test -scheme aptTests -destination 'platform=iOS Simulator,name=iPhone 6,OS=8.1'

-project在project当前目录下,且只有一个project文件,是可选参数,可以不写
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: