Skip to content

Translation 🌍

You can translate or improve the translation of this page.

Contribute

Test

Tuist provides a command, tuist test to generate the project if needed, and then run the tests with the the platform-specific build tool (e.g. xcodebuild for Apple platforms).

You might wonder what's the value of using tuist test over generating the project with tuist generate and running the tests with the platform-specific build tool.

  • Single command: tuist test ensures the project is generated if needed before compiling the project.
  • Beautified output: Tuist enriches the output using tools like xcbeautify that make the output more user-friendly.
  • It optimizes the build by deterministically reusing the build artifacts from a remote cache.
  • It runs only the tests that need to be run, saving time and resources.
  • Prevent, detect, and fix flaky tests.

Usage

To run the tests of a project, you can use the tuist test command. This command will generate the project if needed, and then run the tests using the platform-specific build tool. We support the use of the -- terminator to forward all subsequent arguments directly to the build tool.

bash
tuist test MyScheme
bash
tuist test --no-binary-cache
bash
tuist test --no-selective-testing

Pull/merge request comments

REQUIREMENTS

To get automatic pull/merge request comments, integrate your remote project with a Git platform.

When running tests in your CI environments we can correlate the test results with the pull/merge request that triggered the CI build. This allows us to post a comment on the pull/merge request with the test results.

GitHub App example

Released under the MIT License.