Struct nextest_runner::config::NextestConfig [−][src]
pub struct NextestConfig { /* fields omitted */ }
Expand description
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.
pub fn from_sources(
workspace_root: impl Into<Utf8PathBuf>,
config_file: Option<&Utf8Path>
) -> Result<Self, ConfigParseError>
pub fn from_sources(
workspace_root: impl Into<Utf8PathBuf>,
config_file: Option<&Utf8Path>
) -> Result<Self, ConfigParseError>
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
Auto Trait Implementations
impl RefUnwindSafe for NextestConfig
impl Send for NextestConfig
impl Sync for NextestConfig
impl Unpin for NextestConfig
impl UnwindSafe for NextestConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
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
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
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
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self> where
Color: DynColor,
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
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Set the foreground color to a specific RGB value.
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
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.
fn if_supports_color<'a, Out, ApplyFn>(
&'a self,
stream: Stream,
apply: ApplyFn
) -> SupportsColorsDisplay<'a, Self, Out, ApplyFn> where
ApplyFn: Fn(&'a Self) -> Out,
fn if_supports_color<'a, Out, ApplyFn>(
&'a self,
stream: Stream,
apply: ApplyFn
) -> SupportsColorsDisplay<'a, Self, Out, ApplyFn> where
ApplyFn: Fn(&'a Self) -> Out,
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