|
|
|
|
|
by sagolikasoppor
565 days ago
|
|
Oh man. You can write tests after the fact. I have done it sucessfully many times. I write something to see if its viable, if it is I find the repetitive parts and break them up to functions or components in which you can unit test. Later you can also write end to end tests for all the important flows. TDD is just a way of doing things but it's not faster. It's testing for testings sake. Why should I write a test if I don't have a single paying customer yet? Unless its something massively important, like money or health data there is just little incentives. |
|
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.