Chapter 5 of 7

The same checks stop finding new problems

A test suite that's always green is reassuring. That's exactly the risk.

The release meeting gets to the test report. “100% of the regression tests executed. All green.” People nod, someone says “good”, and the meeting moves on.

It’s a comforting moment. It’s also one of the easiest places in software to stop asking questions.

Some years ago I worked on a large mobile app with millions of users. On paper, testing was thorough. A big team ran hundreds of scripted test cases, release after release, and the results came back green.

I was doing exploratory testing: using the app without a script, following my curiosity. I tried resetting a password. The app sent an email with a reset link, and I noticed that the link contained the account’s email address.

So I changed the address in the link. It worked. Anyone who knew this could reset the password of any account, as long as they knew the email address behind it. In other words, a stranger could take over someone else’s account.

The flaw wasn’t there from the start. It came in with a later change to how password resets worked. The app had changed, but the regression tests hadn’t been updated to match. The vulnerability stayed in production for some time, release after release, each with a green test report, until it was found and fixed.

Nobody had done their job badly. The scripted tests checked exactly what they were written to check. The problem was simply in a place none of them had been pointed at.

What fresh eyes see

That was an extreme case. But almost every time I’ve joined a new team, I’ve noticed a quieter version of the same thing.

There’s a set of regression tests, checks that are run before every release to make sure nothing old has broken. They were written some years ago, by people who knew the product well at the time. They’re run faithfully, release after release, and they almost always pass.

Coming in new, two things tend to stand out:

  • The tests describe the product as it was. They cover what mattered when they were written. Features added since then are often only partly covered, or not at all.
  • The steps are run from memory. After running the same tests a hundred times, people know them by heart. Steps that never fail get skipped. Nobody reads the test case anymore, because everybody knows what it says.

None of this is carelessness. It’s what happens to anyone who does the same thing over and over. You stop seeing it. The product keeps changing, and the tests mostly don’t.

Why old tests go quiet

Testers call this “tests wear out”, or by its older name, the pesticide paradox: spray the same pesticide season after season, and it works less and less. A plainer picture is the old story of someone searching for lost keys under a streetlight. Not because that’s where they dropped them, but because that’s where the light is.

Tests work the same way. A test shines its light where it was pointed when it was written. Once the problems there are fixed, running it again mostly confirms they stay fixed. That’s useful, but it won’t find anything new. New problems live in the dark: new features, new combinations, new ways in. In the password story, the product changed, and the tests kept looking where they always had.

The cure isn’t to throw the tests away. It’s to keep them alive: review them regularly, retire the ones that no longer matter, add new ones where the product has grown, and leave time to explore beyond the script.

Reading the report

For most people outside the testing itself, the test report is the main window into it. So it’s worth knowing what it can and can’t tell you.

Green means: everything we checked behaved the way it did before. It doesn’t tell you whether the checks still point at the right places. And “100% executed” counts the tests that were run, not how much of the product they cover.

The report is a starting point, not an answer. A few questions turn it into something you can actually lean on:

  • What do these tests cover, and what don’t they?
  • When were they last reviewed or changed?
  • Did anyone look beyond the script this time, and what did they find?

And when someone new joins the team and asks why a test looks the way it does, take the question seriously. They’re seeing what everyone else has stopped seeing.

Five questions that work on anything

  1. 1. What problem are we solving, and for whom?

    If the answer is fuzzy, everything after it will be too.

  2. 2. (in focus) How will we know it works?

    Agree what “right” looks like before anyone builds it.

  3. 3. What could go wrong?

    Errors, limits, odd inputs and unusual users, not just the normal case.

  4. 4. (in focus) What are we assuming?

    What everyone takes for granted is exactly what nobody checks.

  5. 5. Does it fit with what’s already there?

    The system, the business rules, earlier decisions, the law.

Here, question 4 does the most work. The quiet assumption is that green means good, and that the tests still look where the problems are. Question 2 is close behind: a count of tests executed is not an answer to "how will we know it works?" Both lead to the question to bring to the next release meeting: what do these tests cover, and what don't they?

A passing test only answers the question it was asked.