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 2025Releases
latest 39-
0.26.127 Jul 2025 -
0.26.026 Jul 2025Release notes
Open source →What's Changed
- docs: fix filemode examples by @lucascool12 in #301
- Issue #306. Ignore folders by @Obito-git in #307
- Hide generated items in documentation by @wiktor-k in #309
- 313_fix by @la10736 in #314
- fix: do not depend by default on
async-stdby @coriolinus in #311 - Add permission for empty_structs_with_brackets in fixture by @bugRanger in #317
- Touch up indentation used for examples in the README by @fgimian in #318
- Make #[files(...)] work on Windows by @twz123 in #322
- Finalize #311 by @la10736 in #323
- Make clippy happy by @la10736 in #324
New Contributors
- @Obito-git made their first contribution in #307
- @wiktor-k made their first contribution in #309
- @coriolinus made their first contribution in #311
- @bugRanger made their first contribution in #317
- @fgimian made their first contribution in #318
- @twz123 made their first contribution in #322
Full Changelog: v0.25.0...v0.26.0
Release notes
Open source →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 alsosmolworks. 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
rstestexpansion. See #313 - The
#[files(...)]attribute now works reliably on Windows. - Now global attributes can go everywhere in the list also where case is used
-
0.25.002 Mar 2025Release notes
Open source →What's Changed
- Append generated test macro so next test macros are aware of it by @kezhuw in #291
- feat: add
include_strandinclude_bytesfile input behaviour by @lucascool12 in #297
New Contributors
- @kezhuw made their first contribution in #291
- @lucascool12 made their first contribution in #297
Full Changelog: v0.24.0...v0.25.0
Release notes
Open source →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)
-
0.24.001 Jan 2025Release notes
Open source →What's Changed
- refactor: use
coreinstead ofstdby @rnbguy in #283 - Fix msrv and complete no_std support by @la10736 in #285
- replace futures with futures-util by @mati865 in #288
- Introduce Context by @la10736 in #289
New Contributors
Full Changelog: v0.23.0...v0.24.0
- refactor: use
-
0.23.029 Sep 2024Release notes
Open source →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
-
0.22.004 Aug 2024Release notes
Open source →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
-
0.21.001 Jun 2024Release notes
Open source →Use
crate-namefeature to enable the crate rename support (enabled by default)Release notes
Open source →Changed
- Add feature
crate-nameenabled by default to opt-in crate rename support. See #258
- Add feature
-
0.20.030 May 2024Release notes
Open source →Introduce #[by_ref] and add support for import rstest with another name.
Release notes
Open source →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
rstestwith another name. See #221
Fixed
- Implemented
-
0.19.009 Apr 2024 -
0.18.213 Aug 2023Release notes
Open source →Changed
- Now
#[files]accept also parent folders (see #205 for more details).
- Now
-
0.18.105 Jul 2023 -
0.18.004 Jul 2023Release notes
Open source →Add
- Add support for
RSTEST_TIMEOUTenvironment 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
syn2.0 and edition 2021 : minimal Rust version now is 1.56.0 both forrstestandrstest_reuse(see #187)
Fixed
- Fixed wired behavior on extraction
#[awt]function attrs (See #189)
- Add support for
-
0.17.019 Mar 2023Release notes
Open source →Add
- Add
#[awt]and#[future(awt)]to.awaitfuture input
Fixed
- Fixed wrong message when timeout tests panic before timeout expire (See #171)
- Add
-
0.16.027 Nov 2022Release notes
Open source →Changed
- Show
TEST STARTbanner 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.
- Show
-
0.15.027 Jun 2022Release notes
Open source →Fixed
- Timeout not compile if one of its test arguments il not a copy type [see #154]
-
0.14.019 Jun 2022Release notes
Open source →Changed
- Feature gated async timeout via
async-timeoutfeature [see #148]
Fixed
- Removed
async-stdbuild dependency [see #148]
- Feature gated async timeout via
-
0.13.015 May 2022Release notes
Open source →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)
-
0.12.012 Dec 2021Release notes
Open source →Add
- Add
#[once]fixture attribute to create static fixtures (See #119)
Fixed
- Fixed check of available features before to enable macro diagnostic (See #126)
- Add
-
0.11.001 Aug 2021 -
0.10.016 May 2021Release notes
Open source →Add
- Rename fixture (See #107 and #108)
Fixed
- Wired behaviour in
#[fixture]with generics types that have transitive reference (See #116)
-
0.9.002 May 2021Release notes
Open source →Add
#[future]arg attribute to removeimpl Future<>boilerplate. (See #98)
-
0.8.025 Apr 2021Release notes
Open source →Add
- Magic Conversion: use literal string for define values where type implements
FromStrtrait (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
- Magic Conversion: use literal string for define values where type implements
-
0.7.021 Mar 2021Release notes
Open source →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)
asyncfixtures (See #86, #96. Thanks to @rubdos).
Changed
- Moved integration tests resouces in
testdirectory (See #97)
-
0.6.514 Mar 2021 withdrawnNothing published for this version
-
0.6.421 Jun 2020Release notes
Open source →Add
- Implemented reusable test list with
rstest_reuseexternal crate (See #80)
- Implemented reusable test list with
-
0.6.319 Apr 2020 -
0.6.213 Apr 2020Release notes
Open source →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
rstestto testrstest(On going task #92)
- Injecting test attribute. You can choose your own test attribute (should be something like
-
0.6.105 Apr 2020Release notes
Open source →Add
- Introducing async tests support. Leverage on
async_std::testto automatically switch to async test (both for single, cases and matrix) (See #73)
- Introducing async tests support. Leverage on
-
0.6.005 Mar 2020Release notes
Open source →Add
- Hook argument name to fixture by remove starting
_(See #70) - Every
casecan have a specific set of attributes (See #82)
Changed
- Removed useless
rstest_parametrizeandrstest_matrix(See #81). From 0.5.0 you can use justrstestto create cases and values list. - Removed
cargo-edittest dependecy (See #61)
- Hook argument name to fixture by remove starting
-
0.5.323 Jan 2020Release notes
Open source →Fixed
- Fixed a false unused mut warning regression introduced by partial fixtures (See 8a0ff08)
-
0.5.229 Dec 2019Release notes
Open source →Fixed
- Fixed unused attribute warning when use
should_panicattribute (See #79)
- Fixed unused attribute warning when use
-
0.5.114 Dec 2019 -
0.5.013 Dec 2019Release notes
Open source →Added
- Use just
rstestfor 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.mdthat introduce all features - (From rustc 1.40) Deprecated
rstest_parametrizeandrstest_matrix:rstestnow cover all features - Refactored
Fixed
- Error message if fixture or value are used more than once
- Use just
-
0.4.105 Oct 2019 -
0.4.004 Oct 2019Release notes
Open source →Added
- Injecting fixture with partial values in all tests (See #48)
- Add new
rstest_matrixmacro to build tests by carthesian product of input arguments (See #38)
Fixed
- Just bugs in tests
Changed
- Use
unindentcrate instead the home madeDeindenttrait - Use
itertools - Refactor parsing
-
0.3.028 Jun 2019Release notes
Open source →Added
- Introduced
fixturemacro: 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 (deprecateUnwrap()) - Support for tests that return
Result(), See #23 - Support for dump test arguments
rstest_parametrizeuse 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_parametrizecan leave comma after last case
Fixed
rstest_parametrizeshould catch error in input! See #1, #14- Use negative literal. See #18
Changed
- You need to use
fixtureto tag all your fixtures. - Migrate to 2018 Epoch
- Tests: Refactoring and speed up
- Introduced
-
0.2.218 Oct 2018 -
0.2.115 Oct 2018 -
0.2.014 Oct 2018