Why shouldn't developers test their own code? Because they won't find the bugs. At least not all of them, and precisely not the ones that then surface in production, at the worst moment and at the highest cost. This isn't a criticism of developers: the best developers know they are blind to their own work. This article shows why, what we learned from four real cases, what the research says, and what AI-generated code changes.
In brief
- Testing your own code is structurally limited: developers test with the same mindset that created the defect.
- Developer testing is still very valuable: in a study of Microsoft and IBM teams, test-driven development cut defect density by 40 to 90 percent.
- So the question isn't whether developers should test, but whether they should be the only ones testing.
- With AI-generated code, independent checking matters even more: in Veracode's study the generated code contained a security flaw in 45 percent of cases.
- For financial services firms, DORA requires independent testers when testing critical systems.
It's not the developer's fault, it's human attention
In Simons and Chabris's famous 1999 experiment, participants had to count the passes made by players in white in a basketball video. The task absorbed their attention so completely that many simply failed to notice a person in a gorilla suit walking through the scene. This is called inattentional blindness: what we are not paying attention to, we do not see, even when it is right in front of us.
When testing your own code, confirmation bias comes on top: we look for what proves we did a good job. The solution is already in the developer's head; they know how it was built and unconsciously follow the paths the system can handle. They rarely try edge cases, exceptions and unexpected user behaviour, because the same mindset that created the defect is now steering the testing. On top of that, they typically check only the part they changed, with the same test data.
This isn't carelessness. It is how the human brain naturally works.
Four cases I learned from
Deploying an Oracle procedure in a billing system
As a systems analyst, I worked on a new load procedure for an Oracle-based ordering and billing system, for a new online channel. We were running late, so on Friday afternoon I tested the finished program myself, and the programmer checked it too. It worked perfectly. We deployed it at around 7 pm and went home. And it really did work, but only the new feature. Because of dependencies, every other procedure in the database became invalid, so billing and online order processing stopped in 16 countries. We had only checked the new function, not the rest. By early the next morning we had everything running again.
An insurance claims mobile app
On an insurer's customer service mobile app, the development team had done thorough work and every internal test was green. We brought in an independent tester for the final phase, who found on day one that if a customer took a call in the middle of reporting a claim and then returned to the app, everything entered so far was lost, without any message. The developers had tested the claims process, not the combination of a phone call and the claims process.
A workflow system for a leasing company
At an operating lease company, the developer tests for a workflow automation project all passed. On day one the independent tester found that the system mishandled customer data containing accents and hyphens. On the Hungarian market, with Hungarian names. The developers had used unaccented, English test data, because that is how they type test data.
A telephone IVR ordering system
For an FMCG company we built a phone-based, keypad-driven ordering system. Every feature worked, but within an hour of going live it crashed. It turned out the server couldn't cope with many simultaneous keypresses, and the information we had about the number of concurrent calls was wrong too. There was no load test; we hadn't even thought of it.
The common lesson of the four cases is that none of the defects were in the code's logic. Each arose where the developer wasn't looking:
| Case | What was missed | Which test would have found it |
|---|---|---|
| Oracle billing system | Existing functions after the change | Regression testing |
| Insurance mobile app | A real usage situation (incoming call) | Scenario-based, exploratory testing |
| Leasing workflow | Realistic test data (accented names) | Test data design, boundary value analysis |
| IVR system | Real load | Load and performance testing |
Developer testing is valuable, just not enough
To be clear: developers absolutely should test. Nagappan and colleagues (Microsoft, IBM, North Carolina State University) studied four industrial teams, where teams using test-driven development (TDD) had 40 to 90 percent lower pre-release defect density than comparable teams not using TDD. The cost, according to management estimates, was 15 to 35 percent more initial development time, which the teams felt was offset by lower maintenance costs.
The test pyramid, described by Mike Cohn and popularised by Martin Fowler, captures this division of labour: many fast, low-level tests at the base, fewer integration tests in the middle, and a few broad tests covering the whole system at the top.
| Level | Typically done by | What it finds |
|---|---|---|
| Unit tests | The developer | Faulty logic in individual pieces of code |
| Integration tests | Developer and tester together | Faulty interaction between modules and systems |
| System and end-to-end tests | Independent tester | Business process defects, real situations, regressions |
| Non-functional tests | Specialist tester | Performance, load and security problems |
| User acceptance testing (UAT) | The business, supported by the tester | Whether the system really serves the intended business goal |
A unit test checks whether an isolated piece of code behaves as expected, not how the whole system responds to real user behaviour. The car industry has the same issue: every component meets its specifications on its own, and then in the assembled car the air conditioning and navigation running together drain the battery. Component-level tests won't find that.
The question isn't whether developers should test. It's whether they should be the only ones testing.
Why is an independent tester different?
Not because they are more talented than developers, but because their perspective is different. They look at the system from the outside, through the user's eyes, and testing is their main job, so they plan it systematically: coverage, boundary values, exceptions and regression. According to the syllabus of ISTQB, the international software testing qualifications board, independent testers tend to recognise different kinds of failures than developers because of their different backgrounds and perspectives, and they can challenge the assumptions the development was built on.
In financial services this is doubly true. With an insurance premium calculator, the question isn't whether the code is syntactically correct but whether the premium calculation matches the product description. Developers can rarely check that because they don't know the product in depth; a tester with domain knowledge, together with the business analyst where needed, can. DORA has raised this to regulatory level: testing of systems supporting critical or important functions must be done by independent parties, internal or external, without conflicts of interest. More on levels of independence and outsourcing models: when to outsource software testing.
What if AI writes the code?
AI tools now write a large share of code and generate tests for it too. That is convenient, but it brings a new risk. In Veracode's 2025 study, more than 100 large language models were tested on 80 coding tasks, and the generated code contained a security flaw in 45 percent of cases. For Java the rate was above 70 percent, and for cross-site scripting (XSS) vulnerabilities the failure rate was 86 percent. According to the study, larger and newer models did not perform meaningfully better on security.
If the same AI tool writes both the code and the tests, that is a complete lack of independence: the same assumptions end up in the tests as in the code. AI-generated code is therefore especially worth testing with an independent eye, security scanning and real business scenarios. More on software quality and AI: is software quality really low?
When is developer testing enough?
To be fair, not every project needs a dedicated independent tester. If the project is short and well defined, the user base is small and homogeneous, the consequences of defects are low-risk, and feedback from production is fast, developer testing is an acceptable compromise.
But if any of the following applies, independent testing is not optional:
- the system handles financial or personal data;
- hundreds or thousands of users will use it at the same time;
- compliance or regulatory requirements are involved;
- a defect could cause customer harm, data loss or reputational damage;
- the system integrates with existing core systems;
- a large share of the code was written by an AI tool.
On financial services projects these almost always apply.
Checklist: is developer testing enough for your project?
- Do developers write unit tests, and do they run automatically on every change?
- Is there a regression test that also checks existing functions after a change?
- Does someone who wasn't involved in development do the testing?
- Is realistic test data used (accents, boundary values, invalid input)?
- Is there load and performance testing for the expected peak?
- Are real usage situations tried out (interruptions, poor network, concurrent use)?
- Are AI-generated code and tests checked by a person and by security scanning?
- In a regulated environment, can the independence of testing be documented?
What we do differently at FrontX
- We get involved early (shift-left): the tester joins at specification review and tests finished features in parallel during sprints, not in one big final test cycle.
- We test with an independent eye: the tester isn't part of the development team, so there is no social pressure not to criticise a colleague's work.
- We bring industry knowledge: our testers understand insurance, banking and leasing business logic and work closely with our business analysts.
- We don't replace developers' unit tests but complement them with regression, end-to-end, load and security testing.
- Details on our software testing services page.
If you would like to assess whether your current testing practice is enough, we are happy to help: book a free consultation.
If you are a tester and want to work somewhere testing is a strategic role, not an after-the-fact check, see our open positions.
Frequently asked questions
Why shouldn't developers test their own code?
Because we are blind to our own work: developers unconsciously follow the paths the system handles, not the ones where it fails. Because of inattentional blindness and confirmation bias, the same mindset that created the defect steers the testing. An independent tester comes at it from a different perspective and finds different kinds of defects.
So should developers not test at all?
Of course they should. Developer unit tests and test-driven development are very valuable: in a study of Microsoft and IBM teams, TDD cut pre-release defect density by 40 to 90 percent. Developer testing is the foundation, but system-level and business-level defects need independent testing too.
What is the difference between developer testing and independent testing?
Developer testing (unit and integration tests) finds code-level defects. Independent testing checks how the whole system responds to real user behaviour and business rules, including regression, load and security. The two complement each other. Independent testing is best started once the system runs stably; otherwise the tester's time is wasted.
When is independent testing needed?
When the system handles financial or personal data, many users use it at the same time, regulatory requirements apply, it integrates with existing core systems, or a large share of the code was written by AI. For financial services firms, DORA requires independent testers for systems supporting critical functions.
Does AI-generated code need separate testing?
Yes. In Veracode's 2025 study, AI-generated code contained a security flaw in 45 percent of cases. If the same tool writes both the code and the tests, the tests rest on the same assumptions, so independent human and security checks are needed.
What does shift-left testing mean?
That the independent tester doesn't join at the end of development but is involved from the start of the project, from specification review to parallel testing during sprints. That way defects surface earlier and more cheaply.
László Behán is Managing Director and Co-Founder of FrontX Kft. He was previously CIO of Signal Insurance, Head of Development and Data Warehouse at Groupama Insurance, and Operations Director and board member at LeasePlan Hungaria. He has 25 years of IT and business leadership experience in financial services. LinkedIn profile


