Ideally, you would want to run all tests on the database same as on production, in separate/isolated databases, and quickly on top of it. Luckily, this is easily achievable with PostgreSQL and xUnit and it is one of the reasons I like using the PostgreSQL database. This is what we'll do: Create a base (template) database at the tests startup Create a copy of the template database at the individual