tuist test run
Tests a project
Arguments#
scheme Optional#
Environment variable TUIST_TEST_SCHEME
The scheme to be tested. By default it tests all the testable targets of the project in the current directory.
tuist test run [scheme]
clean Optional#
Environment variable TUIST_TEST_CLEAN
When passed, it cleans the project before testing it.
tuist test run --clean
tuist test run -c
no-clean Optional#
Environment variable TUIST_TEST_CLEAN
When passed, it cleans the project before testing it.
tuist test run --no-clean
no-upload Optional#
Environment variable TUIST_TEST_NO_UPLOAD
When passed, the result necessary for test selection is not persisted to the server.
tuist test run --no-upload
tuist test run -n
no-no-upload Optional#
Environment variable TUIST_TEST_NO_UPLOAD
When passed, the result necessary for test selection is not persisted to the server.
tuist test run --no-no-upload
path Optional#
Environment variable TUIST_TEST_PATH
The path to the directory that contains the project to be tested.
tuist test run --path [path]
tuist test run -p [path]
device Optional#
Environment variable TUIST_TEST_DEVICE
Test on a specific device.
tuist test run --device [device]
tuist test run -d [device]
platform Optional#
Environment variable TUIST_TEST_PLATFORM
Test on a specific platform.
tuist test run --platform [platform]
os Optional#
Environment variable TUIST_TEST_OS
Test with a specific version of the OS.
tuist test run --os [os]
tuist test run -o [os]
destination Optional#
Environment variable TUIST_TEST_DESTINATION
Destinations to use cached binaries for: all, simulator, or device. Native macOS targets remain supported. 'device' requires a device -destination after the terminator (--).
tuist test run --destination [destination]
rosetta Optional#
Environment variable TUIST_TEST_ROSETTA
When passed, append arch=x86_64 to the 'destination' to run simulator in a Rosetta mode.
tuist test run --rosetta
no-rosetta Optional#
Environment variable TUIST_TEST_ROSETTA
When passed, append arch=x86_64 to the 'destination' to run simulator in a Rosetta mode.
tuist test run --no-rosetta
configuration Optional#
Environment variable TUIST_TEST_CONFIGURATION
The configuration to be used when testing the scheme.
tuist test run --configuration [configuration]
tuist test run -C [configuration]
skip-ui-tests Optional#
Environment variable TUIST_TEST_SKIP_UITESTS
When passed, it skips testing UI Tests targets.
tuist test run --skip-ui-tests
no-skip-ui-tests Optional#
Environment variable TUIST_TEST_SKIP_UITESTS
When passed, it skips testing UI Tests targets.
tuist test run --no-skip-ui-tests
skip-unit-tests Optional#
Environment variable TUIST_TEST_SKIP_UNITTESTS
When passed, it skips testing Unit Tests targets.
tuist test run --skip-unit-tests
no-skip-unit-tests Optional#
Environment variable TUIST_TEST_SKIP_UNITTESTS
When passed, it skips testing Unit Tests targets.
tuist test run --no-skip-unit-tests
result-bundle-path Optional#
Environment variable TUIST_TEST_RESULT_BUNDLE_PATH
Path where test result bundle will be saved.
tuist test run --result-bundle-path [result-bundle-path]
tuist test run -T [result-bundle-path]
coverage-output-path Optional#
Environment variable TUIST_TEST_COVERAGE_OUTPUT_PATH
Directory where each run's code coverage will be saved as LCOV (<result bundle name>.lcov), with repository-relative paths. Requires coverage uploads.
tuist test run --coverage-output-path [coverage-output-path]
run-report-path Optional#
Environment variable TUIST_RUN_REPORT_PATH
Path where a JSON report of the run, including the dashboard URLs, will be saved.
tuist test run --run-report-path [run-report-path]
derived-data-path Optional Deprecated#
Environment variable TUIST_TEST_DERIVED_DATA_PATH
Overrides the folder that should be used for derived data when testing a project.
tuist test run --derived-data-path [derived-data-path]
retry-count Optional Deprecated#
Environment variable TUIST_TEST_RETRY_COUNT
Tests will retry <number> of times until success. Example: if 1 is specified, the test will be retried at most once, hence it will run up to 2 times.
tuist test run --retry-count [retry-count]
test-plan Optional#
Environment variable TUIST_TEST_TEST_PLAN
The test plan to run.
tuist test run --test-plan [test-plan]
test-targets Optional#
Environment variable TUIST_TEST_TEST_TARGETS
The list of test identifiers you want to test. Expected format is TestTarget[/TestClass[/TestMethod]] or tag:tagName[/TestClass[/TestMethod]] using target metadata tags. It is applied before --skip-test-targets.
tuist test run --test-targets [test-targets]
skip-test-targets Optional#
Environment variable TUIST_TEST_SKIP_TEST_TARGETS
The list of test identifiers you want to skip testing. Expected format is TestTarget[/TestClass[/TestMethod]] or tag:tagName[/TestClass[/TestMethod]] using target metadata tags.
tuist test run --skip-test-targets [skip-test-targets]
filter-configurations Optional#
Environment variable TUIST_TEST_CONFIGURATIONS
The list of configurations you want to test. It is applied before --skip-configuration
tuist test run --filter-configurations [filter-configurations]
skip-configurations Optional#
Environment variable TUIST_TEST_SKIP_CONFIGURATIONS
The list of configurations you want to skip testing.
tuist test run --skip-configurations [skip-configurations]
binary-cache Optional#
Environment variable TUIST_TEST_BINARY_CACHE
Ignore binary cache and use sources only.
tuist test run --binary-cache
no-binary-cache Optional#
Environment variable TUIST_TEST_BINARY_CACHE
Ignore binary cache and use sources only.
tuist test run --no-binary-cache
selective-testing Optional#
Environment variable TUIST_TEST_SELECTIVE_TESTING
When --no-selective-testing is passed, tuist runs all tests without using selective testing.
tuist test run --selective-testing
no-selective-testing Optional#
Environment variable TUIST_TEST_SELECTIVE_TESTING
When --no-selective-testing is passed, tuist runs all tests without using selective testing.
tuist test run --no-selective-testing
generate-only Optional#
Environment variable TUIST_TEST_GENERATE_ONLY
When passed, it generates the project and skips testing. This is useful for debugging purposes.
tuist test run --generate-only
no-generate-only Optional#
Environment variable TUIST_TEST_GENERATE_ONLY
When passed, it generates the project and skips testing. This is useful for debugging purposes.
tuist test run --no-generate-only
without-building Optional#
Environment variable TUIST_TEST_WITHOUT_BUILDING
When passed, run the tests without building.
tuist test run --without-building
no-without-building Optional#
Environment variable TUIST_TEST_WITHOUT_BUILDING
When passed, run the tests without building.
tuist test run --no-without-building
build-only Optional#
Environment variable TUIST_TEST_BUILD_ONLY
When passed, build the tests, but don't run them
tuist test run --build-only
no-build-only Optional#
Environment variable TUIST_TEST_BUILD_ONLY
When passed, build the tests, but don't run them
tuist test run --no-build-only
skip-quarantine Optional#
Environment variable TUIST_TEST_SKIP_QUARANTINE
When passed, the quarantine feature is disabled and tests run regardless of whether they are quarantined on the server.
tuist test run --skip-quarantine
no-skip-quarantine Optional#
Environment variable TUIST_TEST_SKIP_QUARANTINE
When passed, the quarantine feature is disabled and tests run regardless of whether they are quarantined on the server.
tuist test run --no-skip-quarantine
shard-max Optional#
Environment variable TUIST_TEST_SHARD_MAX
Maximum number of shards to distribute tests across.
tuist test run --shard-max [shard-max]
shard-min Optional#
Environment variable TUIST_TEST_SHARD_MIN
Minimum number of shards.
tuist test run --shard-min [shard-min]
shard-total Optional#
Environment variable TUIST_TEST_SHARD_TOTAL
Exact number of shards (mutually exclusive with --shard-min/--shard-max). With suite granularity, the final shard is the catch-all.
tuist test run --shard-total [shard-total]
shard-max-duration Optional#
Environment variable TUIST_TEST_SHARD_MAX_DURATION
Target maximum duration per shard in milliseconds.
tuist test run --shard-max-duration [shard-max-duration]
shard-granularity Optional#
Environment variable TUIST_TEST_SHARD_GRANULARITY
Sharding granularity level: module (default) or suite.
tuist test run --shard-granularity [shard-granularity]
shard-reference Optional#
Environment variable TUIST_SHARD_REFERENCE
Explicit shard reference. Derived from environment variables for supported CI providers.
tuist test run --shard-reference [shard-reference]
shard-plan-id Optional#
Environment variable TUIST_SHARD_PLAN_ID
Exact shard plan identifier emitted by the build-only job.
tuist test run --shard-plan-id [shard-plan-id]
shard-skip-upload Optional#
Environment variable TUIST_TEST_SHARD_SKIP_UPLOAD
Skip uploading test products to remote storage. Use when you provide test products to shard runners yourself, for example via shared volumes.
tuist test run --shard-skip-upload
no-shard-skip-upload Optional#
Environment variable TUIST_TEST_SHARD_SKIP_UPLOAD
Skip uploading test products to remote storage. Use when you provide test products to shard runners yourself, for example via shared volumes.
tuist test run --no-shard-skip-upload
shard-archive-path Optional#
Environment variable TUIST_TEST_SHARD_ARCHIVE_PATH
Path to a locally managed shard archive. In build-for-testing mode Tuist writes the optimized archive there; in shard execution mode Tuist extracts it instead of downloading test products from remote storage.
tuist test run --shard-archive-path [shard-archive-path]
shard-index Optional#
Environment variable TUIST_SHARD_INDEX
The zero-based shard index to execute.
tuist test run --shard-index [shard-index]
stress-new-tests Optional#
Environment variable TUIST_TEST_STRESS_NEW_TESTS
Rerun the test cases this branch adds, priced by duration, and flag any that prove flaky. 'report' warns; 'enforce' fails the run on a flaky test case. Off when omitted.
tuist test run --stress-new-tests [stress-new-tests]
snapshots Optional#
Environment variable TUIST_TEST_SNAPSHOTS
Export the images your SwiftUI previews render with the tuist/snapshots library (TEST_RUNNER_SNAPSHOTS_EXPORT_DIR) and upload them to Tuist after the run, which compares them with their baseline and fails the run when they changed and nobody approved the changes. On by default in CI for projects connected to Tuist; a run that renders no images uploads nothing. Pass --snapshots to also upload from a local run, or --no-snapshots to turn it off.
tuist test run --snapshots
no-snapshots Optional#
Environment variable TUIST_TEST_SNAPSHOTS
Export the images your SwiftUI previews render with the tuist/snapshots library (TEST_RUNNER_SNAPSHOTS_EXPORT_DIR) and upload them to Tuist after the run, which compares them with their baseline and fails the run when they changed and nobody approved the changes. On by default in CI for projects connected to Tuist; a run that renders no images uploads nothing. Pass --snapshots to also upload from a local run, or --no-snapshots to turn it off.
tuist test run --no-snapshots
snapshot-set Optional#
Environment variable TUIST_TEST_SNAPSHOT_SET
The snapshot set the uploaded snapshot images belong to, such as 'ios-iphone': builds are compared within a set. Defaults to the scheme.
tuist test run --snapshot-set [snapshot-set]
inspect-mode Optional#
Environment variable TUIST_INSPECT_TEST_MODE
Inspect mode: 'local' parses the xcresult on this machine, 'remote' uploads it for server-side processing, 'off' skips test analysis entirely (no xcresult parsing, archiving, or upload — the Tests dashboard is not populated). When omitted, defaults to 'remote' for tuist-hosted instances and 'local' for self-hosted ones.
tuist test run --inspect-mode [inspect-mode]
passthrough-xcode-build-arguments Optional#
Arguments that will be passed through to xcodebuild. Use -- followed by xcodebuild arguments. Example: tuist test -- -destination 'platform=iOS Simulator,name=iPhone 15' -parallel-testing-enabled YES
tuist test run [passthrough-xcode-build-arguments]