DEV Community


Discussion on: Does TDD slow you down or help you go faster?

n_develop profile image
Lars Richter

As long as you keep your testing cycles short and crisp, I assume there won't be a noticeable difference.


... I think there is still one important difference. When doing TDD (meaning test-first), there is, at least in my opinion, a hugely underrated step saying

Write a test and watch it fail

For me, this step is essential. Watch the test fail. It's the only way to validate that

  1. you are about to write code that is in fact needed.
  2. you made the right assumptions while writing the tests
  3. you implemented your test correctly

When doing "test-last", you are losing these advantages. So in the end, your assumptions might have been wrong for a couple of test cases and that can slow you down as well.

Forem Open with the Forem app