is it possible to perform a unit testing as per testing. I mean every programmer test the other programmer code. Or it should be every programmer test his/her code?
My concern with self testing is, if we should perform unit testing after each couple of lines code, it would take a long time to perform a per testing each time. right?
In my expereince, having tried both (peer testing and self-testing) and have learned that it really doesn't matter. Developers just aren't good testers. Even a peer won't find the stuff they should find.
To my understanding, developers always perform their own unit testig, which is writting code to test the specific functions (C) and class (java). Peer does not always involved in Unit testing, but heavily reviewing the logic of the code and check it the code has any impact to related teams who own that specific functions. That's a code review session ..
IBM Certified Database Administrator
Sun Certified Java Programmer
Oracle Certified Associate
My experience that developers are not good unit testers but they should be. They must perform unit testing that ensures the units they developed perform properly. You just have to manage them closely to ensure they are properly unit testing.
I suggest you have a look at the way tests are performed in extreme programming. I find it a good way for developers to test their own code.
We are currently looking how we can implement it, hope it works out fine...