Skip to content
rusthacks.dev

Tag

testing

4 posts

Flat illustration for the post “Per Test Databases in Rust With SQLx Test Attribute”, composed around testing.
Databases

Per Test Databases in Rust With SQLx Test Attribute

The sqlx::test attribute creates a fresh database for each test, runs your migrations, hands you a pool and drops it afterwards. Learn fixtures, the DATABASE_URL requirement, parallelism and common errors.

3 min read