Skip to content

cargo-nextest 0.9.86

Compare
Choose a tag to compare
@github-actions github-actions released this 12 Dec 20:36
· 47 commits to main since this release

This is a substantial release with several new features. It's gone through a
period of beta testing, but if you run into issues please file a bug!

Added

Interactive test state querying

Test state can now be queried interactively, via any of the following means:

  • Typing in t in an interactive terminal.
  • Pressing Ctrl-T, on macOS and other BSD-based platforms where the SIGINFO signal
    is available and recognized by the terminal driver. (SIGINFO will be supported on
    illumos once an upstream Tokio issue is fixed.)
  • On Unix platforms, sending the nextest process the SIGUSR1 signal.

This command shows a list of all tests currently running, along with their
status, how long they've been running, and currently-captured standard output
and standard error.

Processing the t key requires alterations to the terminal, which may lead to
issues in rare circumstances. To disable input key handling, pass in
--no-input-handler.

--max-fail runner option

The new --max-fail option allows you to specify the maximum number of test
failures before nextest stops running tests. This is an extension of the
existing --fail-fast and --no-fail-fast options, and is meant to allow users
to strike a balance between running all tests and stopping early.

  • --fail-fast is equivalent to --max-fail=1.
  • --no-fail-fast is equivalent to --max-fail=all.

Configuration for --max-fail will be added in a future release (#1944).

Thanks to AJamesyD for your first contribution!

Extra arguments to the test binary

You can now pass in extra arguments to the test binary at runtime, via the
run-extra-args configuration option. In combination with a custom test harness
like libtest-mimic, this can be used to run tests on the main thread of the
process.

For more information, see Passing in extra arguments.

Setup scripts in JUnit output

Setup scripts are now represented in the JUnit output. For more information, see
Setup scripts in JUnit output.

Changed

Tokio task per test

Each test now has a separate Tokio task associated with it. This leads to
greater reliability (each test's task can now panic independently), and is
faster in repos with many small tests.

For example, in one test done against
clap-rs/clap on Linux, the time reported by
cargo nextest run goes down from 0.36 seconds to 0.23 seconds.

UI refresh

Several minor improvements to the user interface:

  • The progress bar and other UI elements use Unicode characters if available.
  • Pressing Ctrl-C twice now prints out a "Killing" message.
  • Some more minor improvements that should lead to a more cohesive user experience.

MSRV update

The MSRV for compiling nextest is now Rust 1.81. (The MSRV for running tests
remains unchanged.)

Fixed

  • Fixed a bug where pressing two Ctrl-Cs in succession would not SIGKILL any running tests.

  • junit.store-success-output now works correctly—previously, storage of output is disabled unconditionally.

  • In JUnit output, the testsuite elements are now listed in the order they are first seen (IndexMap), rather than in random order (HashMap).

  • When adding extra files to an archive, nextest now ignores empty and .
    path components in the specification while joining the specified path. This
    normalizes paths, meaning that archives won't accidentally get duplicated entries.

  • Update idna to address RUSTSEC-2024-0421. Since nextest only accesses
    domains that do not use punycode, we disable that support entirely.

  • Nextest now supports being run in Cargo setups where the Cargo.toml that
    defines the workspace is not hierarchically above the workspace members. This is
    an uncommon setup, but it is supported by Cargo—and now by nextest as well.

    Thanks to PegasusPlusUS for your first
    contribution!

  • If an I/O error occurs waiting for a test process to finish, standard output
    and standard error are now displayed correctly.