您的位置:首页 > 其它

XCTools

2015-05-04 17:17 92 查看

安装

安装很简单首先安装Homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"[/code] 
然后安装

brew install xctool


使用

文档

usage: xctool [BASE OPTIONS] [ACTION [ACTION ARGUMENTS]] ...

Examples:
xctool [BASE OPTIONS] clean
xctool [BASE OPTIONS] build
xctool [BASE OPTIONS] build-tests [-only TARGET] [-skip-deps]
xctool [BASE OPTIONS] run-tests [-test-sdk SDK] [-only SPEC] [-freshSimulator] [-resetSimulator] [-freshInstall] [-parallelize] [-logicTestBucketSize N] [-appTestBucketSize N] [-bucketBy BUCKETBY] [-failOnEmptyTestBundles] [-listTestsOnly] [-targetedDeviceFamily FAMILY] [-testTimeout N] [-logicTest BUNDLE] [-appTest BUNDLE:HOST_APP]
xctool [BASE OPTIONS] test [-test-sdk SDK] [-only SPEC] [-skip-deps] [-freshSimulator] [-resetSimulator] [-freshInstall] [-parallelize] [-failOnEmptyTestBundles] [-logicTestBucketSize N] [-appTestBucketSize N] [-bucketBy BUCKETBY] [-listTestsOnly] [-testTimeout N]
xctool [BASE OPTIONS] archive [-archivePath PATH]
xctool [BASE OPTIONS] analyze [-only TARGET] [-skip-deps] [-failOnWarnings]
xctool [BASE OPTIONS] install

Base Options:
-help                      show help
-workspace PATH            path to workspace
-project PATH              path to project
-scheme NAME               scheme to use for building or testing
-resultBundlePath PATH     path to bundle to write results from performing a build action
-find-target TARGET        Search for the workspace/project/scheme to build the target
-find-target-path PATH     Path to search for -find-target.
-find-target-exclude-paths Colon-separated list of paths to exclude for -find-target.
-sdk VERSION               sdk to use for building (e.g. 6.0, 6.1)
-configuration NAME        configuration to use (e.g. Debug, Release)
-destination DESTINATION   use the destination described by DESTINATION (a comma-separated set of key=value pairs describing the destination to use)
-destination-timeout DESTINwait for TIMEOUT seconds while searching for the destination device
-jobs NUMBER               number of concurrent build operations to run
-arch ARCH                 arch to build for (e.g. i386, armv7)
-toolchain PATH            path to toolchain
-xcconfig PATH             path to an xcconfig
-reporter TYPE[:FILE]      add reporter
-showBuildSettings         display a list of build settings and values
-showTasks                 show all tasks being spawned by xctool
-version                   print version and exit
-derivedDataPath PATH      override the default derived data path
-launch-timeout TIMEOUT    simulator launch timeout in seconds (default is 30 seconds)
SETTING=VALUE              Set the build 'setting' to 'value'
-DEFAULT=VALUE             Set the user default 'default' to 'value'

Available Reporters:
json-compilation-database
json-stream
junit
phabricator
plain
pretty
teamcity
user-notifications

Options for 'build-tests' action:
-only TARGET               build only a specific test TARGET
-skip-deps                 Only build the target, not its dependencies

Options for 'run-tests' action:
-test-sdk SDK              SDK to test with
-only SPEC                 SPEC is TARGET[:Class/case[,Class2/case2]]
-freshSimulator            Start fresh simulator for each application test target
-resetSimulator            Reset simulator content and settings and restart it before running every app test run.
-freshInstall              Use clean install of TEST_HOST for every app test run
-parallelize               Parallelize execution of tests
-logicTestBucketSize N     Break logic test bundles in buckets of N test cases.
-appTestBucketSize N       Break app test bundles in buckets of N test cases.
-bucketBy BUCKETBY         Either 'case' (default) or 'class'.
-failOnEmptyTestBundles    Fail when an empty test bundle was run.
-listTestsOnly             Skip actual test running and list them only.
-targetedDeviceFamily FAMILTarget specific type of simulator when running tests (1=iPhone, 2=iPad, 4=Apple Watch)
-testTimeout N             Force individual test cases to be killed after specified timeout.
-logicTest BUNDLE          Add a path
865b
to a logic test bundle to run
-appTest BUNDLE:HOST_APP   Add a path to an app test bundle with the path to its host app

Options for 'test' action:
-test-sdk SDK              SDK to test with
-only SPEC                 SPEC is TARGET[:Class/case[,Class2/case2]]
-skip-deps                 Only build the target, not its dependencies
-freshSimulator            Start fresh simulator for each application test target
-resetSimulator            Reset simulator content and settings and restart it before running every app test run.
-freshInstall              Use clean install of TEST_HOST for every app test run
-parallelize               Parallelize execution of tests
-failOnEmptyTestBundles    Fail when an empty test bundle was run.
-logicTestBucketSize N     Break logic test bundles in buckets of N test cases.
-appTestBucketSize N       Break app test bundles in buckets of N test cases.
-bucketBy BUCKETBY         Either 'case' (default) or 'class'.
-listTestsOnly             Skip actual test running and list them only.
-testTimeout N             Force individual test cases to be killed after specified timeout.

Options for 'archive' action:
-archivePath PATH          PATH where created archive will be placed.

Options for 'analyze' action:
-only TARGET               only analyze selected targets, can be used more than once.
If this option is specified, its dependencies are assumed to be built.
-skip-deps                 Skip initial build of the scheme
-failOnWarnings            Fail builds if analyzer warnings are found
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  XCTool