Overview
Thetuist test command runs tests for your Tuist project. It generates the Xcode workspace if needed, builds the test targets, and executes the tests with comprehensive options for filtering and configuration.
Usage
Options
string
default:"."
The path to the directory that contains the project to be tested.
string
Short form of
--path.boolean
default:"false"
Clean the project before testing it.
boolean
Short form of
--clean.boolean
default:"false"
Don’t persist test results to the server for test selection.
boolean
Short form of
--no-upload.string
Test on a specific device.
string
Short form of
--device.string
Test on a specific platform (iOS, macOS, tvOS, visionOS, watchOS).
string
Test with a specific version of the OS.
string
Short form of
--os.boolean
default:"false"
Append arch=x86_64 to the destination to run the simulator in Rosetta mode.
string
The configuration to be used when testing the scheme (e.g., Debug, Release).
string
Short form of
--configuration.boolean
default:"false"
Skip testing UI Tests targets.
boolean
default:"false"
Skip testing Unit Tests targets.
string
Path where test result bundle will be saved.
string
Short form of
--result-bundle-path.string
The test plan to run.
string[]
The list of test identifiers you want to test. Expected format is
TestTarget[/TestClass[/TestMethod]]. Applied before --skip-testing.string[]
The list of test identifiers you want to skip testing. Expected format is
TestTarget[/TestClass[/TestMethod]].string[]
The list of test plan configurations you want to test. Applied before
--skip-configuration.string[]
The list of test plan configurations you want to skip testing.
boolean
default:"false"
Ignore binary cache and use sources only.
boolean
default:"false"
Run all tests without using selective testing. By default, Tuist only runs tests affected by code changes.
boolean
default:"false"
Generate the project and skip testing. Useful for debugging purposes.
boolean
default:"false"
Run the tests without building first.
boolean
default:"false"
Build the tests but don’t run them.
boolean
default:"false"
Disable the quarantine feature and run tests regardless of whether they are quarantined on the server.
Arguments
string
The scheme to be tested. By default, it tests all the testable targets of the project in the current directory.
string[]
Arguments after
-- are passed through to xcodebuild. Example: tuist test -- -destination 'platform=iOS Simulator,name=iPhone 15' -parallel-testing-enabled YESExamples
Run all tests
Test specific scheme
MyAppTests scheme.
Clean test
MyAppTests scheme.
Test on specific device
Skip UI tests
Test specific test cases
testValidLogin method in the LoginTests class.
Save test results
./TestResults.
Run with test plan
Disable selective testing
Selective testing
By default, Tuist uses selective testing to run only the tests affected by code changes. This significantly reduces test execution time in large projects. Use--no-selective-testing to disable this feature and run all tests.
Test quarantine
Tuist can automatically quarantine flaky tests to prevent them from blocking your CI pipeline. Use--skip-quarantine to disable this feature and run all tests including quarantined ones.