Why do we bother with software testing? Surely our users can help us test? Why can’t automation catch all of the bugs?
Have you heard these remarks in the work place before? This blog post will explore why we test in more detail. We will be using a cooking metaphor to help break down complex software.
Imagine we are cooking dinner, why do we test it as we go?
We test our cooking to check if it’s done. To help us answer the question, “is this ready to eat yet?”. We test for doneness, are things cooked enough? And we test for flavor, is there anything we need to add?
Alt text for video: A bloke is making a soup on his stove top, he tests for flavor. He figures it needs more salt. He adds more salt. He forgets to put his spoon back in the soup. He tests his soup again. He adds more salt. He forgets to put his spoon in the soup again. He keeps adjusting the soup until eventually he puts his spoon in the soup. He’s now added way too much salt.
This guy here is doing lots of testing, however he’s missing an important step in the feedback loop. Was his testing good enough?
How does this relate to software?
We test software to check if it’s ready. To help us answer the question, “are we comfortable releasing this software?”. Testing on it’s own does not improve the quality, it gives us information about the state of the product.
Software can be a little more complicated than cooking a meal. Often we are working with teams of people and producing complicated systems that many users interact with.
But food can get complicated too
Creating food that is sold on the supermarket shelf is also a complicated process. Distribution channels, stock levels, nutritional information and marketing are all things to be considered.
This is all outside of the manufacturing process too. Imagine how many people were involved with making and delivering peanut butter:
Most of the worlds peanuts come from; China, India, Nigeria, Sudan, Burma, Argentina and Senegal.
From the farmer who grew the peanuts, to the engineer who designed the roasting machine and to the graphic designer who created the label.
Food nutrition testing
Here is a scientist walking through how to test foods for glucose, starch, fats and proteins. These tests don’t tell you how much of a compound is present but they do let you know if it is present.
Context is key
When cooking a meal most people aren’t going to break out the science lab kit and test for proteins. Even if you are allergic to something you aren’t going to test for it before consuming, you’d probably read the label and avoid the food if it contains your allergen.
People rely on the context and pick the right level of testing for the task on hand.
Testing is all about feedback, we can use fancy tools and techniques to get more information but if we never do anything with that information, why did we bother doing that testing in the first place?
If you enjoyed this blog post, here’s some further reading you might enjoy: