DEV Community

Discussion on: Me: "I tested and it works, why do I have to write tests?"

Collapse
 
kleene1 profile image
kleene1

I would tell them that the next person that has no idea if it works, and made a change and need to retest, that the creater of the code should probably create these tests since they know what their code does.

Collapse
 
briwa profile image
briwa

True that. To me, writing a test without a context (especially if the code isn't yours/not well documented) is a counter-productive process. There are potential mistakes waiting at the end: false positives, over-testing...