Fast: The Fourth Quality of Valuable Tests
Explore why fast tests are essential in maintaining an efficient test-driven development process for Rails applications. Understand common causes of slow tests like startup delays and database dependencies. Learn strategies to isolate application logic and speed up tests, ensuring smoother TDD workflows and better long-term code health.
We'll cover the following...
Fast
It’s easy to overlook the importance of pure speed in the long-term maintenance of a test suite or a TDD practice. In the beginning, there isn’t much difference. When we have only a few methods under test, the difference between one second per test and one-tenth of a second per test is almost invisible. The difference between a one-minute suite and a six-second suite is easier to discern.
Slow test suites hurt us in a variety of ways.
Slow tests cost
There are startup costs. In the sample TDD session we walked through in the chapters “ ...