Do you write a failing test before fixing a bug, even if you don't do TDD otherwise?
I don't practise strict test-driven development, but for bugs I've started writing a test that reproduces the problem first, then fixing it.
It forces me to understand the bug properly and it means the same bug can't sneak back in. The downside is it sometimes takes longer to write the test than to fix the bug.
Do you do this? Are there bugs where you skip it?
Comments · 0
No replies yet — start the conversation.