Search This Blog


Friday, June 6, 2008

Why Developers should Do Testing

It suddenly occurs to my mind that asking developers to play tester's role once in a while is a good idea. Here are whys:
  1. Enable the developers to gain system knowledge
  2. Improve the developers writing skills
  3. Improve software quality.
  4. Make the developers better software engineer

Enable the developers to gain system knowledge

Typically on a large team, individual developers are each responsible for a component of the system. Testers, on the other hand, need to be at least rudimentary familiar with the whole system. Letting the developers test the system will get them to familiarize with the whole system, enabling them to see the big picture.

Improve the developers writing skills
Developers hate writing. Ask them to fill out form hurts them. Ask them to write report disgust them. Being a developer myself, I saw a lot of developers who have a hard time explaining his ideas in words.

But testers need to be reasonably good at writing, because the testers must be able to
  1. Write down the steps to reproduce the problem
  2. Explain what happened and what should happen.
  3. Make sure that other people can follow their bug report
If the developers come up with a bug report that no one else can understand, they would be asked to clarify their meaning, and this actually trains them to be a better writer next time. Repeat this a few times you will find that their ability to write improves.

Instead of sending the developers to communication courses, ask them to fill in bug reports!

Improve software quality
The whole point of testing is to improve software quality. Testers do find bugs, but after finding bugs for so long their bug count will start to decrease because the software starts to get immune to their way of testing.

Getting the developers to do testing will provide a fresh approach to testing, and hence uncover more bugs. It is also a form of dogfooding. The more the developers use the software, the more they feel the pain of end users. In this way they can design better features, better UI next time. The software quality improves as a result.

Make the developers better software engineer!
Testing can develop a developer. A developer's main job is to construct, whereas a tester's main job is to destruct. Different mentality, which is why sometimes a good tester may not be a good developer, and vice versa. Developers have been concerning about constructing, constructing, constructing the code all the time. Sometimes this makes them oblivious to the edge cases and the holes in their program. After all, the developers are paid to make sure that their code is matched to the specification. But what about things that are not found in specs? What about the situations that no one has thought of? Good testers must be critical minded, or else they would miss a lot of edge cases. Won't it be good if the developers can be critical minded when constructing their programs instead of throwing their half-baked code over the wall for the testers to test?

Not only that, testing job can help developers to realize the value of unit testing. Get the developers to wear the tester's hat, and ask them to make sure that a particular brittle feature is always working, let them do the mundane job of testing a feature over and over again, until they realize that automated testing is the only way to go. Sounds like a good way to promote unit testing ( although I haven't try it).


Anonymous said...

Nice post, however I have to ask. Is someone saying "developers shouldn't test"?

Perhaps I just haven't worked in the "right" places, but I've never been anywhere where it wasn't the developers responsibility to do full testing before turning over to beta testers, etc.

However, if it is the case that developers are not doing testing anymore...then I am deeplyconcerned of the future of development.

Soon Hui said...

There is a problem with most developer's testing. The developers are only supposed to satisfy themselves that their code works, often in one or two situation and that's it. No corner cases, no exceptional situation etc.

This kind of testing, is hardly testing

Pavel said...

While developers should test their own code prior to delivering it to the testers forcing them to do the testers´ job is stupid.

Regarding your reasons:
1. Testing gives knowledge about the interface and not about the system. To gain system knowledge you need to poke around the code. That is done best by letting the developers work with parts of the code they are not main maintainers of now and then.

2. Developers hate writing(as you said) and have poor communication skills. According to yor reasoning the only time they develop those skills is when testing so if they don't test they don't need those skills.

3. Of course you need new testers now and then. That is best done by rotating the testers between the projects and not by forcing developers to do the testing. Dogfooding should primarily be applied to the ones making resource decisions. If an UI is so bad it needs a redesign it becomes a management decision. So make the management test, not the developers.

4. Unit testing etc are good things and most developers agree. The problem is that there rarely are resources to do that. Since resources are distributed by the management, they are the ones who should suffer for lack of those. So management are the ones who should be doing the testing.