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
The path to the directory that contains the project to be tested.
Short form of
--path.Clean the project before testing it.
Short form of
--clean.Don’t persist test results to the server for test selection.
Short form of
--no-upload.Test on a specific device.
Short form of
--device.Test on a specific platform (iOS, macOS, tvOS, visionOS, watchOS).
Test with a specific version of the OS.
Short form of
--os.Append arch=x86_64 to the destination to run the simulator in Rosetta mode.
The configuration to be used when testing the scheme (e.g., Debug, Release).
Short form of
--configuration.Skip testing UI Tests targets.
Skip testing Unit Tests targets.
Path where test result bundle will be saved.
Short form of
--result-bundle-path.The test plan to run.
The list of test identifiers you want to test. Expected format is
TestTarget[/TestClass[/TestMethod]]. Applied before --skip-testing.The list of test identifiers you want to skip testing. Expected format is
TestTarget[/TestClass[/TestMethod]].The list of test plan configurations you want to test. Applied before
--skip-configuration.The list of test plan configurations you want to skip testing.
Ignore binary cache and use sources only.
Run all tests without using selective testing. By default, Tuist only runs tests affected by code changes.
Generate the project and skip testing. Useful for debugging purposes.
Run the tests without building first.
Build the tests but don’t run them.
Disable the quarantine feature and run tests regardless of whether they are quarantined on the server.
Arguments
The scheme to be tested. By default, it tests all the testable targets of the project in the current directory.
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.