본문으로 바로가기

Rust test insights

Tuist reports the results of cargo nextest run using nextest's test inventory and JUnit report. No Rust dependency or separate Tuist executable is required.

Requirements

Report your test runs#

bash
tuist cargo nextest run --workspace

Keep using your normal nextest arguments, features, filtersets, and profiles:

bash
tuist cargo nextest run --profile ci -E 'test(authentication)'

Tuist adds its JUnit configuration through a nextest tool configuration. Your selected profile and any existing JUnit destination are respected. Existing reports are not deleted; Tuist only uploads a report if it can verify that the invocation wrote a fresh one. Reporting does not alter nextest's exit status.

What is tracked#

  • Per-test status and duration, including reported failures and skipped cases.
  • Failure messages and retry attempts, when present in the JUnit report.
  • The nextest binary ID, Rust module path, and test name.
  • Available branch, commit, CI, and runner metadata.
  • An inventory of discovered tests, separate from the tests actually executed.

Tests omitted after fail-fast are not reported as passing. Discovery alone is not evidence of execution. Nextest runs appear under Tests, not build-duration metrics.

Binaries, modules, and test cases#

Nextest executes test binaries. Each binary contains named tests such as api::authentication::rejects_invalid_token.

The shared dashboard currently calls these levels:

Dashboard labelRust meaningExample
ModulesNextest test binariesstore::test/api
Test SuitesRust module pathsapi::authentication
Test CasesIndividual testsrejects_invalid_token

Binary IDs, not artifact hashes or checkout paths, identify the executable-level units. Test sharding assigns whole binaries, while Rust module paths group test cases for browsing.

Test-case durations describe individual work. Binary and module-path timings use reported execution windows when available, so overlapping tests are not treated as sequential work. They can include scheduling gaps and retry delays. Missing timestamps fall back to a bounded duration estimate and are not used to calibrate shard concurrency.

Plain Cargo tests and doctests#

tuist cargo test remains Cargo/libtest. Tuist never silently converts it into nextest, and it does not produce nextest's per-test telemetry.

Nextest does not execute doctests. Run them separately:

bash
tuist cargo test --doc

Reliability and selection#

Use flaky test detection to investigate unstable tests. Dashboard quarantine state does not currently mute or skip nextest execution. Coverage ingestion and coverage-based test selection are not enabled for Cargo.

Troubleshooting#

If a test run doesn't appear in the dashboard, enable debug output to see why its report wasn't sent:

bash
TUIST_DEBUG=1 tuist cargo nextest run --profile ci

Reporting doesn't change the result of your tests.