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.

1 comment:

  1. agreed...sometimes the QA guy knows more about the code then the dev himself...but the problem is there are very few good whitebox testers...To get code reviewed by them might not be a good idea.

    Also the whitebox tester is usually not quite interested in the syntax, the language nuances and the architecture of the code. He is more interested in the logic of the code more than anything else. As he himself does not write any code he won't be able to notice the above nuances

    So it is better if senior developers review code, cos if there are logical errors then QA will anyways notice them.

    ReplyDelete