Sunday, October 22, 2006

Testing.. Why not involve a client?

Fellow Edmontonian Igloo Coder brings up a few very good points about testing. The most valuable every experienced developer knows by now and every new developer should know..

"Developers don't make good testers. Because of this, don't rely on them to do your only testing"

One thing he doesn't mention is that part of the problem is ego. Most developers have some sort of ego (generalization I know.. I've seen truely great coders with no ego.. and others with an insane amount of ego..) which makes it hard for them to believe that the piece of code they just wrote isn't the best coding every done. This is one place where I really think experience helps though.. after you've been doing this a few years assuming you ever go back and look at your old code it's inevitable you'll have the "wtf was I thinking?!?" moment. So eventually a good developer will get to the point where they are comfortable making the statement..

"This code is great but it probably has some room for improvement."

It's at this point that a good developer will arm themselves with various tools.. unit testing (and hopefully some coverage testing) being the most prominent. Which isn't to say that unit testing, coverage testing is going to catch every bug. These tools are good at finding code quality and logic problems with code but they miss out on many other types of errors. Igloo Coder mentions using Q&A to help find your issues and this is going to help you catch substantionally more errors. One thing I would add to this is that it's a good idea to have someone in your Q&A team who is either a domain expert on the problem the application was created to solve or even better is one of your clients. You'd be amazed how many clients you have that WANT to help.. that if you talk to about testing code (and explain that there are going to be some quality issues) will gladly take your latest iteration (after your technical Q&A people have gone over it) and work through it. This kind of person can bring you valuable insight into what your application does great and what it does poor.

Of course you will need to remember that like all people this person has a personal agenda. They want to help you resolve issues with the application but they also want it to work how they think things should work. So you need to balance the feedback from them with what you know about the application. And when something they are recommending goes completely against your understanding of what should be you may want to consider talking to other clients. Verify what the general expectation is. Sometimes your original understanding will be bang on.. and other times you'll wonder how the requirements you have are so far off them mark.

So assuming it's an option for you consider adding client involvement to your testing arsenal. Your application will be the better for it.

No comments: