Writing Tests Slows Me Down
Learn how to address the misconception that writing tests in TDD slows down development, highlighting its benefits in defect prevention and overall efficiency.
Writing tests that slow development down is a popular complaint about TDD. This criticism has some merit. Personally, we’ve only ever felt that TDD has made me faster, but academic research disagrees. A meta-analysis of 18 primary studies by the Association for Computing Machinery showed that TDD did improve productivity in academic settings but added extra time in industrial contexts. However, that’s not the full story.
Understanding the benefits of slowing down
The aforementioned research indicates that the payback for taking extra time with TDD is a reduction in the number of defects that go live in the software. With TDD, these defects are identified and eliminated far sooner than with other approaches. By resolving issues before manual quality assurance (QA), deployment, and release, and before potentially facing a bug report from an end user, TDD allows us to cut out a large chunk of that wasted effort. We can see the difference in the amount of work to be done in this figure:
Get hands-on with 1400+ tech skills courses.