XCode TestPlan:从命令行指定要使用的配置
Posted
技术标签:
【中文标题】XCode TestPlan:从命令行指定要使用的配置【英文标题】:XCode TestPlan: specify which configuration to use from command line 【发布时间】:2021-10-14 00:28:48 【问题描述】:我的XCode项目的测试计划中有一些配置,默认情况下,执行UI测试会执行所有配置,但是对于某些需求我需要在CI上根据某些条件排除一两个,我发现我可以指定要执行什么方案或测试计划,但是有没有办法从命令行指定要包含或排除的测试计划配置?谢谢!
【问题讨论】:
【参考方案1】:你可以像这样传递配置:
$> xcodebuild test -workspace <path>
-scheme <name>
-destination <specifier>
-testPlan <name>
-only-test-configuration <configuration1>
-only-test-configuration <configuration2>
...
或者跳过这样的配置:
$> xcodebuild test -workspace <path>
-scheme <name>
-destination <specifier>
-testPlan <name>
-skip-test-configuration <configuration1>
-skip-test-configuration <configuration2>
...
帮助页面中的相关行:
$> xcodebuild -help
Usage: xcodebuild ...
Options:
-workspace NAME build the workspace NAME
-scheme NAME build the scheme NAME
-destination DESTINATIONSPECIFIER use the destination described by DESTINATIONSPECIFIER (a comma-separated set of key=value pairs describing the destination to use)
-testPlan specifies the name of the test plan associated with the scheme to use for testing
-only-test-configuration constrains testing by specifying test configurations to include, and excluding other test configurations
-skip-test-configuration constrains testing by specifying test configurations to exclude, but including other test configurations
...
【讨论】:
以上是关于XCode TestPlan:从命令行指定要使用的配置的主要内容,如果未能解决你的问题,请参考以下文章
关于jmeter命令行执行.jmx文件出现Error in NonGUIDriver java.lang.RuntimeException: Could not find the TestPlan c
为 Xcode 8.3.x 命令行 .ipa 指定路径/名称?