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?


mhaller said...

I like having the bars green as soon as possible. Prevents people walking by from sarcastic comments.

Btw, TddMeter currently shows:
Test Runs: 855
Test cases executed: 4791
Successful tests: 3108 (64%)
Avg TDD cycle time: 24m 47s

Kai Grabfelder said...

Green is always good ;-) But if I have a testcase that is failing in the evening (because the implementation is not yet finished or a bug is not yet fixed) I rather keep the failing testcase instead of commenting out the failing parts...

Anonymous said...

A green bar gives you the feeling of accomplishment when you leave. But this is nothing compared to a running build with all tests passed.