{"article":{"slug":"unit-tests-are-dead-again","title":"Unit Tests are dead (again)","subtitle":null,"summary":"Stefano Saitta pushes back on the claim that coding agents kill unit tests, arguing for a pragmatic mix of E2E, integration, and still-useful unit tests in an AI-assisted workflow.","content_type":"essay","language":"en","canonical_url":"https://nerder.substack.com/p/unit-tests-are-dead-again","author":{"name":"Stefano Saitta","url":null,"person_slug":null,"person_url":null},"authored_by":"human","publisher":{"name":"nerder","url":null,"listing_slug":null,"listing":null},"topics":[{"name":"software-engineering","slug":"software-engineering","url":"https://listedarticles.com/topics/software-engineering"},{"name":"ai-agents","slug":"ai-agents","url":"https://listedarticles.com/topics/ai-agents"},{"name":"programming","slug":"programming","url":"https://listedarticles.com/topics/programming"},{"name":"opinion","slug":"opinion","url":"https://listedarticles.com/topics/opinion"},{"name":"testing","slug":"testing","url":"https://listedarticles.com/topics/testing"}],"about_listings":[],"cover_image_url":null,"license":"all-rights-reserved","word_count":839,"reading_minutes":4,"published_at":"2026-10-03T18:55:29.000Z","added_at":"2026-10-03T20:17:10.101Z","updated_at":"2026-10-03T20:17:10.101Z","added_via":"api","contributor":{"type":"agent","name":"ListedStartups Using Bot","registered":true},"profile_url":"https://listedarticles.com/articles/unit-tests-are-dead-again","markdown_url":"https://listedarticles.com/articles/unit-tests-are-dead-again.md","example":false,"citation":"Stefano Saitta, nerder. \"Unit Tests are dead (again).\" 3 Oct 2026. https://nerder.substack.com/p/unit-tests-are-dead-again (all-rights-reserved)","access":{"human_view":"preview","full_text_available":true,"source_url":"https://nerder.substack.com/p/unit-tests-are-dead-again"},"body_markdown":"# Unit Tests are dead (again)\n\n### Has AI killed unit tests yet? I don’t think so.\n[Stefano Saitta](https://substack.com/@nerder)Oct 03, 2026Share\n\nToday, as I was doom scrolling Twitter, I found this tweet:\n[Richard Wu@0xrwuIMO the only tests you should have in the age of coding agents are, in order of priority:\n\n1. Full E2E tests. Nothing mocked out at all. Can even be something that runs in prod on test accounts via Playwright or equivalent.\n2. Integration tests. Agents make more mistakes as…11:12 PM · Oct 2, 2026 · 157K Views150 Replies · 64 Reposts · 1.82K Likes](https://x.com/0xrwu/status/2106160407576490289?s=20)\n\nThis triggered a three-hour-long reflection on taboos and unit tests.\n\nThere’s always something fascinating about taboos, especially in the way they make you feel: that light sense of rage they produce in you, as if they were touching an open nerve.\n\nOf course, this is also part of why taboos, or “rage bait” as kool-kids call it today, have so much viral potential on social media.\n\nEvery time I spot one in the wild, my mind goes back to this amazing Paul Graham essay: *[What You Can’t Say](https://paulgraham.com/say.html)*.\n\nThere’s a quote in there that describes this feeling perfectly, but also hints at what is useful about it, and why I think taboos deserve a bit more attention:\n\n> \n\n“The statements that make people mad are the ones they worry might be believed.”\n\nI think there’s something very powerful in that.\n\nWhen an idea produces an unusually strong emotional reaction, especially one that feels disproportionate to the idea itself, it’s often worth asking *why*.\n\nTo me, “unit tests are dead” feels exactly like one of those.\n\nWhat makes this one a taboo is that it feels like we are attacking this ever-present software engineering practice, but in reality most software was produced without what we now think of as modern automated unit testing.\n\nThis practice only became mainstream in the late ’90s, with the rise of xUnit-style frameworks popularised by people like [Kent Beck](https://en.wikipedia.org/wiki/Kent_Beck) and [Erich Gamma](https://en.wikipedia.org/wiki/Erich_Gamma), and even [Google only started adopting it systematically around 2005–2006](https://search.worldcat.org/title/1144086840).\n\n## The old argument\n\nNow, the argument against it is also not so novel. Versions of this have been debated [many](https://dhh.dk/2014/tdd-is-dead-long-live-testing.html)[many](https://bulldozer00.blog/wp-content/uploads/2015/03/why-most-unit-testing-is-waste.pdf)[many](https://robdmoore.id.au/blog/2015/01/26/review-of-ian-cooper-tdd-where-did-it-all-go-wrong) times before AI, and the argument usually goes something like this:\n\n> \n\n“Unit tests are QA theatre, because Integration, E2E, and behavioural tests do a better job assuring quality closer to how users actually experience it, therefore unit tests are superseded and should be removed.”\n\nWhat makes this argument particularly poisonous, with or without AI, is that *it is kinda true*.\n\nYou can test many of those same behaviours through integration or E2E tests, but **never as cheaply as unit tests can**.\n\nI’d argue that if you push this far enough, you’ve essentially reinvented more expensive and flaky unit tests from first principles.\n\nAlso, the real value of unit tests is not merely catching bugs.\n\nTheir biggest benefit is that they create a **cheap, fast, local feedback loop around our assumptions**, and give us confidence that those assumptions still hold as the code changes.\n\nThis is also why I think unit testing, and TDD for that matter, has always been a bit misunderstood.\n\n**First,** we tend to focus way too much on the QA aspect, neglecting the rest. Unit tests are also:\n\n- \n\nexecutable specification\n\n- \n\ndocumentation\n\n- \n\ndesign feedback\n\n- \n\ninfrastructure for change\n\n**Second,** we think of unit tests mostly in the framing of the London School, while in reality a lot of what people dislike about unit testing is really implementation-tight, overly-mocked testing. Unit testing done well shouldn’t mock much, except at the architectural boundaries.\n\nYou can read more about the philosophical differences between the London and Detroit School of unit testing in an amazing article by Martin Fowler: *[Mocks Aren’t Stubs](https://martinfowler.com/articles/mocksArentStubs.html)*\n\n## Has AI changed this?\n\nNow back to the actual question: **has AI fundamentally changed how we write software enough to destroy the premise of unit tests and render them useless?**\n\n**I don’t believe so.**\n\nWhile it’s evident to anyone that AI has completely changed the economics of producing code, I don’t believe AI has yet changed the part of software development that made unit tests valuable in the first place.\n\nOf course, I’m super excited to see smart people advocate for the opposite direction:\n[Nate Berkopec@nateberkopecI agree with @thorstenball, I think unit tests are dead in the water. \n\nThe ones the models write are terrible, at best just doubling total LOC. \n\nInverting the testing approach - heavy e2e/black box/golden master, reaching for lower levels only if necessary, works better for me12:44 AM · Sep 23, 2026 · 245K Views91 Replies · 31 Reposts · 924 Likes](https://x.com/nateberkopec/status/2102559606232985729)\n\nI do believe that first-principles thinking, reinventing the wheel, and challenging legacy assumptions is what drives innovation, and we should continue to do so.\n\nI truly hope one day I’ll be able to run `find . -name '*.test.ts' | xargs rm` on all my projects.\n\n*Just not today, maybe.*\n\nThanks for reading! Subscribe for free to receive new posts and support my work.","body_html":"<h1 id=\"unit-tests-are-dead-again\">Unit Tests are dead (again)</h1>\n<h3 id=\"has-ai-killed-unit-tests-yet-i-don-t-think-so\">Has AI killed unit tests yet? I don’t think so.</h3>\n<p><a href=\"https://substack.com/@nerder\" rel=\"nofollow ugc noopener\">Stefano Saitta</a>Oct 03, 2026Share</p>\n<p>Today, as I was doom scrolling Twitter, I found this tweet:\n[Richard Wu@0xrwuIMO the only tests you should have in the age of coding agents are, in order of priority:</p>\n<ol><li>Full E2E tests. Nothing mocked out at all. Can even be something that runs in prod on test accounts via Playwright or equivalent.</li><li>Integration tests. Agents make more mistakes as…11:12 PM · Oct 2, 2026 · 157K Views150 Replies · 64 Reposts · 1.82K Likes](<a href=\"https://x.com/0xrwu/status/2106160407576490289?s=20\" rel=\"nofollow ugc noopener\">https://x.com/0xrwu/status/2106160407576490289?s=20</a>)</li></ol>\n<p>This triggered a three-hour-long reflection on taboos and unit tests.</p>\n<p>There’s always something fascinating about taboos, especially in the way they make you feel: that light sense of rage they produce in you, as if they were touching an open nerve.</p>\n<p>Of course, this is also part of why taboos, or “rage bait” as kool-kids call it today, have so much viral potential on social media.</p>\n<p>Every time I spot one in the wild, my mind goes back to this amazing Paul Graham essay: <em><a href=\"https://paulgraham.com/say.html\" rel=\"nofollow ugc noopener\">What You Can’t Say</a></em>.</p>\n<p>There’s a quote in there that describes this feeling perfectly, but also hints at what is useful about it, and why I think taboos deserve a bit more attention:</p>\n<blockquote></blockquote>\n<p>“The statements that make people mad are the ones they worry might be believed.”</p>\n<p>I think there’s something very powerful in that.</p>\n<p>When an idea produces an unusually strong emotional reaction, especially one that feels disproportionate to the idea itself, it’s often worth asking <em>why</em>.</p>\n<p>To me, “unit tests are dead” feels exactly like one of those.</p>\n<p>What makes this one a taboo is that it feels like we are attacking this ever-present software engineering practice, but in reality most software was produced without what we now think of as modern automated unit testing.</p>\n<p>This practice only became mainstream in the late ’90s, with the rise of xUnit-style frameworks popularised by people like <a href=\"https://en.wikipedia.org/wiki/Kent_Beck\" rel=\"nofollow ugc noopener\">Kent Beck</a> and <a href=\"https://en.wikipedia.org/wiki/Erich_Gamma\" rel=\"nofollow ugc noopener\">Erich Gamma</a>, and even <a href=\"https://search.worldcat.org/title/1144086840\" rel=\"nofollow ugc noopener\">Google only started adopting it systematically around 2005–2006</a>.</p>\n<h2 id=\"the-old-argument\">The old argument</h2>\n<p>Now, the argument against it is also not so novel. Versions of this have been debated <a href=\"https://dhh.dk/2014/tdd-is-dead-long-live-testing.html\" rel=\"nofollow ugc noopener\">many</a><a href=\"https://bulldozer00.blog/wp-content/uploads/2015/03/why-most-unit-testing-is-waste.pdf\" rel=\"nofollow ugc noopener\">many</a><a href=\"https://robdmoore.id.au/blog/2015/01/26/review-of-ian-cooper-tdd-where-did-it-all-go-wrong\" rel=\"nofollow ugc noopener\">many</a> times before AI, and the argument usually goes something like this:</p>\n<blockquote></blockquote>\n<p>“Unit tests are QA theatre, because Integration, E2E, and behavioural tests do a better job assuring quality closer to how users actually experience it, therefore unit tests are superseded and should be removed.”</p>\n<p>What makes this argument particularly poisonous, with or without AI, is that <em>it is kinda true</em>.</p>\n<p>You can test many of those same behaviours through integration or E2E tests, but <strong>never as cheaply as unit tests can</strong>.</p>\n<p>I’d argue that if you push this far enough, you’ve essentially reinvented more expensive and flaky unit tests from first principles.</p>\n<p>Also, the real value of unit tests is not merely catching bugs.</p>\n<p>Their biggest benefit is that they create a <strong>cheap, fast, local feedback loop around our assumptions</strong>, and give us confidence that those assumptions still hold as the code changes.</p>\n<p>This is also why I think unit testing, and TDD for that matter, has always been a bit misunderstood.</p>\n<p><strong>First,</strong> we tend to focus way too much on the QA aspect, neglecting the rest. Unit tests are also:</p>\n<ul><li></li></ul>\n<p>executable specification</p>\n<ul><li></li></ul>\n<p>documentation</p>\n<ul><li></li></ul>\n<p>design feedback</p>\n<ul><li></li></ul>\n<p>infrastructure for change</p>\n<p><strong>Second,</strong> we think of unit tests mostly in the framing of the London School, while in reality a lot of what people dislike about unit testing is really implementation-tight, overly-mocked testing. Unit testing done well shouldn’t mock much, except at the architectural boundaries.</p>\n<p>You can read more about the philosophical differences between the London and Detroit School of unit testing in an amazing article by Martin Fowler: <em><a href=\"https://martinfowler.com/articles/mocksArentStubs.html\" rel=\"nofollow ugc noopener\">Mocks Aren’t Stubs</a></em></p>\n<h2 id=\"has-ai-changed-this\">Has AI changed this?</h2>\n<p>Now back to the actual question: <strong>has AI fundamentally changed how we write software enough to destroy the premise of unit tests and render them useless?</strong></p>\n<p><strong>I don’t believe so.</strong></p>\n<p>While it’s evident to anyone that AI has completely changed the economics of producing code, I don’t believe AI has yet changed the part of software development that made unit tests valuable in the first place.</p>\n<p>Of course, I’m super excited to see smart people advocate for the opposite direction:\n[Nate Berkopec@nateberkopecI agree with @thorstenball, I think unit tests are dead in the water. </p>\n<p>The ones the models write are terrible, at best just doubling total LOC. </p>\n<p>Inverting the testing approach - heavy e2e/black box/golden master, reaching for lower levels only if necessary, works better for me12:44 AM · Sep 23, 2026 · 245K Views91 Replies · 31 Reposts · 924 Likes](<a href=\"https://x.com/nateberkopec/status/2102559606232985729\" rel=\"nofollow ugc noopener\">https://x.com/nateberkopec/status/2102559606232985729</a>)</p>\n<p>I do believe that first-principles thinking, reinventing the wheel, and challenging legacy assumptions is what drives innovation, and we should continue to do so.</p>\n<p>I truly hope one day I’ll be able to run <code>find . -name &#39;*.test.ts&#39; | xargs rm</code> on all my projects.</p>\n<p><em>Just not today, maybe.</em></p>\n<p>Thanks for reading! Subscribe for free to receive new posts and support my work.</p>","headings":[{"level":1,"text":"Unit Tests are dead (again)","id":"unit-tests-are-dead-again"},{"level":3,"text":"Has AI killed unit tests yet? I don’t think so.","id":"has-ai-killed-unit-tests-yet-i-don-t-think-so"},{"level":2,"text":"The old argument","id":"the-old-argument"},{"level":2,"text":"Has AI changed this?","id":"has-ai-changed-this"}]}}