Make cost savings with unit testing

A magnifying glass showing an enlarged view of unit test code

Invest in high quality code now to avoid financial and reputational losses in the future.

Sonos certainly felt the heat this summer. The smart home sound system’s new app was found to be so full of bugs and so poorly designed that it led to 100 staff layoffs, delayed two hardware launches and will cost $30 million to put right.1 Appeasing its frustrated 15 million customers could cost even more.  

Sonos’ app serves as a cautionary tale to any company looking to launch software without ensuring its code is squeaky clean first.  

When you accept poor quality coding, you add risk to your operations and your public image. So, even if your industry is a world away from smart speakers, unit testing will be music to the ears of your IT team.  

What is unit testing? 

Unit testing is the practice of testing individual pieces of code before they’re implemented into the wider system. By breaking software down into the smallest components, developers can test each isolated function to ensure it behaves exactly as intended.  

By using this process, developers can find errors and bugs before they’re embedded into the software and become much harder to detect. The software is then far less likely to break as the faults have already been pinpointed early on. 

In short, unit testing ensures developers produce high quality, robust code, first time round, and helps the code to be maintained when it comes to future updates.  

A magnifying glass showing an enlarged view of unit test code
A single pink jigsaw piece being put into a jigsaw puzzle

Skip unit testing at your peril

When software goes wrong, it can go very, very wrong.  

Take Volkswagen, for example. Drivers of its electric ID cars have complained of bugs affecting everything from infotainment screens and range calculations to the ability to charge their vehicle. One customer has described their experience with Volkswagen’s software-based functions as being like “death by a thousand cuts.”2 The situation became so dire it cost the CEO his job.3   

Users of the Nest thermostat found a software bug was leaving them out in the cold when it failed to heat peoples’ homes in the depths of winter. And, most recently, Cloudstrike’s faulty software update for Microsoft Windows crippled banks, hospitals and airlines around the world. Cloudstrike has since lost a fifth of its value in trading, in addition to severe damage to customer trust.  

Such significant bugs suggest insufficient unit testing and code maintenance. This might be due to several reasons. Prioritising the launch of new features and the pressure of time constraints is a common one. The perceived complexity of unit testing, inadequate tooling and expertise, or an overconfidence in the existing code’s quality are also culprits.  

Yet, the consequences of not unit testing can be costly 

  • 60–80% of the cost of development is spent on bug fixing and the longer it takes to fix, the higher the cost.4  
  • Remedying unstable software and tracing large sections of code to find the bug is time-consuming and expensive, with additional maintenance costs to factor in too.  
  • The long-term value of unit testing starts to become even more apparent when you assess the damage of code rot and the inability to scale the investment. 

Why unit testing is an investment worth making

There are direct and indirect cost savings achieved through unit testing. These include:  

Lower cost of fixing bugs

Bugs found during the early stages of development are usually much cheaper to fix. The cost of fixing a bug increases exponentially as it progresses through the development stages—from development to QA, to production and deployment.

Reduction in debugging time

When a unit test fails, the problematic area in the code is quickly pinpointed, making it easier and quicker to fix the issue. Plus, regularly running unit tests helps to avoid any new changes that introduce regression bugs. This means not having to spend time and money on manual testing and bug hunting.

Smoother development process

With unit tests in place, the need for lengthy manual testing phases is reduced so developing new features becomes more streamlined. Unit testing can also be automated, freeing up valuable human resources.

Increased user satisfaction

A stable, bug-free product leads to far happier customers who are more likely to spend more and stay with you for longer. It also means less support requests, minimised customer service costs and, even if patches are needed, they should be few and far between.

Ask your potential suppliers the right questions about testing.

By understanding unit testing, you can have more effective conversations with future suppliers. You can specify the development process you wish to initiate safe in the knowledge of how the upfront testing investment will mitigate extra costs and risks over the product’s lifetime. 

Ask your potential software providers what testing they embed into their development process, and quiz them on how they intend to deliver you bug-free code. Your bottom line and the future reputation of your business depends on their response. 

Ask your potential software providers what testing they embed into their development process. And ask them how they deliver bug-free code. Because the future reputation of your business depends on their response.

What to know more about unit testing done properly? Contact our experts.

Get in touch
Give us a call or fill in the form below and we will contact you. We endeavour to answer all enquiries within 24 hours on business days.