Agile Practices – Pair Programming and Unit Testing

agilepair-programmingunit testing

My team follows the Scrum development cycle. We have received feedback that our unit testing coverage is not very good.

A team member is suggesting the addition of an external testing team to assist the core team, but I feel this will backfire in a bad way.

I am thinking of suggesting pair programming approach. I have a feeling that this should help the code be more "test-worthy" and soon the team can move to test driven development!

What are the potential problems that might arise out of pair programming??

Best Answer

Your question is orthogonal to your problem. Sticking two programmers that don't want to or can't write good unit tests together isn't going to get you more/better unit tests.

Sticking a programmer who is poor at writing unit tests with one that is good might propogate good habits, but might not be a good pair for other reasons (unit testing is only a part of the entire development process after all). There are other questions/posts that deal with pair programming's benefits and problems.

Your goal should be to change the culture that caused the problem in the first place. Well done pair programming can help that, but it will usually require a combination of things all pushing towards that end goal. There is no silver bullet (pun intended) for making people write good unit tests.

Related Topic