|
|
|
|
|
by hitchstory
565 days ago
|
|
If you do test-after you have to keep a mental tally of new scenarios to test when making code changes. This makes it more unreliable since it's easy to forget one of those scenarios or mix it up with an already tested scenario. TDD lets you safely forget by tying the test pass/failure directly to the code. So, yes, you can do test-after but why? The only reason Ive ever heard for doing it after anyway is "I just prefer it that way". Not writing tests at all makes sense (e.g. for a spike), but if I were going to start writing tests at any point I cant see any reason not to do it with TDD. |
|
Also the higher level you test at, the less probable that you have to change the tests when you change a piece of functionality.