TLDR.Chat

The Case for Running Tests with a Dirty Database

The argument against clearing the database between tests ๐Ÿ”—

The text discusses the argument against clearing the database between automated tests, highlighting reasons such as speed, correctness, data growth issues, and parallelism advantages. It presents a shift in mindset to run tests with a dirty database, requiring adjustments to test assumptions and offering advantages such as quicker test execution, a more realistic data shape, and the potential for uncovering bugs with realistic data. The text also addresses potential disadvantages such as increased difficulty in debugging and precondition clashes, along with mitigations for these issues. Additionally, it mentions the author's limited but successful experience in implementing this strategy and its potential for wider application.

Related