The Economics of Software Testing: Opportunity Cost
When I was in high school I learned about a very interesting concept called Opportunity Cost in my Economics class. To be honest, it’s probably one of the only things in high school that I still remember. I still remember this very interesting concept because it’s everywhere.
What is opportunity cost?
It’s the value of the next best alternative of a resource.
Source: EconLib
In other words it’s the “price” you pay for making a choice. Every time you decide to buy something, or spend time doing something etc. you are ultimately paying an opportunity cost by making that decision.
Example I
Here is a non-work example of how opportunity cost has affected me recently: I was in the final steps of going live with a personal project, had registered the business with the tax agency, done my research on logistics, website was ready, budget was done etc. But then I took a step back. My time is limited. Aside from working, helping out around the house, cooking etc and spending time with my daughter and husband in the evening - I don’t have much time left over. So then I thought to myself: where would the time to continue to pursue this project come from? It would either come from my a) exercise time or b) my reading time The (main) value I get from both of these activities is that I get to “recharge my batteries”/relax. The opportunity cost of my personal project is being able to recharge my batteries/relax. I felt this wasn’t a price I was willing to pay so I decided to stop pursuing my personal project.
How does the concept of opportunity cost apply to testing?
Let’s assume time allowed for testing is limited and you are currently looking into setting up test automation for your project. Let’s first look into the activities we could be doing instead of setting up test automation.
- testing to find more issues
- creating a test report of the testing you do recently
- learning new testing skills that could help you with work
Remember: Whatever the value of the next best alternative use of your time, is the opportunity cost you pay for setting up test automation. Now let’s assume that this, is your most important activity
- testing to find more issues
The value you get from this activity is having a clearer and better understanding of the state of the SUT (Software Under Test) now.
Therefore, the opportunity cost of setting up the test automation is having a clearer and better understanding of the state of the SUT (Software Under Test) now.
(Note: the benefit of test automation comes later, not now)
I find many people only think about the time needed to do a certain task whether it be to create a report, set up test automation or write a lot of test cases. But the opportunity cost is another cost you need to be aware of, to be fully informed, of the price you pay, for any decision you make.