3 ms·
It usually works out like.. form a belief about a requirement write a test test fails write code test fails add debug info to code test fails no
by ipaddr 4y ago
It usually works out like..
form a belief about a requirement
write a test
test fails
write code
test fails
add debug info to code
test fails no debug showing
call code directly and see debug code
change assert
test fails
rewrite test
test succeed
output test class data.. false
positive checking null equals null
rewrite test
test passes
forget original purpose and stare at green passing tests with pride.
- xxs 4y ago> add debug info to code On a more serious note: just learn to use a debugger, and add asserts, if need be. To me TDD only helps having something that would run your code - but that's pretty much it. If you have other test harness options, I fail to see the benefits outside conference talks and books authoring.
- pmarreck 4y agomy professional opinion is that having to resort to a debugger is a bad-design, bad-testing code smell