It’s well known in software testing circles that developers (formerly known as programmers) can’t test. Testers often make jokes about this – but that’s okay, developers make jokes about us too, so we’re even.
The question is: is there truth behind this pervasive myth? The confusing answer is: yes and no.
Developers can test
First of all, I’d like to say I believe many developers can and do test. Some are great at ensuring their code is unit tested, and that any component integration is also proven. They know their code intimately, and can quickly craft detailed test conditions and cases that a tester who is unfamiliar with the code would struggle with.
Most developers are adept at running white box tests in isolation to ensure obscure parts of the code are covered. Again, without knowledge of the code, a tester might struggle to reach these parts if there is no comprehensive documentation available.
When developers shouldn’t test
The problem arises when a developer attempts to step away from their own code and carry out a more realistic test such as a system test. Distance is a very difficult thing to achieve when you have an intimate knowledge of the inner workings of a system, and even though a developer may think they are being completely objective, there is a tendency to subconciously write tests to fit the code.
The old issue of mindset comes into the equation. No matter how hard one focuses, a developer tends to think in terms of testing to prove their code works, while a tester takes the approach of proving it doesn’t!
Trust me, I’ve been there: I was a developer for ten years before I became a tester.
Independence is required
When a full system test is being carried out, developers should take a back seat to independent testers who are not testing from the code, but instead from higher-level functional specifications and design documents agreed with the end-user.
It needn’t always be a dedicated tester – for smaller projects, another developer who was not involved in coding the product may be able to bring some independence to the testing.
Thousands of words could be written about this, so I’ll stop here and end by saying I think the claim that developers can’t test is valid to a point, but only when a developer is attempting to test their own code in a wider context.
Care to join the discussion? Please leave a comment and let me know what you think.