More may not always be better. But in the world of test automation, it is. If you’re already automating some of your software tests, you likely want to reap even more from test automation.
If that describes you, keep reading. This post discusses various strategies for getting more out of automated testing — including but not limited to automating more tests.
Before discussing how to get more out of test automation, let’s identify the main reasons why you’d automate tests in the first place:
Faster test results
Less manual effort in running tests
Fewer specialized skills or knowledge required to run tests
Optimized use of testing infrastructure
The ability to test more variables with fewer personnel
More consistency and systemization in software testing
The list could go on, but these are the main benefits of automated testing that we’ll discuss today by explaining strategies to leverage these advantages in greater volume by doubling down on automated testing.
Perhaps the most obvious way to get more out of test automation is to automate more of your tests. Few organizations automate all of their software tests, and there will always be some tests that you need to run manually. But if you’re currently automating, say, half of your tests, you could set yourself a goal in the new year of increasing that number to 75 percent in order to reap the benefits of test automation on a larger scale.
To increase the portion of tests that you automate, start by identifying which types of manual tests are the best candidates for replacement with automated testing. The tests that you run most frequently are usually a good choice, because automating those will save you the most time. You might also focus on tests that require special knowledge to run; automating those will make it easier to perform them whenever you need, without relying on a specific engineer who is familiar with a unique testing environment or procedure.
No matter which proportion of tests you currently automate, running automated tests in parallel will do much to help you increase the overall speed of your CI/CD automated testing routines. The reason is obvious: When you run multiple tests at once, you get complete results faster.
The major challenge to parallel testing is a lack of infrastructure. If your test infrastructure is limited in size, you can only run so many tests on it at once. Cloud-based test infrastructure offers a solution in this case by allowing you to run a virtually unlimited number of tests at once.
Another way to make automated testing smoother is to ask your developers to help write automated testing code, rather than relying on your QA engineers alone to write it. Doing so will help you to automate more tests faster. It may also improve the overall quality of your testing scripts, because your organization’s developers are likely to be better at writing optimized code than are QA engineers.
After all, writing code is developers’ specialty. They may not know the software testing frameworks you use, but they can probably learn them quickly, and help churn out well-written code to run within them.
It’s not uncommon for an organization to dip its feet into the waters of test automation in a haphazard way. You start by automating a few tests, without having an overall plan in place for building a consistent test automation strategy. The result is often an automated testing workflow that includes a variety of different frameworks, different coding styles in test scripts, and so on.
Inconsistency is your enemy when you want to do things quickly, efficiently and at scale. Thus, in order to get more out of automated testing, standardizing your testing strategy is a good step. This might mean agreeing upon a common framework (or small group of frameworks) for all of your automated tests. You can also standardize things like the order in which tests run, how you handle test failures, and more.
Documenting all of these practices in a location that everyone on your team can access (not just your test engineers, but the whole team) is a great way to build a more consistent CI/CD test automation process.
Automated tests allow you to write a test once, then run it as often as you want without having to look at the code. This set-it-and-forget-it feature is one key advantage of test automation.
But that doesn’t mean you should never change test code after it is written. On the contrary, you can and absolutely should revisit your scripts on a continuous basis in order to update them. Are some tests failing repeatedly, or taking longer to run than they should? Are engineers struggling to interpret test results? Is your IT Ops team complaining about bugs that are not caught in testing and that reach production? Feedback like this should be reincorporated back into the CI/CD test automation pipeline in the form of better test code.
No matter how much test automation is already benefiting your organization, you can always get more out of it. After all, we live in the age of DevOps, and continuous improvement is one of our mantras. Don’t settle for what your test automation strategy is doing for you today; strive to implement improvements that will help you to get even more out of CI/CD test automation tomorrow.
Chris Tozzi has worked as a journalist and Linux systems administrator. He has particular interests in open source, agile infrastructure and networking. He is Senior Editor of content and a DevOps Analyst at Fixate IO. His latest book, For Fun and Profit: A History of the Free and Open Source Software Revolution, was published in 2017.