XCode TestPlan:指定从命令行使用哪个配置



我在XCode项目的测试计划中有一些配置,默认情况下,执行UI测试将执行所有配置,但对于某些需求,我需要根据CI上的某些条件排除一两个配置,我发现我可以指定要执行的方案或测试计划,但是是否有一种方法可以从命令行指定要包含或排除哪些测试计划配置?谢谢!

您可以这样传递配置:

$> 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
...

相关内容

  • 没有找到相关文章

最新更新