"In an ideal world, we wouldn't need testing. We would just write bug-free performant code that would be the perfect direct implementation of the requirements."
I think this is an interesting idea.
I agree to some degree that bug-free code would be 'ideal', however just because it is bug free does not mean that it is perfect and it doesn't mean that it's production ready. You could test perfect code and still find bugs, because it wouldn't be able to handle scenarios a real world user might perform when using the system - the code cannot handle the task or the task many not have been explicitly stated in the requirements. I think there will always be a need for testing, in the low level sense of unit tests as well as the much larger side of exploratory and manual testing.
Really interesting post, thanks! :)
It's also worth noting that sometimes tests can be used as a sort of protection too. If you had perfect code and wanted to protect it from breaking in the future unit tests are a good way of doing that. (Provided it's enforced via CI/CD or some other meaningful way)
"In an ideal world, we wouldn't need testing. We would just write bug-free performant code that would be the perfect direct implementation of the requirements."
I think this is an interesting idea.
I agree to some degree that bug-free code would be 'ideal', however just because it is bug free does not mean that it is perfect and it doesn't mean that it's production ready. You could test perfect code and still find bugs, because it wouldn't be able to handle scenarios a real world user might perform when using the system - the code cannot handle the task or the task many not have been explicitly stated in the requirements. I think there will always be a need for testing, in the low level sense of unit tests as well as the much larger side of exploratory and manual testing.
Really interesting post, thanks! :)
It's also worth noting that sometimes tests can be used as a sort of protection too. If you had perfect code and wanted to protect it from breaking in the future unit tests are a good way of doing that. (Provided it's enforced via CI/CD or some other meaningful way)
Thanks for your comment.
This is quickly addressed when I write about regression bugs, in the Exploratory Testing section.