2008/06/04

Leaving work with a red or a green bar




When using the Test Driven Development approach, is it better to leave work with a red or a green bar? I think there are valid reasons for both.

If you leave with one failing test, you know exactly where to start when you arrive the next morning. It is really obvious what your next task will be - making the test pass.

Leaving with a green bar has the advantage of a having clean state, i.e. it feels like being somehow done for the day. Also in theory a TDD cycle ends with a last successful test run after cleaning up (refactoring).

What is your opinion?