Programmatic database resets
Posted:
Automated testing is good. This is, I hope, not a controversial statement. Small, isolated tests are also good. This should also not be a controversial statement.
But sometimes, tests will need to talk to the database. It may be too difficult to mock, or you may be using an expensive-to-load fixture for an integration test. That's OK, and those tests absolutely have their place.
But it's also nice to not have to rebuild the world for such tests. Enter, trivially simple transaction-based isolation.