DEV Community

Discussion on: Do you practice TDD?

Collapse
 
leightondarkins profile image
Leighton Darkins

I'd love to say "yes". But the honest answer is "sometimes".

A lot of other comments have touched on the idea that automated testing in general is more valuable than the process of TDD, and I'd be inclined to agree.

There's never a commit of mine that doesn't contain some tests. The circumstances of the creation of those tests varies depending on the problem that needs to be solved. Sometimes they come first, sometimes after.

What made me want to start doing this? Confidence.

My first question on almost every piece of code I review or pair on is: "How do you know this works?". If the answer involves manual execution or examination of the code, my confidence level is near-zero.