Question

We are currently starting with TDD and we want to work in parallel in two programmers - one for writing test (Programmer A) and one for writing actual code (Programmer B). Problem is, how to synchronize our work.

Let's say A writes first test method, so B can start working on actual code. Our current workflow is that A will do commit/push, and B will pull his changes. In time it's bit annoying, because after every change in test (new test method/bug in current test method/some other update) requires commit/push/pull and it interrupts both developers...

Is there some "best practices" for TDD? Some synchronization between their codes, mirroring, already existing tool etc? Thanks for any tip!

Was it helpful?

Solution

In TDD, writing tests and code is interwoven, the cycles are typically very short, sometimes minutes, sometimes less. And TDD is a whitebox technique - when writing the next test, you know exactly what is missing in the current state of the implementation and you design the test exactly for this case.

So if you really want to try this with two developers, your best shot would probably be doing pair programming: sit both in front of the same screen (or use a screen sharing software), and do it together. That way, there will be no VCS involved, which solves any of your synchronization problems.

Licensed under: CC-BY-SA with attribution
scroll top