#sqlx #postgresql #tester #testing #database #automatic #create


a simple tool to test sqlx with postgres, automatically create a database and drop it after test

4 releases

0.1.3 Dec 2, 2023
0.1.2 Dec 2, 2023
0.1.1 Dec 2, 2023
0.1.0 Dec 2, 2023

#8 in #tester

21 downloads per month

MIT license

114 lines


sqlx tester for postgres, work with tokio only.

create one database at start of testing and destory after test ending.

How to use it

let tdb = TestDB::new("localhost", 5432, "postgres", "123456", "./migrations");
let pool = tdb.get_pool().await;
// do something with pool

// when tdb get dropped, the database will be dropped

Have fun with this crate!


This project is distributed under the terms of MIT.

See LICENSE for details.

Copyright 2021 SF Wu


~559K SLoC