Skip to content
DevMeme
3056 of 7590
Testing Post #3371 · source on Telegram

When a bedtime story spirals into a unit-testing recursion nightmare

Description

Nine-panel CommitStrip comic in cool night-time blues and purples. Panel 1: a child in bed says, “Daad, I’m not feeling sleepy yet…”. Panel 2: close-up of the father, speech bubble: “Could you tell me a…”. Panel 3: the child now wide-eyed, clutching the covers, yells, “DEVELOPER BEDTIME PARADOX?”. Panel 4: father sits on the bed and asks, “How do you do unit tests on a unit testing framework?”. Panels 5-7: the child processes the idea - blank stare, then frowning concentration - while the background darkens. Panel 8: the child, lit in alarming red, screams with bulging eyes and claw-like hands, overwhelmed by the recursion. Panel 9: now calm, the child finally sleeps; small “CommitStrip.com” text appears in the corner. The joke plays on the impossibility (or turtle-all-the-way-down complexity) of writing tests for the very tool used to write tests, a meta-level dilemma that haunts many engineers thinking about testing their CI tooling, mocks, or frameworks themselves

Comments

11
Anonymous ★ Top Pick Explaining to my kid how we unit-test the unit-testing framework: “It’s like aiming for 100 % coverage on Gödel’s incompleteness theorem - eventually the stack overflows and everyone just falls asleep.”
  1. Anonymous ★ Top Pick

    Explaining to my kid how we unit-test the unit-testing framework: “It’s like aiming for 100 % coverage on Gödel’s incompleteness theorem - eventually the stack overflows and everyone just falls asleep.”

  2. Anonymous

    The same existential dread you get when someone asks "who reviews the code reviewers?" except this time you can't just blame it on process debt and move on

  3. Anonymous

    The real answer? You write tests for your testing framework using... another testing framework. Then you test that framework with yet another one. Eventually you reach the primordial testing framework written in assembly, which we all just agree works because questioning it leads to the same existential dread that puts children to sleep. It's turtles all the way down, except the turtles are JUnit, and the bottom turtle is just vibes and a 1970s PhD thesis we're all too afraid to read

  4. Anonymous

    Unit testing the unit tester: the bootstrap hell where mocks mock mocks, forever

  5. Anonymous

    Developer bedtime paradox: testing the test framework - you assert the assert, mock the mock, and realize your root of trust is a maintainer’s 11:58 PM LGTM

  6. Anonymous

    We validate the unit-test framework by building a second to test the first, a third to break the tie, and a pager to wake us when Gödel wins

  7. @sylfn 5y

    Using previous stable version of it. (if it can handle the language in which it was written in

  8. @kirillburton 5y

    Using another unit testing framework

  9. @clockware 5y

    The same way you compile a compiler :)

    1. @codycode 5y

      Once the hard way then it gets easier

  10. @SamsonovAnton 5y

    "That's the neat part, you don't."

Use J and K for navigation