DEV Community


Discussion on: When do you write your tests?

mrlarson2007 profile image
Michael Larson

While TDD can help you think about how you are going to design things, it is not a design philosophy in of itself. The thing I love about TDD, is that it makes testing part fun for me, and replaces the time I would have used to see things running in the debugger. People often think that because you do TDD you don't need to think first about how you are going to design or layout your code. This is wrong, you still need to do some kind of high level design to know where things are going to go, but not get too stuck with your initial thoughts or plans if you see the need to make changes as you go. Often I find testing the most difficult part of coding, and forcing you to get this out of the way first is one of the reasons I love TDD.