DEV Community

Discussion on: Should one get good at test-last development before learning TDD?

abh1navv profile image
Abhinav Pandey

But if you're doing requirement analysis before writing the code, isn't it better to start with the tests?

And as for the original question, yes, it's fine to start with writing them last on a code you're already familiar with.

toureholder profile image
Touré Holder Author

Yeah... starting with writing tests last on existing code seems the most intuitive route to eventually learning TDD. I was curious as to whether most people who are experienced in TDD see it that way too.

jayjeckel profile image
Jay Jeckel

You should be doing requirement analysis before you write any code or tests. And once you have your requirements, it doesn't matter if you write the code or the tests first.