What is test automation, and what should (and shouldn't) be automated?
BeginnerConceptTesting in DevOps
Answer
In one line: Test automation means using scripts and tools to run tests automatically — usually in the CI/CD pipeline — instead of a person clicking through the app; you should automate tests that are repeated often and give stable results.
Good candidates for automation:
- Unit tests — every function with real logic.
- API and integration tests — stable and fast to automate.
- Regression tests — run on every change.
- Smoke tests after each deployment.
- Critical user journeys (login, search, checkout) as a small E2E suite.
- Security scans, linting and static analysis.
- Performance tests for important endpoints.
- Infrastructure tests —
terraform validate, policy checks, Terratest.
Less suitable for automation:
- Exploratory testing — a human creatively trying to break things.
- Usability and look-and-feel — "is this confusing?" needs people.
- Features that change every week — the tests would need constant rewriting.
- One-time checks that will never be repeated.
Benefits:
- Fast feedback on every commit.
- Consistent, repeatable results.
- Makes frequent releases possible — you can't manually test 10 deploys a day.
- Frees testers to focus on exploratory and edge-case testing.
Good practices:
- Keep tests independent and deterministic (no flaky results).
- Run them in the pipeline, not just locally.
- Treat test code like production code: reviewed, clean, maintained.
- Track flaky tests and fix them quickly.
Example: a team automated its 2-day manual regression checklist into 300 API tests and 20 Playwright tests that run in 12 minutes. Testers now spend their time on exploratory testing of new features.
Tip for interviews: a balanced answer ("automate the repetitive, keep humans for exploration and usability") sounds more experienced than "automate everything".
More on Testing in DevOps
What is the testing pyramid?BeginnerWhat is the difference between unit, integration and end-to-end tests?BeginnerWhat are smoke tests and sanity tests?BeginnerWhat is regression testing?BeginnerWhat is shift-left testing, and how do you apply it in a pipeline?IntermediateWhat is contract testing, and why is it useful for microservices?Intermediate