TOPIC 15/4017 MINNOT STARTED

Test smells and maintainable checks

Spot the signs that an automated check will be hard to keep, and write checks that survive harmless change.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: kitchen hygiene. You smell the bin long before you see mould. A smell is a warning. It does not mean the food is ruined. It means: look now, before it gets worse.

Daily List is a to-do list app. Tom has a suite of automated checks. Some of them fail every time Leo renames a helper in the code. The users see no change at all. Nobody dares to touch these checks, because nobody can tell what they are for.

Those are smells in the test code. A is a sign that will be hard to read, trust or change later, even if it passes today.

The picture has limits. A food smell is the same for everyone. A test smell depends on the team and the moment, so it is a hint, not a verdict.

(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)

PLAIN WORDS · 1 in this section
renames
gives a new name

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Noticing early signs that will be hard to keep, and fixing them while the repair is still small.

  1. Notice the sign
  2. Ask what the user sees
  3. Make the small fix
  4. Keep cleaning in small steps
Smell it early

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The smellA sign in the test code, such as copied steps
The mouldA suite nobody trusts or touches
Cleaning the fridge each weekSmall, steady repairs
Eating the foodRunning the check and seeing a pass

WHERE THIS PICTURE STOPS

  • A food smell is the same for everyone. A test smell depends on the team.
  • A bad smell means throw it away. A test smell means look closer.
  • Mould is easy to see. Smells in test code need a reader to notice.

HOOK

Smell it early.

REMEMBER IT THIS WAY

A sequence: the real steps, in order.

When feels wrong, ask in order: what smells, what does the user see, what is the small fix?

What each part of the trick stands for
In the trickWhat it stands for
What smellsA sign in the test code, such as copied steps
What does the user seeThe users see no change at all
The small fixRepair while the repair is still small

A smell is a hint, not a verdict, and it depends on the team and the moment.

TELL A FRIEND

A smell is an early warning that will go bad. Fix it while it is small.

OFTEN MIXED UP WITH Reading an automated check. The reading lesson shows how to follow one check. This lesson asks whether the check will be easy to keep.

PRACTISE AND KEEP

Sources for this topic — 6 sources
  1. Market practice

    The Open Catalog of Test Smells ↗ — Open Catalog of Test Smells · Test smells are grouped as code smells, behaviour smells such as Fragile Test and Assertion Roulette, and project smells such as high test maintenance cost (search excerpt, page not opened)

    Groups test smells into code smells seen when reading test code, behaviour smells seen when tests run (including Fragile Test, Assertion Roulette, Slow Tests) and project smells such as high test maintenance cost. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  2. Market practice

    Mystery Guest (thoughtbot, after Meszaros's xUnit Test Patterns) ↗ — thoughtbot · Obscure Test is a test that is hard to understand by reading it, and Mystery Guest is one cause (search excerpt, page not opened)

    Describes a test that is hard to understand by reading it, with causes that include Mystery Guest, where the test depends on data or resources it does not show. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Unit Testing, chapter 12 of Software Engineering at Google ↗ — Google (Abseil) · Tests should exercise public behaviour, not implementation details; brittle tests fail on harmless change and take a growing share of a team's time (search excerpt, page not opened)

    Says tests should exercise public behaviour rather than implementation details, that brittle tests fail on harmless change, and that a team who regularly writes brittle tests will spend a growing share of time on test maintenance. Practitioner or vendor guidance, not a standard unless stated. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Market practice

    Testing on the Toilet: Test Behaviors, Not Methods (Google Testing Blog, 2014) ↗ — Google · Test behaviours, not methods (search excerpt, page not opened)

    Advice to name and write unit tests around behaviours. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  5. Market practice

    What to look for in a code review (Google Engineering Practices) ↗ — Google · A reviewer checks design, functionality, complexity, tests, naming and comments (search excerpt, page not opened)

    Lists what a reviewer checks: design, functionality, complexity, tests, naming and comments. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  6. Market practice

    Certified Tester Advanced Level Test Automation Engineering sample exam answers, version 2.2 (copy hosted by the American Software Testing Qualifications Board) ↗ — American Software Testing Qualifications Board · The answer key shows a section 4.3 objective on keeping automation code maintainable (search excerpt, page not opened)

    Per search excerpts, the answer key links each sample question to a learning objective. It shows objectives on how automation applies across lifecycle models, on keeping automation code maintainable, on analysing automation data, and on improvement techniques. Its rationale for one improvement question says schema validation can be used in API testing but not in testing through the screen. The exact objective wording was not seen. · Checked 2026-10-25

    Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. Version: Version 2.2.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.