Software testing basics: types, benefits and when to automate

Testing is an investment. Like investing in security of a software product, it’s sometimes a hard sell, because you don’t immediately see a return. There’s no tangible output, no new feature to wow users.
However, there are several advantages to building testing into your product development that can pay off. The key is balance.
Tests are automated by writing code that developers can run, typically before deploying an update to a software product. When a test fails, it will alert developers that something isn’t working in the software. There are several advantages to building automated testing into your software product:
To understand how testing benefits your software product, first consider the main types of tests and what they do.
There’s really no way to automate all testing. After all, someone still has to write the code to create the testing program. However, the most common types of tests used in software development are:
Lots of software products you use every day use automated testing and continuous deployment to update features little by little: Facebook, Gmail, Amazon and so on.
But when you’re developing a startup software product, it may not be feasible to automate all testing. We’ll talk a little more about how we decide what to automate below. But first let’s look at the expected outcome of automated testing.
To illustrate the expected outcome of automated testing, consider this typical scenario. Let’s say you’re developing a new app, and you can expect 10 bugs to surface.
If you do not write an automated test for the new app, the bugs will show up at the worst time – when customers are using your product – causing your app to lose their trust. Each bug will take 10 hours to fix, also costing you money.
If you decide to automate testing for your app instead, you will have to write 50 tests. Each test may take 1 hour to write. Nine of those tests will help you catch 9 of the 10 bugs. You can fix each in 1 additional hour – before the end user ever sees it.
You will still have the tenth bug. Catching it would have required you to write 500 tests, which was too expensive for your project.
There’s no way to know beforehand which of the 50 tests will help you find the bug. If you write them you won’t notice the 9 bugs that did not happen – only the one that did.
When a startup company faces the choice of where to invest funds, it has to consider opportunity cost. Developing a new feature may win out over automating testing. After all, tests don’t add visible value, and writing code for tests is time consuming.
Additionally, automated testing implies that a feature is well thought out and stable. Some features in a young product are exploratory. It’s expected they may change. Writing automated tests for a feature will only make changing it harder when that time comes.
Other barriers may prevent some software developers from using automated tests. Setting up automated testing requires experience, discipline and organized processes. Tests must be maintained as the product evolves. The testing environment must be as close as possible to the actual end user’s environment. And occasionally there are regulations that may prevent testing, such as when handling medical information.
Completely automating software tests can be expensive, so there will always be a tradeoff in how thoroughly you test your code. The first step is to identify which tests are best done manually and which it will make sense to automate.
This can depend on where you are in your product lifecycle. For example, we automate tests for the most crucial parts when building an MVP (minimum viable product).
Consider your signup or payment page. If users can’t join or pay, you will waste your marketing efforts and lose potential customers. It makes sense to automate tests for these points.
Belighted builds in testing for critical points on all our projects - our own as well as our clients’. It’s a best practice that we believe adds reliability to everything we create.
In addition, our tests act as technical documentation. We often function as a startups’ first development team, so we want to be sure our work can transfer seamlessly as the company grows. As new developers enter the team, they can become productive very quickly.
Whether software is tested usually depends on the culture of a company. Developers love having it. And when balanced with other development priorities, it can improve the quality of your software product, save time, preserve continuity and help keep your team aligned.
Discover more about how we approach product development in our blog the Belighted way.