Back to Resources

Blog

Posted August 17, 2023

Benefits of Automated Testing

Not sure you need test automation? Think again. Here are the top 10 benefits of automated testing in the cloud.

Automated testing offers many different benefits that significantly improve the software development process. Test automation can dramatically improve efficiency by swiftly executing repetitive test cases, saving time and effort for developers and testers. This expedites the feedback loop, allowing quick identification and resolution of defects. It can also enhance test accuracy, reducing the risk of human errors and ensuring consistent and reliable results across different test runs. With increased test coverage, it helps identify issues that might be overlooked in manual testing, leading to higher software quality. A great test automation strategy can also be easily integrated into the Continuous Integration (CI) and Continuous Delivery (CD) pipelines, streamlining the deployment process and facilitating faster time-to-market.

Learn more about the top 10 benefits below.

1. Running Tests 24/7

Kick off a test at any time, anywhere in the world. When Apple or Google release a new browser version, you can see the updated results the next time your tests run.. No more having a tester disappear into a conference room and come out in three or four days, proclaiming it is "probably okay."

2. Reusability

Once a test script exists, it can be rerun on different form factors and devices at the touch of a button. For that matter, if you assemble the test as components, or building blocks, you can reuse those components on other tests. That means only writing login test code once, and re-using it. When your application adds a new field for something in the login form, you can change the login function in one place, and suddenly all the tests pass again.

3. Get Video

Test automation is great for functional changes, but can’t detect that a change made the screen "look funny" or created a usability problem. In the worst cases, an entire form field could be hidden, or locked from receiving keystrokes, yet the automation could find a way to type into it anyway. In those cases, the passing test did not even guarantee that it was possible to run through the scenario!

Modern test automation tools provide video playback of test runs. Reviewing these play-by-plays, perhaps at 2x or faster speed, can combine the human power to notice problems with the computer's ability to do the exact same thing over and over again. Having a video of a failure can decrease debugging time from hours to seconds.

4. Volume and Scale

Once you've created a test that can run in the iOS platform, you can scale that out of thousands of combinations of devices, operating systems and browsers. Android’s fragmented ecosystem offers hundreds of thousands of choices. If the application is a straight web application that can also run on a laptop, there are millions of combinations. You do not have to run these all at once. With separate test runs for each commit, you are probably already running  many test suites every day. Create a list of the hundred most popular combinations and rotate through the test runs, achieving reasonable platform coverage for free. Or select the ten most important tests and run them on a hundred devices overnight. Better still, cloud-based test performance means you no longer need to choose between some minimal amount of hardware that takes a long time for a test run versus building out a test lab at a cost of hundreds of thousands of dollars.

5. Cross-Platform Testing

The cloud, plus the repeatability of the tests, means you can run the exact same test on multiple platforms at the same time, looking for minute differences. This can provide insight into programming practices and even performance. Consider the difference in knowing the time for a test run on an old iPhone, along with average page response, compared to the newest version.

6. Find Bugs Earlier

It's possible that two developers, working simultaneously, can introduce changes that break the software—or introduce a merge problem that breaks the software. A manual tester can find the problem, but without being able to identify what change caused the error, it may be days or weeks before the developers determine where the fix needs to happen.

Having a regression test suite run on every commit, or Pull Request, or build finds the problem early, identifies what change made the problem, and points the problem right back to the developer who created it. That prevents waste, delay, and drastically reduces the time spent debugging and fixing.

7. Hidden Savings

Most teams leading with  manual testing have a test cycle that includes a large regression test suite as the final check before release. The longer this cycle is, the more expensive it is and the harder it is to ship frequently... It is not unheard of for teams to shift from monthly releases to quarterly releases to facilitate longer test cycles as a form of "process improvement." 

Moving to a longer release  schedule allows the team to spend more time as a percentage writing new code, but the total amount of change to evaluate before release will be greater, which will require more regression test cycles to release. Having additional regression cycles makes testing look more expensive, creating a vicious cycle that encourages teams to ship even less frequently. 

Tooling can dramatically improve those numbers. Combined with modern tactics in software engineering, like multiple deploy points, resilience, and quick time to recovery, a team can instead create a virtuous cycle, where more frequent deploys lead to fewer changes to evaluate, requiring less testing, and resulting in faster value for the customer.

8. Production Monitoring

Many test suites include non-destructive or"read-only" test scripts that also can be used to monitor production. Small tests that can be run constantly can be used to quickly detect when features go down, or if a configuration flag was misapplied.

9. Put the Application Under Load 

Again, start with a test suite of independent tests that mimic the user. Then run them simultaneously at scale for insight into performance. Insights here are two-fold. First, you can look at the performance counters that you wrote for the production monitoring above. Or, have humans explore the functionality in an environment very much like production that is under a similar load.

10. Return On Investment

If a team is adding new code every sprint, then the "space" to cover with tests will grow every sprint. With automated tooling, that work is relatively flat: Create a story, write some tests. With manual testing, the amount of space to cover grows linearly. In sprint one, test 10 stories, in sprint two, test 20, in sprint three, test 30. Testing either needs to become smarter with  random sampling, or else testing time needs to grow. 

Done well, test tooling leads to reduced test costs over time.

[Authors note: For more advanced treatment of this, I edited a book on the topic.]

The Limits of Automated Testing Testing

The best tooling takes some small subset of what the users might do—the most frequent or important actions—and institutionalizes them to run over and over again, exactly the same. Covering all the possible uses and combinations is impossible. That leaves plenty of room for minor bugs, as well as things that bug the customer

Automated testing can’t evaluate the effective usability of the design, (e.g., where the buttons are positioned, and how easy it is to use the app).

Conclusion

There are benefits and drawbacks to both automated and manual testing. Independent test execution and evaluation by computers is different, and should be treated differently, than when a human is in the driver's seat. 

To achieve the best results you need a combination of both types: automated testing for repetitive, simple use-cases; and manual testing for reproducing specific bugs, complicated use cases and to ensure the best user experience possible.

Published:
Aug 17, 2023
Share this post
Copy Share Link

Start automated testing with Sauce Labs today

Get started

© 2024 Sauce Labs Inc., all rights reserved. SAUCE and SAUCE LABS are registered trademarks owned by Sauce Labs Inc. in the United States, EU, and may be registered in other jurisdictions.