Dokven

Loading Dokven.
Advanced 9 min read

Manual vs automation: what to automate and when

When test automation pays off and when a human is better, the test automation pyramid, the real cost of maintenance, and why flaky tests quietly ruin teams.

Imagine you have to check that a light switch works. Once, it's trivial: flip it, see the bulb glow, done. But now imagine flipping that same switch a thousand times a day, every day, forever, and writing down the result each time without ever getting bored or distracted. That is the moment a human stops being the right tool and a machine starts. Automation is not about replacing testers: it's about handing the dull, repetitive checks to a robot so the human is free to do the thinking only a human can do.

The hard part isn't writing automated tests. It's deciding which tests deserve to be automated at all. Automate the wrong things and you build a slow, fragile suite that everyone learns to ignore. Get it right and you ship faster with more confidence than you ever could by hand.

Two tools, two strengths

Manual and automated testing are not rivals. They're a hammer and a screwdriver. Each is the right choice for a different job, and a healthy team uses both on purpose.

Manual testing shines when…

  • You're exploring something new and don't yet know what to check.
  • Judgement matters: does this feel confusing, ugly, or off?
  • A check runs once or twice, so writing a script would cost more than it saves.
  • The screen changes constantly, so automating it now means rewriting it tomorrow.
  • You're testing creativity, tone, or how a real person reacts.

Automation shines when…

  • The same check runs over and over (every build, every release).
  • The steps are exact and the right answer is unambiguous.
  • Speed matters: hundreds of checks must finish in minutes.
  • Humans make mistakes from boredom on long, repetitive checklists.
  • You need proof the old features still work after every change (regression).
The rule of thumb

Automate the boring, repetitive, predictable checks. Keep humans on the new, fuzzy, judgement-heavy ones. If you can't describe the expected result in one precise sentence, it's probably not ready to automate yet.

The test automation pyramid

Not all automated tests are created equal. A famous mental model called the test automation pyramid says: write lots of small, fast tests at the bottom, some medium tests in the middle, and only a few big, slow tests at the top. The shape matters: a wide base and a narrow tip.

UI / End-to-end tests

Few: slow, realistic, drive the whole app like a user

Integration tests

Some: check that pieces work together (e.g. app + database)

Unit tests

Many: tiny, instant, test one function in isolation

Why this shape? Because tests get slower and more fragile as you climb. A unit test runs in milliseconds and rarely breaks for the wrong reason. An end-to-end test opens a real browser, clicks through real pages, and can fail because the network hiccupped or an animation was half a second late. Both are valuable, but if your pyramid is upside-down (a handful of unit tests and a mountain of brittle UI tests) your suite becomes slow, unreliable, and painful to maintain.

LayerWhat it testsSpeedHow many
UnitOne function or component, aloneMillisecondsHundreds to thousands
IntegrationSeveral parts working togetherSecondsDozens to hundreds
UI / E2EThe whole app, as a user sees itSeconds to minutesA focused handful
The pyramid in numbers: fast and plentiful at the base, slow and selective at the top.

The cost nobody warns you about: maintenance

Here's the trap. Writing an automated test feels like a one-time cost, like buying a tool. It isn't. Every automated test is a tiny piece of software you now own forever. When the app changes (a button moves, a label is reworded, a page is redesigned) the test can break and someone has to fix it. A suite of 500 tests is 500 things that can demand your attention on a Monday morning.

This is why the real question isn't "can we automate this?" (almost anything can be automated) but "will this test save us more time than it costs us to maintain?". A check you run twice and then never again is rarely worth scripting. A check that guards your checkout flow on every single release is worth its weight in gold.

Beware the flaky test

A flaky test passes sometimes and fails other times without the code changing, maybe because it didn't wait long enough for a page to load. Flaky tests are poison: people stop trusting red results, start re-running until it's green, and eventually ignore failures that are real. A small suite you trust beats a huge suite you don't. Fix flakiness fast, or delete the test.

So what should you actually automate?

Start with the checks that are high value and high repetition: the core flows that must never break (login, checkout, sign-up), the regression checks you'd otherwise re-run by hand every release, and anything tedious enough that a tired human would slip. Leave exploratory testing, visual judgement, and brand-new half-baked features to people. Over time, as a feature stabilises and stops changing every week, it graduates from manual to automated.

Key takeaways
  • Manual and automation are complementary: humans for judgement and exploration, machines for repetition and speed.
  • The automation pyramid: many fast unit tests at the base, fewer slow UI/end-to-end tests at the top. An upside-down pyramid is slow and fragile.
  • Every automated test is software you maintain forever. Automate only when the time saved beats the time spent keeping it alive.
  • Flaky tests destroy trust. A smaller suite you believe in is worth more than a huge one you ignore.
  • Automate the boring, repetitive, predictable, high-value checks first; let a feature stabilise before you script it.