Once developers applied what they learned about testing to their development projects, they came up with great testing scenarios on their own. Best of all, it became difficult to find defects in the developer's code after pair testing.
Collaborative Problem Solving
Pair testing can also be used as a way to track down hard-to-reproduce defects. Once, after several hours of testing an application, I uncovered a defect that occurred only sporadically. I suspected clients had reported this defect in the form of several seemingly unrelated issues. To track it down, I pair tested with a senior developer. While he had a suspicion of what was causing the defect, we could not repeat it when testing together. At the end of that session, he installed a debugger on my machine and told me what information needed to be captured if it occurred again.
The next time the defect occurred, we tested together until we were confident we had narrowed down the cause of the problem. He knew what code was problematic, tests to narrow down where the problem might occur on the code level. From that list, I derived several more tests. In almost every case, the defect occurred. We were able to track down the problem, fix it, and develop some solid unit tests for the fix based on our sample of test cases.
The whole process took only a couple of days. In my experience as a tester, tracking down difficult defects on my own has taken much longer. Through collaboration, we found the cause more quickly and were able to ship the software with a high level of confidence.
Working Together in New Ways
Sometimes, instead of black box testing together at a machine, we collaborated on automated unit test ideas. We began by working on test cases that involved permutations and combinations. From the large number of possibilities, we determined a sample size and chose a set of test cases for automated unit test development. In addition to these tests, I suggested other testing ideas for developers to implement when writing their automated unit tests. When I tested the same feature, I complemented the developers' unit tests with scenarios they had not covered. Some developers were much more comfortable with this type of collaboration than with pair testing together at a computer in the testing lab.
Risks and Limitations
Pair testing is not a cure-all. As with any technique, there are risks involved, and some pair testing efforts fail. Some failures can be traced to what Agile QA Manager Janet Gregory calls a lack of trust between the developer and the tester. "If one or the other goes in with the idea that it is a one-way learning experience, the experience will fail." Pair testing is only effective in an environment of mutual respect and trust.
In pair programming,
|Pair Testing||412.17 KB|