Skip to main content

Search...

Test Automation: What to Automate and What to Skip

Test automation is not a silver bullet. Applied correctly it is a lever for speed and consistency.

What is Test Automation?

Test automation refers to the use of software to execute test activities that a person would otherwise have to perform by hand. The goal is not to push people out of testing. It is to shorten feedback cycles, improve regression coverage and free up testing capacity for the more complex, judgement-dependent tasks that a machine could never take on in the first place.

Test automation does not replace manual testing. It complements it. Exploratory testing, usability evaluation and the decision about what gets tested with which priority remain human activities. Anyone who expects to swap manual tests one-for-one for automated equivalents will be disappointed early and thoroughly.

Test automation is not a one-time project with a clear end date either. It is an ongoing commitment. Automated tests must be maintained, adapted and evolved the moment the software changes. Every functional or technical change to the system feeds straight back into the test assets. Ignore that maintenance effort, and within two years you will have an unreliable test suite and a team that has stopped trusting it.

Benefits and Limits

The primary benefit of test automation is repeatability. An automated regression test can run after every code change without a human investing time. That is precisely what makes fast, frequent deployments possible in the first place. Add consistency, because the machine forgets nothing, makes no typos and has no bad days. Speed, because a thousand tests run in an hour rather than a week. And coverage, because more scenarios can be checked than would ever be realistic to run by hand.

The limits appear wherever human judgement is required. An automated test can verify that a button is clickable. Whether the interface feels intuitive, it cannot judge. Usability, exploratory testing and risk assessment remain human territory. And tests that change frequently or carry a high automation cost often make poor candidates for the switch. Automation is a tool with a clear field of use, not an end in itself.

What is Worth Automating

Not every test is a good candidate for automation. Return on investment is the deciding measure. The rule of thumb: a test suits automation when it runs frequently, has stable requirements and carries clearly defined expected outcomes.

Natural candidates are regression tests, which verify that existing functionality has not been broken by new changes. Smoke tests before a deployment check that a system is fundamentally operational at all before deeper tests follow. And data-driven tests with many parameter variations are hardly worth scaling manually, yet run efficiently and reliably once automated.

Poor candidates are tests that change frequently, because every new feature invalidates the test logic. One-off tests that are no longer needed after a release almost never justify the automation investment. And tests that call for human judgement, whether something looks correct or feels coherent, cannot be automated meaningfully.

A proven approach is to test new functionality manually first, experience the feature in action once, and only switch to automation after validation. Automating critical regression tests belongs, ideally, in the Definition of Done. Otherwise it gets treated as optional follow-up work and quietly dropped under the next bout of time pressure.

Tests That Only Work Automated

Some tests are simply not feasible without automation. Load and stress tests require a multitude of users acting in parallel that no team of people could simulate. Reliability tests examine system behaviour under sustained operation over hours or days and only yield dependable statements over time. Security tests such as penetration testing and fuzzing require specialised tooling, without which the relevant attack patterns cannot even be generated.

Checking large and complex datasets is likewise impractical by hand. Anyone who has to verify data integrity in a data warehouse or validate extensive, highly conditional transformation rules will not get far without automation. The manual comparison here can be done neither in reasonable time nor without error.

Another area where automation delivers clear advantages is the setting up and managing of test environments for multiple platforms and configurations. Container technologies such as Docker and virtualisation allow reproducible test environments to be spun up in seconds, brought into a defined state on purpose and discarded again afterwards. What used to be days of manual work becomes an incidental step in the pipeline.

The Test Automation Pyramid

Mike Cohn’s pyramid describes the recommended ratio of the different test types. The broad base consists of many fast unit tests that verify individual software components in isolation. Because they sit at the lowest architectural level, they run quickly and stay largely indifferent to changes in the user interface.

Above them sit the integration tests, which check how components and services interact. API tests are a typical representative here: they test through public interfaces without involving the graphical UI. That makes them considerably more maintainable than GUI tests, since layout and interaction changes leave them untouched.

At the tip of the pyramid stand the end-to-end tests through the graphical user interface. They test the complete system from a user perspective and give the most realistic picture. At the same time they are slow, maintenance-intensive and sensitive to every surface change. That is why they should be the smallest group in numbers, however valuable any single one of these tests may be.

The pyramid is a guide, not an absolute rule. In some domains, particularly microservice architectures with many service boundaries, the balance shifts more toward the integration tests than the unit tests. Adopt the distribution dogmatically from the textbook, without looking at your own architecture, and you have misunderstood the idea behind the pyramid.

Strategy Before Tools

The most common reason test automation projects fail is choosing the tool before defining the strategy. Teams settle on a framework because it sounds modern or because a colleague had a good experience with it. What should actually be automated and who will maintain the tests over the long term was never clarified beforehand.

An automation strategy answers the questions that would otherwise have to be answered later and at greater cost: which test levels are being automated, what test data is needed and where it comes from, how the automated tests integrate into the CI/CD pipeline, who maintains the tests when the software changes, and what quality standards apply to the test code itself.

