xctspawn(1) General Commands Manual xctspawn(1)

xctspawn - Command line utility to execute XCTest unit and UI tests locally on device.

xctspawn /path/to/test_run_file.xctestrun [options]

To run your tests, point the tool at the xctestproducts file or the xctestrun file sitting alongside your built tests. The tool will execute the tests and generate an Xcode result bundle containing the test results (pass/fail/skipped/xfail status, activities, attachments, crash reports, etc.). Note that the tests must be built for the platform you are running them on.

If this tool is interrupted via SIGINT while tests are still executing, it will still generate a result bundle containing the test results that have been produced so far.

Location that the generated result bundle should be placed. By default, the result bundle is emitted to the current working directory.
A path to a file or socket where events will be emitted during test execution. Events include "suite started", "suite finished", "test started", "test finished", etc. The events are JSON-formatted XCResultKit types. For more information about the event stream, see https://confluence.sd.apple.com/display/DT/Using+xcodebuild%27s+event+stream
Constrains testing by specifying test configurations to include, and excluding other test configurations.
Constrains testing by specifying test configurations to exclude, but including other test configurations.
Constrains testing by specifying tests to include, and excluding other tests. The test identifier takes the form `TestTargetName[/TestClassName][/TestMethodName]`, e.g. `MyTestTarget/MyTestClass/testFoo` (ObjC) or `MyTestTarget/MyTestClass/testFoo()` (Swift).
Constrains testing by specifying tests to exclude, but including other tests. The test identifier takes the form `TestTargetName[/TestClassName][/TestMethodName]`, e.g. `MyTestTarget/MyTestClass/testFoo` (ObjC) or `MyTestTarget/MyTestClass/testFoo()` (Swift).
Specifies which test plan in the xctestproducts to run.
Overrides the per-target setting in the scheme/test plan.
The exact number of test runners that will be spawned during parallel testing.
The maximum number of test runners that will be spawned during parallel testing.
Enable or disable test timeout behavior.
The default execution time an individual test is given to execute, if test timeouts are enabled.
The maximum execution time an individual test is given to execute, regardless of the test's preferred allowance.
Whether to collect a ktrace/artrace file during the execution of performance tests.
Whether to collect a memgraphset file during the execution of performance tests.
The path to a performance test configuration file that controls how performance tests are executed.
The number of times to execute each test, or, if either --run-tests-until-failure or --retry-tests-on-failure are specified, the maximum number of times each test will be executed.
Run each test until it fails, up until a maximum number of iterations. The maximum defaults to 100, but can be customized via the --test-iterations option.
Re-run a failing test until it succeeds, up until a maximum number of iterations. The maximum defaults to 3, but can be customized via the --test-iterations option.
Enable or disable tests repeating in a new process for each repetition. Must be used in conjunction with --test-iterations, --retry-tests-on-failure, or --run-tests-until-failure. If not specified, tests will repeat in the same process.
Don't install an app (either a test runner app or a UI target app) from the build products if there is already a copy of the app installed on the system. If there isn't a copy on the system, the app will still be installed.
If the tests were built with code coverage enabled, this option will skip the generation of a coverage report.
A command-line argument to supply to any test runner process that is launched during test execution. Can be specified multiple times.
A key-value pair of the form EnvVar=Value to supply as an environment variable to any test runner process that is launched during test execution.
If specified, the set of tests that would normally execute will instead be listed/enumerated, and the list of tests will be output to either stdout (the default), or to a file whose location is specified via the --test-enumeration-output-path option. The format of the list of tests is controlled via the --test-enumeration-style and --test-enumeration-format options.
Whether tests should be enumerated in a hierarchical organization (the default), meaning grouped by test plan, target, and class, or as a flat list of test identifiers that can subsequently be passed to the --skip-testing and --only-testing options.
Whether tests should be enumerated as human-readable text (the default), or as machine-parseable JSON.
Specifies a file path where the list of tests computed by the --enumerate-tests option will be written to disk. If - is supplied, the data will be written to stdout (which is also the default if this option is omitted).
2021 Apple Inc.