DEV Community

Discussion on: Explain like I'm five: Is Test Driven Development really that used in most of the programming world?

Collapse
 
imthedeveloper profile image
ImTheDeveloper

I've attempted TDD a few times now in my hobby node.js development projects. I think the biggest thing you find is that when you start a new project you just want to get on and start coding. Pulling in the libraries you need and hacking away through the code.

However, whilst I know I'm a horrible person for doing the above, I do it all too often where time and fun is paramount working on these hobby projects you tend to want to forget the boring test world. With that being said, my current project has hit a point where there's some logic I know I simply need to test. For this specific logic I've produced my test file, added in some cases and I enjoy seeing the code re-run every time I save my work assuring me everything is ok.

There is enjoyment in testing. However, I don't feel like I have the enjoyment in writing a test for every single part of my code. In fact, I know that I struggle with gauging how in depth my scenarios need to be and also how detailed I need to go into the depth of my code to assure myself that everything is working OK. I believe I work in a world where I make a judgement as to how long I'm spending killing myself refactoring, re-running snippets of code and then where an automated test would pay off.

Testing is tough for my mind. As mentioned the level of detail required boggles me and also what about all those scenarios I may invariably miss? I understand the need, I do minimal testing but the world needs to stop making me feel guilty for my lack of 100% coverage.

I'll be posting a new thread soon in the hope to get some answers around some of these questions.