Testing My Patience: An Exploration of Testing in Rust
summary
Rust’s built-in test system works for simple projects but breaks at scale: incompatible custom harnesses force test rewrites (had to change every test to use cargo-ad), cargo’s libtest does compile‑time ignores rather than runtime checks, temp‑dir fixtures leak or suppress errors, and data‑driven cases lack per‑case reporting. A custom libtest-compatible harness is under development, with benchmark support and improved JSON output to enable fixture tear down and pytest‑like enumerated tests via a stable extension API.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 0:38Annotation
- 0:58Pain Points
- 1:58Holy Envy
- 2:48Testing in Python
- 3:34Conditional Ignores
- 3:55Short Circuit
- 4:51Fixtures
- 6:08Cargo Fixtures
- 7:25Lack of Data Generation
- 8:33TriBuild
- 9:21PiTest
- 9:42Scaling Up
- 10:11Path Forward
related talks
24mMissing Testing Features in Rust
32mTesting strategies and pattern for efficient TDD in Rust
27mCreating a custom test harness for advanced test setups
28mBuild bigger in less time: code testing beyond the basics
21mA Tour of Empirical Verification in Rust
32mBuilding and Maintaining Rust at Scale
31mImproving Your Rust Life
29mEnd-to-end testing your Rust backend
