Struct nextest_runner::config::NextestConfig[][src]

pub struct NextestConfig { /* fields omitted */ }
Expand description

Overall configuration for nextest.

This is the root data structure for nextest configuration. Most runner-specific configuration is managed through profiles, obtained through the profile method.

Implementations

The default location of the config within the path: .config/nextest.toml, used to read the config from the given directory.

Contains the default config as a TOML file.

The default rules included with this copy of nextest-runner are:

# 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]
# "retries" defines the number of times a test should be retried. If set to a non-zero value, tests that
# succeed on a subsequent attempt will be marked as non-flaky. Can be overridden through the `--retries`
# option.
retries = 0

# Show these test statuses in the output.
#
# The possible values this can take are:
# * none: no output
# * fail: show failed (including exec-failed) tests
# * retry: show flaky and retried tests
# * slow: show slow tests
# * pass: show passed tests
# * skip: show skipped tests (most useful for CI)
# * all: all of the above
#
# Each value includes all the values above it; for example, "slow" includes failed and retried
# tests.
#
# Can be overridden through the `--status-level` flag.
status-level = "pass"

# "failure-output" defines when test failures are output to standard output. Accepted values are
# * "immediate": output failures as soon as they happen
# * "final": output failures at the end of the test run
# * "immediate-final": output failures as soon as they happen and at the end of the test run
# * "never": don't output failures at all
#
# For large test suites and CI it is generally useful to use "immediate-final".
#
# Can be overridden through the `--failure-output` option.
failure-output = "immediate"

# "success-output" controls output on success. This should generally be set to "never".
success-output = "never"

# Cancel the test run on the first failure. For CI runs, consider setting this to false.
fail-fast = true

# Treat a test that takes longer than this as slow, and print a message.
slow-timeout = "60s"

[profile.default.junit]
# Output a JUnit report into the given file inside 'store.dir/<profile-name>'. If unspecified, JUnit
# is not written out.
# path = "junit.xml"

# The name of the top-level "report" element in JUnit report. If aggregating reports across different
# test runs, it may be useful to provide separate names for each report.
report-name = "nextest-run"

Repository-specific configuration is layered on top of the default config.

Environment configuration uses this prefix, plus a _.

The name of the default profile.

Reads the nextest config from the given file, or if not specified from .config/nextest.toml in the given directory.

If the file isn’t specified and the directory doesn’t have .config/nextest.toml, uses the default config options.

Returns the default nextest config.

Returns the profile with the given name, or an error if a profile was specified but not found.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Set the foreground color generically Read more

Set the background color generically. Read more

Change the foreground color to black

Change the background color to black

Change the foreground color to red

Change the background color to red

Change the foreground color to green

Change the background color to green

Change the foreground color to yellow

Change the background color to yellow

Change the foreground color to blue

Change the background color to blue

Change the foreground color to magenta

Change the background color to magenta

Change the foreground color to purple

Change the background color to purple

Change the foreground color to cyan

Change the background color to cyan

Change the foreground color to white

Change the background color to white

Change the foreground color to the terminal default

Change the background color to the terminal default

Change the foreground color to bright black

Change the background color to bright black

Change the foreground color to bright red

Change the background color to bright red

Change the foreground color to bright green

Change the background color to bright green

Change the foreground color to bright yellow

Change the background color to bright yellow

Change the foreground color to bright blue

Change the background color to bright blue

Change the foreground color to bright magenta

Change the background color to bright magenta

Change the foreground color to bright purple

Change the background color to bright purple

Change the foreground color to bright cyan

Change the background color to bright cyan

Change the foreground color to bright white

Change the background color to bright white

Make the text bold

Make the text dim

Make the text italicized

Make the text italicized

Make the text blink

Make the text blink (but fast!)

Swap the foreground and background colors

Hide the text

Cross out the text

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more

Set the foreground color to a specific RGB value.

Set the background color to a specific RGB value.

Sets the foreground color to an RGB value.

Sets the background color to an RGB value.

Apply a runtime-determined style

Apply a given transformation function to all formatters if the given stream supports at least basic ANSI colors, allowing you to conditionally apply given styles/colors. Read more

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.