PackageTrack
Sign in Get early access

rstest

Rust fixture based test framework. It use procedural macro to implement fixtures and table based tests.

0.26.1 112M downloads/mo #748 most downloaded on crates.io la10736/rstest

What this package is like to depend on

Last release 1 years ago

27 Jul 2025

Ships fairly regularly

a new release about every 3 months

Nearly every release is documented

notes for 38 of 38 stable releases

1 version withdrawn

withdrawn after publishing

8 years old

39 releases · first in 2018

0 releases in the last 12 months

see the full history below

Release timeline

39 releases · Oct 2018 to Jul 2025
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 39
  1. 0.26.1 27 Jul 2025
    Release notes

    Fix Docs

    Full Changelog: v0.26.0...v0.26.1

    Open source →
    Release notes

    Fixed

    • Docs
    Open source →
  2. 0.26.0 26 Jul 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v0.25.0...v0.26.0

    Open source →
    Release notes

    Changed

    • The #[files(...)] attribute now ignores matched directory paths by default. See #306 thanks to @Obito-git.

    Add

    • Introduced the #[dirs] attribute, which can be used with #[files(...)] to explicitly include directory paths. See #306 thanks to @Obito-git.
    • The CI now runs builds and tests on Windows, as well.
    • #[test_attr] to define test attribute explicit and also enable the use of #[macro_rules_attribute::apply(<macro>)]: naw also smol works. See #303 #311 #315 thanks to @coriolinus.

    Fixed

    • Removed unsued trait and impl spotted out on 1.89.0-nightly
    • Add missed tests about ignore attribute's args in rstest expansion. See #313
    • The #[files(...)] attribute now works reliably on Windows.
    • Now global attributes can go everywhere in the list also where case is used
    Open source →
  3. 0.25.0 02 Mar 2025
    Release notes

    What's Changed

    • Append generated test macro so next test macros are aware of it by @kezhuw in #291
    • feat: add include_str and include_bytes file input behaviour by @lucascool12 in #297

    New Contributors

    Full Changelog: v0.24.0...v0.25.0

    Open source →
    Release notes

    Changed

    • Append generated test macro so next test macros are aware of it (see #291 thanks to @kezhuw).

    Add

    • Added a #[mode = ...] attribute to be used with the #[files(...)] attribute to change the way the files get passed to the test. (see #295 thanks to @lucascool12)
    Open source →
  4. 0.24.0 01 Jan 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v0.23.0...v0.24.0

    Open source →
    Release notes

    Changed

    • MSRV to 1.70.0 (see #284 thanks to @rnbguy)

    Add

    • #![no_std] support: now you can use rstest also in no_std lib (see #282 thanks to @rnbguy)
    • #[context] to have test function name and other useful thighs on the tip of your fingers (see #177)
    Open source →
  5. 0.23.0 29 Sep 2024
    Release notes

    What's Changed

    • Upgrade to async-std v1.13 by @jayvdb in #274
    • Allow environment variables in #[files] attributes by @hansl in #277

    New Contributors

    Full Changelog: v0.22.0...v0.23.0

    Open source →
    Release notes

    Add

    • You can now use environment variables in #[files] with an optional default value (see #277).
    • You can now set a base_dir for #[files] with the $[base_dir = "..."] attribute (see #277).
    Open source →
  6. 0.22.0 04 Aug 2024
    Release notes

    Destructuring input data

    Open source →
    Release notes

    Changed

    • Now it's possible destructuring input values both for cases, values and fixtures. See #231 for details

    Add

    • Implemented #[ignore] attribute to ignore test parameters during fixtures resolution/injection. See #228 for details

    Fixed

    • Lot of typo in code
    Open source →
  7. 0.21.0 01 Jun 2024
    Release notes

    Use crate-name feature to enable the crate rename support (enabled by default)

    Open source →
    Release notes

    Changed

    • Add feature crate-name enabled by default to opt-in crate rename support. See #258
    Open source →
  8. 0.20.0 30 May 2024
    Release notes

    Introduce #[by_ref] and add support for import rstest with another name.

    Open source →
    Release notes

    Add

    • Implemented #[by_ref] attribute to take get a local lifetime for test arguments. See #241 for more details. Thanks to @narpfel for suggesting it and useful discussions.
    • Support for import rstest with another name. See #221

    Fixed

    • Don't remove Lifetimes from test function if any. See #230 #241 for more details.
    • PathBuf does no longer need to be in scope when using #[files] (see #242)
    • #[from(now::accept::also::path::for::fixture)] See #246 for more details
    Open source →
  9. 0.19.0 09 Apr 2024
    Release notes

    Changed

    • Defined rust-version for each crate (see #227)

    Fixed

    • #[once] fixtures now require the returned type to be Sync to prevent UB when tests are executed in parallel. (see #235 for more details)

    • #[future(awt)] and #[awt] now properly handle mutable (mut) parameters by treating futures as immutable and treating the awaited rebinding as mutable.

    Open source →
  10. 0.18.2 13 Aug 2023
    Release notes

    Admit parent folders in files glob path

    Open source →
    Release notes

    Changed

    • Now #[files] accept also parent folders (see #205 for more details).
    Open source →
  11. 0.18.1 05 Jul 2023
    Release notes

    Fixed

    • Wrong doc test
    • Docs
    Open source →
  12. 0.18.0 04 Jul 2023
    Release notes

    Add

    • Add support for RSTEST_TIMEOUT environment variable to define a max timeout for each function (see #190 for details). Thanks to @aviramha for idea and PR
    • #[files("glob path")] attribute to generate tests based on files that satisfy the given glob path (see #163 for details).

    Changed

    • Switch to syn 2.0 and edition 2021 : minimal Rust version now is 1.56.0 both for rstest and rstest_reuse (see #187)

    Fixed

    • Fixed wired behavior on extraction #[awt] function attrs (See #189)
    Open source →
  13. 0.17.0 19 Mar 2023
    Release notes

    Add

    • Add #[awt] and #[future(awt)] to .await future input

    Fixed

    • Fixed wrong message when timeout tests panic before timeout expire (See #171)
    Open source →
  14. 0.16.0 27 Nov 2022
    Release notes

    Changed

    • Show TEST START banner only when trace some argument: See #158 for details.
    • Add values to test name: See #160 for details.

    Fixed

    • Updated test fixtures to 1.64.0 compiler's error messages.
    Open source →
  15. 0.15.0 27 Jun 2022
    Release notes

    Fixed

    • Timeout not compile if one of its test arguments il not a copy type [see #154]
    Open source →
  16. 0.14.0 19 Jun 2022
    Release notes

    Changed

    • Feature gated async timeout via async-timeout feature [see #148]

    Fixed

    • Removed async-std build dependency [see #148]
    Open source →
  17. 0.13.0 15 May 2022
    Release notes

    Add

    • #[timeout(duration)] test implementation for both sync and async tests (See #136)

    Changed

    • Split rstest in separated crates for macro and libs (See #32)
    Open source →
  18. 0.12.0 12 Dec 2021
    Release notes

    Add

    • Add #[once] fixture attribute to create static fixtures (See #119)

    Fixed

    • Fixed check of available features before to enable macro diagnostic (See #126)
    Open source →
  19. 0.11.0 01 Aug 2021
    Release notes

    Fixed

    • use mutable fixture in in cases and value list (See #121)
    Open source →
  20. 0.10.0 16 May 2021
    Release notes

    Add

    • Rename fixture (See #107 and #108)

    Fixed

    • Wired behaviour in #[fixture] with generics types that have transitive reference (See #116)
    Open source →
  21. 0.9.0 02 May 2021
    Release notes

    Add

    • #[future] arg attribute to remove impl Future<> boilerplate. (See #98)
    Open source →
  22. 0.8.0 25 Apr 2021
    Release notes

    Add

    • Magic Conversion: use literal string for define values where type implements FromStr trait (See #111)

    Changed

    • #[default] arg attribute cannot use key = arbitrary rust expression syntax (is unstable https://github.com/rust-lang/rust/issues/78835). So we switched to #[default(expression)] syntax. (See #117)

    Fixed

    • #117 introduced an unstable syntax
    Open source →
  23. 0.7.0 21 Mar 2021
    Release notes

    This version intruduce the new more composable syntax. And async fixtures (thanks to @rubdos)

    Add

    • New syntax that leverage on function and argument attributes to implement all features (See #99, #100, #101, #103, #109 and #102)
    • async fixtures (See #86, #96. Thanks to @rubdos).

    Changed

    • Moved integration tests resouces in test directory (See #97)
    Open source →
  24. 0.6.5 14 Mar 2021 withdrawn

    Nothing published for this version

  25. 0.6.4 21 Jun 2020
    Release notes

    Add

    • Implemented reusable test list with rstest_reuse external crate (See #80)
    Open source →
  26. 0.6.3 19 Apr 2020
    Release notes

    Add

    • Define default values instead use trivial fixtures (See #72).
    Open source →
  27. 0.6.2 13 Apr 2020
    Release notes

    Add

    • Injecting test attribute. You can choose your own test attribute (should be something like *::test) for each test. This feature enable every async runtime (See #91).

    Changed

    • Start to use rstest to test rstest (On going task #92)
    Open source →
  28. 0.6.1 05 Apr 2020
    Release notes

    Add

    • Introducing async tests support. Leverage on async_std::test to automatically switch to async test (both for single, cases and matrix) (See #73)
    Open source →
  29. 0.6.0 05 Mar 2020
    Release notes

    Add

    • Hook argument name to fixture by remove starting _ (See #70)
    • Every case can have a specific set of attributes (See #82)

    Changed

    • Removed useless rstest_parametrize and rstest_matrix (See #81). From 0.5.0 you can use just rstest to create cases and values list.
    • Removed cargo-edit test dependecy (See #61)
    Open source →
  30. 0.5.3 23 Jan 2020
    Release notes

    Fixed

    • Fixed a false unused mut warning regression introduced by partial fixtures (See 8a0ff08)
    Open source →
  31. 0.5.2 29 Dec 2019
    Release notes

    Fixed

    • Fixed unused attribute warning when use should_panic attribute (See #79)
    Open source →
  32. 0.5.1 14 Dec 2019
    Release notes

    Fixed

    • README.md links
    • License files
    Open source →
  33. 0.5.0 13 Dec 2019
    Release notes

    Added

    • Use just rstest for implementing all kind of tests (See #42)
    • New matrix tests render: indicate argument name and nest groups in modules (See #68 for details)
    • CI (github actions) build and tests (See #46)

    Changed

    • Better README.md that introduce all features
    • (From rustc 1.40) Deprecated rstest_parametrize and rstest_matrix: rstest now cover all features
    • Refactored

    Fixed

    • Error message if fixture or value are used more than once
    Open source →
  34. 0.4.1 05 Oct 2019
    Release notes

    Changed

    • Fixed README, crate description, changelog dates
    Open source →
  35. 0.4.0 04 Oct 2019
    Release notes

    Added

    • Injecting fixture with partial values in all tests (See #48)
    • Add new rstest_matrix macro to build tests by carthesian product of input arguments (See #38)

    Fixed

    • Just bugs in tests

    Changed

    • Use unindent crate instead the home made Deindent trait
    • Use itertools
    • Refactor parsing
    Open source →
  36. 0.3.0 28 Jun 2019
    Release notes

    Added

    • Introduced fixture macro: Now you must annotate your fixture by this tag. See #5
    • Support for arbitrary rust code without use Unwrap(str_lit) trick. See #19 and #20 (deprecate Unwrap())
    • Support for tests that return Result(), See #23
    • Support for dump test arguments
    • rstest_parametrize use module to group cases (See #13)
    • You can optionally give a an name for each test case (See #11)
    • Docs
    • Descriptive error handling: See #12, #15
    • rstest_parametrize can leave comma after last case

    Fixed

    • rstest_parametrize should catch error in input! See #1, #14
    • Use negative literal. See #18

    Changed

    • You need to use fixture to tag all your fixtures.
    • Migrate to 2018 Epoch
    • Tests: Refactoring and speed up
    Open source →
  37. 0.2.2 18 Oct 2018
    Release notes

    Fixed

    • Better error handling
    Open source →
  38. 0.2.1 15 Oct 2018
    Release notes

    Changed

    • crate.io categories
    Open source →
  39. 0.2.0 14 Oct 2018
    Release notes

    First Public release.

    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive