无法通过xcodebuild从命令行执行测试 [英] Unable to execute tests from command line via xcodebuild

查看:117
本文介绍了无法通过xcodebuild从命令行执行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用iOS测试用例的命令行构建和运行测试用例。
我给出了以下命令:

I am trying to build and run test cases using command line for iOS test cases. I have given the following command:

xcodebuild -target AppEngineTests -configuration Debug -sdk iphonesimulator TEST_AFTER_BUILD=YES clean build

它构建应用程序,但不运行测试用例。

It builds the app but the testcases are not run.

有人可以帮忙吗?
谢谢

could someone please help? Thanks

推荐答案

我找到了名称属性要求更多规范。

I've found the name property to require more specification.

xcodebuild test -workspace #{WORKSPACE_FILE} -scheme #{TEST_SCHEME} -destination 'platform=iOS Simulator,name=iPhone Retina (4-inch),OS=7.0'

最终对我有用。 iPhone 有限和/或无法预测。

Was what finally worked for me. iPhone was limited and/or unpredictable.

作为另一张海报(找不到引文), 'platform'松散地对应于目标列表中的分隔符,'name'对应于子选择, OS 参数对应于vv的右侧相同的列表减去'iOS'。

As another poster (can't find the citation) mentioned, the 'platform' loosely corresponds to the divider in the target list, 'name' corresponds to the sub-selection, and the OS parameter corresponds to the right side of the chevron in the same list minus 'iOS '.

不幸的是,文档具有启发性,乍看之下听起来很权威而实际上并不完整或正确。

The documentation is suggestive and sounds authoritative on first glance without actually being full or correct, unfortunately.

令人惊讶的是这是多么麻烦。一旦实现正确的调用,它的效果如何。

Astonishing what a hassle this was. And how well it worked once the right invocation was achieved.

这篇关于无法通过xcodebuild从命令行执行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