The Effects of AI on Unit and Functional Testing
Published on August 11, 2025
I've always been against tests, whether unit or functional — I find them counterproductive.
The Impact of Tests
Empirically, what does it show?
Empirically speaking, with over 10 years of career experience, I've always observed around me and in my circle that successful projects had strictly no tests — the opposite of expected best practices.
When I speak of successful projects, I mean projects that make money — those that allow us to pay our salaries. This can be a startup project or a company's legacy project, that "poorly coded" project that nobody really understands but that clients nevertheless love.
This is the common point among all legacy projects: they generate revenue, otherwise they would have been abandoned long ago. And above all, they were designed without any tests.
Today, we do things properly, with beautiful architecture, well-organized sprints, nice pipelines, and tests everywhere. Everyone works this way now — but meanwhile, what works is the opposite.
Tests Are Tedious
Beyond the empirical side, what bothers me about tests is that they're long and tedious to code. To develop a new feature, 50% of development time is devoted to writing tests. Not only does this take half the time, but it also requires more energy and concentration than the functionality itself. You have to think about covering all possible use cases, including the most twisted ones — this requires a lot of energy — energy that could be used to develop other features or fix bugs. Add to this that with the slightest refactoring or feature change in the next sprint, all tests will break and need to be redone.
This is why I find tests counterproductive. I think they're only useful for complex or critical application functionalities.
It's more efficient not to write tests and, when bugs are discovered, to fix them quickly. This saves so much time that it allows fixing more bugs and developing more features. Even if fewer bugs are caught, dividing dev time by two by removing tests allows going theoretically twice as fast. Also theoretically dividing dev costs by two. We quickly understand why some projects are successful and profitable and others are not.
Tests and Morale
Another negative point about tests is morale. Tests aren't fun to write. Nobody becomes a developer out of passion for writing tests. The proof: nobody writes tests in their personal projects.
When you spend 50% of your time doing something you don't enjoy, it weighs on morale. Nobody admits it because nobody wants to appear unmotivated — but it weighs on you.
It's normal to do things we don't like; we all vacuum at home, yet nobody likes doing it. If we had to spend 50% of our free time vacuuming, I think everyone would find that problematic. Look at how many people let dishes pile up in the sink — we can see that it weighs on motivation.
A less motivated dev is a less performant dev. If not only do they spend only 50% of their time developing features, but they're also demotivated, it becomes even more problematic.
The Arrival of AI
AI has completely changed the way applications are developed. It's criticized for the quality of code it produces and for the maintainability problems this will cause. But the constant improvement of models has greatly improved the quality of generated code. Since Claude 4's arrival in May, its efficiency is even more significant — and this will only improve in the coming years.
I think that contrary to widespread ideas, AI will improve code quality. It compensates for all the drawbacks of tests.
Using Claude Code (or any performant model), writing tests becomes trivial and takes only a few minutes. Same for refactoring, Claude will never complain about having to fix tests. As a dev, it's no longer necessary to spend energy and concentration when writing tests. You just need to check that the generated tests are correct and coherent. No more morale drops either after spending an afternoon writing tests.
AI will not only accelerate work but will also allow developers to write tests more easily and quickly, ensuring code quality.
Conclusion
With AI, we will finally be able to enjoy all the positive sides of tests without any of the negative sides.
Tests will continue to guarantee code quality, detect regressions, and document the expected behavior of the application — all the benefits we were seeking.
But we will no longer have to endure slow development, the frustration of tedious test writing, or the demotivation that results from it. AI takes care of the painful part, leaving us to focus on what we really love: creating features and solving problems.
This is probably one of the most important evolutions in our profession: finally reconciling quality and productivity.