3 ms·
Test first makes loads of sense for: * fixing bugs - reproducing the bug in a test case both confirms you're fixing the thing, and acts as a regression test *
by barrkel 11y ago
Test first makes loads of sense for:
* fixing bugs - reproducing the bug in a test case both confirms you're fixing the thing, and acts as a regression test
* defining a protocol - where you need to glue two things together, e.g. a front end UI and a back end controller, or a model shared between different modules
It's a lot weaker for design. Test-first tends to encourage overly open to extension abstractions, because you need to make things visible to tests and make components replaceable by mocks. In the early stages, the weight of updating tests makes the design overly awkward to change. And early on in the process is exactly the wrong time to be creating your general abstractions - that's when you have the least amount of information about what will make for the best abstraction.
You still need to back-fill tests after good abstractions have been chosen, of course. Tests are great; test-first, specifically, isn't always best.
- crdoconnor 11y agoIt's still good, you just need to do it at a higher level.