pytest features in Rust
Hello everyone!
Rust's default test runner is pretty nice, but I feel like it's lacking in some aspects, especially when you go beyond unit tests and into the realm of integration or app tests.
As someone coming from Python, I really appreciate the flexibility you can achieve with pytest.
As far as I'm aware, the only crate that offers pytest concepts to any notable extent is rstest.
While very useful, its focus is only on fixtures and parametrization.
It provides only partial support for them, and no support at all for stuff like hooks, plugins, and other advanced pytest features.
I'm considering trying to write a more ambitious crate that implements more of pytest's features, but I don't really know where to start, or if that would even be something in demand for the community.
I'm pretty new to Rust, but have enough programming experience in other languages to feel confident in my ability to build something useful, if someone can point me in the right direction.
Considering all of this, I have several questions:
- What are the popular testing crates today? Are there any more that try to provide pytest features?
- How far is rstest expected to go in terms of pytest features?
- How do I go about implementing a test runner in Rust? Are there any resources I can read to get started?
- I've seen the term "test harness" in some places. Is that just the framework that collects and executes the tests or am I getting something wrong?
- I've also stumbled upon the custom-test-framework RFC. Can anyone explain the difference between this and using a custom test harness?
- Does anyone want to share interesting design ideas for "Rustifying" cocepts from pytest? (for example, test collection can happen in compile-time instead of in runtime).
Any help will be appreciated!