Get started Bring yourself up to speed with our introductory content.

How to plot out a test automation strategy

Test automation can deliver great value or immense frustration. Map out a winning approach that helps engineers learn test automation skills and doesn't leave them exasperated.

Test automation puts software quality into hyper drive, and there are plenty of scripting languages and frameworks to choose from. So, where to begin?

Team leaders and QA managers should first define a test automation strategy, then analyze it, and commission the tools and frameworks the team will use for the duration of a project -- and potentially beyond.

Start with fundamental test scripting and execution practices, such as atomic tests and Multithreading capabilities. Then ensure manual tests get the same attention on efficiency and clarity. Finally, think about coverage -- there are three parts of every software project that take priority. Once you establish a test automation strategy, benchmark team skills and train for success.

The best test automation practices

Team leaders should incorporate established practices into their test automation strategy. These guidelines hold true across different frameworks and languages, and they help many testers find their test automation footing.

Test scripts must be singular. Each script should only test one feature; this is called an atomic test. If a test script checks multiple features, it will not be clear which part of the tested software failed.

Test scripts should be autonomous. A test script should not rely on the results of previous scripts in order to run. Otherwise, testers will need to effectively halt execution runs if a test fails.

Test scripts must handle data properly. Test scripts should either create and delete their own data or revert data to its pretesting state.

Test scripts should execute quickly. Each test should run no longer than a minute in the local environment.

Test suites should be multithreaded. To maximize speed, run test suites on multiple servers at the same time.

Test tools should account for the real world. Use tools that allow scripts to execute across multiple platforms, browser and device combinations, as well as collect performance metrics.

Make high-caliber manual tests

Manual tests are the basis of an automation suite, so QA professionals need to review each manual test script to make sure they are getting as much value as possible out of each one. When automating manual tests, QA professionals should aim to create a process that covers the most critical functionalities with the smallest number of test cases that is feasible. This ensures that an automation suite is easier to maintain and does not become a bottleneck. Also, automated test suites require ongoing maintenance at both the script and suite levels to remain effective and efficient.

And keep in mind that while automated tests can replace a lot of manual QA work, there's still a place for human expertise in testing. To design and optimize the manual test suite, QA teams should:

  • select end-to-end tests that focus on critical and high-risk application features;
  • understand the integrations involved in critical user workflows, including the technologies in use for those applications;
  • implement service virtualization for integrations and components that aren't available so that missing parts don't stop testers from continuously running end-to-end tests;
  • use the most realistic data possible for each test, include synthetic data generation; and
  • include exploratory testing to assess user experience and bugs not easily found by automated tests.

Manual test cases describe the scenario of the test, while the test scripts describe each actual step and its expected result. There are several ways to optimize manual test cases. Firstly, test cases should center on the functionality they validate. These tests should also be simple, as the more complex the test, the more validation it requires for the test script. Furthermore, tests must be as independent as possible, even if you use service virtualization to fill in for missing components in integration testing. Write each manual test case to the click level and fully describe the prerequisites, including data requirements. Manual tests should run cleanly and the code should be stable to prevent flaky automated tests.

Optimize for your top three concerns

An effective and fast test automation suite includes test cases that validate:

  • high-risk areas of code;
  • customer-centric features; and
  • critical business workflows.

Lastly, to make testing as valuable as possible, continuously optimize regression test suites through code analysis.

Build skills the right way

It is critical for all test automation engineers to know these fundamental practices for automated tests, regardless of the scripting language and framework. Teams often struggle to optimize a test suite to run efficiently and properly equip QA engineers with the requisite test automation skills.

As leaders set up a test automation strategy, they should determine what skills the team needs. Perhaps not everyone needs to master test scripting, as different people possess different roles, strengths and weaknesses. Review those skills to determine where you need to apply training.

If it's necessary to train workers on test scripting, provide them plenty of time to learn test automation frameworks and languages. The skills cultivation to do test automation well is an ongoing process; there's no magic button to immediately onboard an engineer.

To fully develop their skills, test automation engineers must apply training as quickly as possible to an automation project. Lags between training and use of those skills can cause testers to forget, or misuse, what they learned. Don't let bad timing cause frustration or delay an automation schedule.

Next Steps

Weigh test automation's advantages and disadvantages

Dig Deeper on Automated and autonomous testing