nextest-runner 0.121.0

Core runner logic for cargo nextest.
Documentation
# This is the default config used by nextest. It is embedded in the binary at
# build time. It may be used as a template for .config/nextest.toml.

[store]
# The directory under the workspace root at which nextest-related files are
# written. Profile-specific storage is currently written to dir/<profile-name>.
dir = "target/nextest"

# This section defines the default nextest profile. Custom profiles are layered
# on top of the default profile.
[profile.default]
# The set of tests run by `cargo nextest run` by default.
default-filter = "all()"

# Retry policy for failed tests. A non-zero value causes tests that pass on a
# subsequent attempt to be marked as flaky. Can be overridden through the
# `--retries` option.
retries = 0

# Whether to treat flaky tests as passing or failing.
flaky-result = "pass"

# Number of threads to run tests with. Either an integer or "num-cpus". Can be
# overridden through the `--test-threads` option.
test-threads = "num-cpus"

# Number of threads (slots) each test reserves from the pool. Generally used in
# overrides to mark certain tests as heavier than others; can also be set as a
# global default.
threads-required = 1

# Extra arguments to pass to test binaries at runtime. Intended primarily for
# communication with custom test harnesses -- use with caution!
run-extra-args = []

# Level of status information to display during test runs.
#
# Can be overridden through the `--status-level` flag.
status-level = "pass"

# Level of status information to display in the final summary. Differs from
# status-level in that it has a separate "flaky" indicator distinct from
# "retry" (though "retry" works as an alias), and in that "skip" is prioritized
# over "pass".
final-status-level = "flaky"

# When to display output for failed tests.
#
# Can be overridden through the `--failure-output` option.
failure-output = "immediate"

# When to display output for successful tests. Generally best left as "never".
success-output = "never"

# Failure handling for the test run.
#
# For CI runs, consider setting this to false.
fail-fast = true

# Treat a test that takes longer than the configured 'period' as slow, and print
# a message. See <https://nexte.st/docs/features/slow-tests> for more
# information.
slow-timeout = { period = "60s", on-timeout = "fail" }

# Time after which benchmarks are considered slow, plus optional termination
# policy. Replaces `slow-timeout` when running `cargo nextest bench`.
# See <https://nexte.st/docs/features/slow-tests> for more information.
#
# Benchmarks have a separate configuration because they are often expected to
# take longer than tests. Defaults to 30 years, which is a large enough value
# to feel "infinite" without running into overflows on various platforms.
bench.slow-timeout = { period = "30y" }

# Global timeout for the entire benchmark run. Replaces `global-timeout` when
# running `cargo nextest bench`.
#
# Benchmarks have a separate configuration because they are often expected to
# take longer than tests. Defaults to 30 years, which is a large enough value
# to feel "infinite" without running into overflows on various platforms.
bench.global-timeout = "30y"

# Treat a test as leaky if after the process is shut down, standard output and
# standard error aren't closed within this duration.
#
# This usually happens in case of a test that creates a child process and lets
# it inherit those handles, but doesn't clean the child process up (especially
# when it fails).
#
# See <https://nexte.st/docs/features/leaky-tests> for more information.
leak-timeout = "200ms"

# Stop all tests after the configured global timeout.
#
# Defaults to 30 years, which is a large enough value to feel "infinite" without
# running into overflows on various platforms.
global-timeout = "30y"

# Extra paths to include in `nextest archive`. The standard build output is
# included automatically; use this to add any non-standard files the tests
# need at runtime.
archive.include = []

[profile.default.junit]
# Path to write the JUnit XML report to, relative to 'store.dir/<profile-name>'.
# If unset, JUnit reporting is disabled.

# path = "junit.xml"

# Name for the JUnit XML report. When aggregating reports across different test
# runs, it may be useful to provide separate names for each report.
report-name = "nextest-run"

# Whether to store successful test output in the JUnit XML report. When true,
# output is stored in the <system-out> and <system-err> elements of the
# <testcase> element.
store-success-output = false

# Whether to store failed test output in the JUnit XML report. When true,
# output is stored in the <system-out> and <system-err> elements of the
# <testcase> element.
#
# Note that if a description can be extracted from the output, it is always
# stored in the <description> element.
store-failure-output = true

# How flaky-fail tests are reported in the JUnit XML report. "failure" reports
# them as failures with <failure> and <flakyFailure> elements; "success"
# reports them as successes, identical to flaky-pass tests.
flaky-fail-status = "failure"

# This profile is activated if MIRI_SYSROOT is set.
[profile.default-miri]