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

来源:互联网 发布:网络推广贴吧 编辑:程序博客网 时间:2024/05/16 01:49

网上很多信息说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文件,是可选参数,可以不写

0 0
原创粉丝点击