DEV Community

Cover image for The Best Tests Aren’t the Ones That Pass
Markus Gasser
Markus Gasser

Posted on

The Best Tests Aren’t the Ones That Pass

There’s a trap in test automation that’s surprisingly easy to fall into:

You optimize for getting tests to pass instead of optimizing for learning something useful when they fail.

Those sound similar. They aren’t.

A good test doesn’t just turn green in CI. It survives the messy parts of a real software team: changing environments, stale state, UI refactors, prompt changes, preview deployments, and the occasional modal that decides scrolling is optional.

I’ve been reading a few interesting pieces lately that approach this from different angles.

For AI systems, this look at prompt change governance makes an important point: once prompts become part of production behavior, reviewing and approving their changes starts looking a lot like reviewing code.

The same operational thinking applies to APIs. This guide to choosing API testing tools focuses on the boring-but-important stuff: environment switching, sharing collections, and getting useful CI output.

Preview environments are another good example. Spinning one up is easy. Trusting the smoke test that runs against it is harder. This benchmark plan looks at setup friction, evidence quality, and whether cleanup is actually safe.

Even something as mundane as overlays can expose weak automation. Testing scroll lock, body freezing, and overscroll containment is a nice example of testing behavior instead of hard-coding implementation details.

And as AI test agents become more common, I suspect one metric will matter more than almost anything else: what happens after something goes wrong?

This benchmark for recovery-path quality explores exactly that.

A test that works on the happy path is a demo.

A test system that gives you useful evidence, adapts to ordinary change, and fails in understandable ways is infrastructure.

That’s a much higher bar.

Top comments (0)