Saturday, August 2, 2008

Is Code Review Developers Job or Testers?

Is Code Review Developers Job or Testers?

Did you ever ask a question, why separate Testing/QA teams exist, and why not developers themselves test their code? The answer many people give is developers cannot test, which is not true. Developers can always test, but testing will be impartial only if the underlying code is not written by him. So this led to model where in code written by A is tested by B and code written by B is tested by A. This model has one problem, primary job of the developer is writing code, and not testing so developers ignored the testing, this led to having separate Testing/QA teams. But ever wondered doesn’t the same hold good even for code inspections/reviews. Currently many organizations have peers doing the code review, which again is the same model wherein code written by A is reviewed by B and code written by B is reviewed by A. Once again developer is not very much keen in reviewing the code written by others. Many times I found the bugs as a tester in the code even after it’s reviewed by couple of developers. So, what is solution? Should we have three teams now? Of course not, but the code review can be effectively moved from development team to Testing/QA team. But, in this model we need to ensure that same tester is not doing both code review and black box testing for a module. Tester A should be doing code review for Module X and black box testing for Module Y and Tester B should be doing code review for Module Y and black box testing for Module X. Since its the testers who will answerable for any production issues they will do the code reviews with more responsibility unlike the developers.

No comments: