Why you should do testing
It’s common to see managers (and software developers) complaining about doing tests, rushing for that release on a friday afternoon, expecting to make everything perfect and not to make a massive crash on your system. And even if they(the developers) make tests, they make the basic ones only to cope with the coverage required, which again, it’s a bad practice.
But, why hesitate in doing testing when you can send your code which you, as a superhuman being won’t make mistakes at all?
- Because you are not a superhuman, you are a human being, and you make mistakes.
- Because even if your code is well done you can get unexpected behavior from side effects given by other areas of the code, such as signals or other surprises that you never touched.
Yeah, but it’s faster to make the code, deliver and then iterate it.
Maybe you can make the code faster, but in a given point it would fail, you will patch it, it would fail again, and in a given point in this endless cycle your code will be a big ball of mess, in this point the failure won’t be a bug, it will be based on the design. A design that you won’t have the time to fix, because it will affect hundreds or thousands of customers by the second.
So, testing is more than just a percentage number in my coverage?
Yes. You can design based on tests, its called Test Driven Development(TDD). TDD will force you to know the use cases of your code, so you will understand your code while also testing the expected behavior in each step.
Aha! Thanks for making up my mind.
You are welcome.