Skip to content
Wade Womersley

wade.one

wade womersley – york based software engineer

  • Home
  • 2026
  • October
  • 23
  • A Test Should Be Able to Disagree With the Implementation

A Test Should Be Able to Disagree With the Implementation

Posted on October 23, 2026 By
Software Engineer

A test that repeats the implementation can pass while proving very little. If the production code calculates a value and the test copies the same calculation to find the expected value, both can make the same mistake quite happily. I want the test to have a reason to disagree.

For me, that starts with the behaviour somebody depends on. Give it a concrete input and an expected outcome that follows from the requirement. If a bug involved the end of a date range, a repeated request or a missing record, keep that example. It explains why the test exists and gives a future change something meaningful to preserve.

That does not mean every line needs an elaborate test harness. Some changes are better checked by inspecting a render, running an existing integration check or verifying a real output. Building an abstraction purely so a trivial assignment can be tested often adds more code to maintain than the change itself. The check should fit the risk and the uncertainty.

I would rather review a small set of tests with clear failure meanings than a large set that mostly asserts its own setup. A useful failure says which promise broke. A green result should give us a specific reason to trust the behaviour, rather than just another number for a coverage report.

Share:

  • Share on Facebook (Opens in new window) Facebook
  • Share on X (Opens in new window) X
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Reddit (Opens in new window) Reddit

Related

Comments

comments

Tags: code-review software-quality testing

Post navigation

❮ Previous Post: Halloween Is Better With One Deeply Silly Decoration
Next Post: Feature Flags Need a Removal Plan ❯

You may also like

AI
Claude Code Routines Make Agents Feel More Like CI Jobs
June 3, 2026
Software Engineer
A Definition of Done Is the Best Coding Agent Prompt
August 25, 2026
Programming
What Good Kotlin Code Feels Like After Too Much Java
April 7, 2026
Software
Android Developer Verification Is a Release Process Change
May 21, 2026
  • AI
  • artificial intelligence
  • Ego-centric
  • Events
  • Films
  • Food
  • Gaming
  • Gym
  • Hardware
  • Holidays
  • News
  • PHP
  • Programming
  • Random Stuff
  • Reviews
  • Science
  • SEO
  • Software
  • Software Engineer
  • Support
  • Uncategorized
  • Work

Copyright © 2026 wade.one.

Theme: Oceanly News Dark by ScriptsTown