Test automation code is production code. It must be developed with the same standards as the system it checks: version control, code reviews, clean structure, meaningful naming. Automated chaos is, in the end, merely faster chaos. Ignore this discipline and you pay for it later in high maintenance costs and in tests that no one trusts any more.

Agile, DevOps and Shift-Left

In agile projects, test automation is necessary from day one, not as a later luxury. Anyone who starts only after several sprints ends up chasing an ever-growing pile of manual regression tests. That pile builds with each iteration and eventually becomes almost impossible to recover from.

DevOps and continuous testing push this principle further: tests run automatically after every commit, and the CI/CD pipeline contains quality gates that only let a build proceed when all relevant tests pass. The DevOps principle is simply not achievable without test automation. The required pace cannot be sustained by hand.

Shift-Left means moving test activities earlier into the development process. Test-Driven Development (TDD) is the most consistent expression of it: the tests are written before the production code and define the specification. ATDD (Acceptance Test Driven Development) transfers that idea to the acceptance criteria and brings the domain experts directly into the test specification. Business expectation and technical check speak the same language from the outset.

Maintainability and Flaky Tests

The greatest long-term threat to a test suite is flaky tests: tests that pass or fail without any code change at all. Their causes lie in unstable test environments, poorly managed test data, timing dependencies or a lack of isolation between the individual tests. They are insidious precisely because they no longer give a clear signal.

Flaky tests erode confidence in the entire suite. Once a team has learned that a failing test is not a reliable indication of a genuine fault, it stops believing the results. At that moment the automation has lost its value, no matter how many tests it contains.

A flaky test should therefore be removed from the suite as soon as it is identified as such. Only then do root cause analysis and the fix follow. For GUI tests, explicit wait strategies outperform fixed timeouts, and the Page Object pattern, which encapsulates the interface logic, noticeably improves maintainability. More broadly, test automation code needs the same qualities one expects of good production code: reusable building blocks, clear naming conventions, documented preconditions and postconditions. A well-structured automated test is readable enough that even a tester without a development background understands exactly what it is checking.

Common Tool Categories

Every test level and use case has its specialised tools. The single tool that covers all requirements does not exist in practice. Web UI automation is dominated by Playwright and Selenium, with Playwright having gained considerable traction in recent years through better stability, built-in waiting and a modern API.

Unit testing is covered in most languages by standard frameworks: JUnit and TestNG for Java, pytest for Python, NUnit and xUnit for .NET. These frameworks are stable, well-documented and deeply integrated into the common CI/CD toolchains. API testing can be handled with REST-assured, Karate or Postman/Newman, load and performance testing rely widely on Gatling and k6, and BDD frameworks such as Cucumber or Robot Framework connect the business requirement to the technical test.

Which tool fits depends on the technology stack, the skills in the team and the automation objectives. A universally best tool does not exist. The bait has to appeal to the fish, not the angler: a proof of concept on your own system shows, before the purchase decision, whether a tool really copes with the quirks of the application. Support for a technology in principle guarantees nothing about compatibility with every real screen element.

Introduction Strategy

Successfully introducing test automation is a change management process, not a purely technical project. Expectations in the team and in management need to be realistic from the start: automation pays back, but not immediately and not at the push of a button.

A phased introduction in three steps has proven effective. In the pilot project, a manageable test area is implemented with one or two tool candidates. The goal is not completeness but learning: which tool fits the stack? What obstacles appear in practice that no product sheet mentions? Which test cases actually suit automation? After the pilot, these experiences are evaluated and the decisions on tool and strategy are made.

In the application phase, automation is used in a real project context for the first time, accompanied by coaching that helps the team build the necessary skills. Metrics such as test execution times, failure rates and maintenance effort make progress visible and supply the numbers with which the benefit can later be substantiated.

In the roll-out, automation is finally extended to further teams and areas, processes are adapted, standards documented and training programmes established. The long-term goal is a team that treats automation as a natural part of the development and testing process and no longer needs external support to sustain it.

In Practice

Automation projects rarely fail because of the technology. They fail because of unrealistic expectations, absent strategy, poor maintenance discipline or a team that no longer understands its own tests. The technology, in the end, is usually the smallest of the problems.

Frequently Asked Questions

Good candidates for automation include: frequently repeated regression tests, smoke tests before deployments, data-driven tests with many variations and load tests. Poor candidates are one-off tests and exploratory sessions.

The pyramid describes the recommended ratio of test types: many fast unit tests at the base, fewer integration tests in the middle and even fewer slow end-to-end tests at the top.

Widely used frameworks include Selenium and Playwright for web UI testing, JUnit and pytest for unit testing, REST-assured and Karate for API testing, and Gatling and k6 for load testing.

Flaky tests are automated tests that pass or fail without any code change. Common causes include unstable test environments, timing dependencies and poor test data management. Flaky tests erode trust in the entire test suite and should be removed from the suite immediately, then fixed.

ROI comes from comparing savings (reduced manual test effort, faster releases) against investment costs (setup, tooling, training, ongoing maintenance). Tests that run frequently, have stable requirements and carry clearly defined expected outcomes pay back fastest.

Software Quality is Attitude, Not Methodology

Richard Seidl coaches teams and leaders towards a genuine quality culture.