3 ms·
My experience is that whether one is writing tests first or not, the code that is being written does get tested one way or the other. In other words, people (f
by jcbrand 9y ago
My experience is that whether one is writing tests first or not, the code that is being written does get tested one way or the other.
In other words, people (for example web-devs) who don't write tests first tend to "test" their code by clicking around in the browser to see whether they get the desired effect.
Writing tests, running them and then iteratively updating/fixing the code is IMO so much more efficient than manually clicking around to test one's code.
- sbov 9y agoClicking around in your browser is more akin to an integration test though. TDD is about unit tests, not integration tests.
- briandear 9y agoI disagree. I and others (such as Thoughtbot) often start by writing integration tests first. It’s known as outside-in testing. TDD by started by with low level tests is just backwards. Outside-in helps you clarify the design from the perspective of the user. https://robots.thoughtbot.com/testing-from-the-outsidein https://robots.thoughtbot.com/testing-from-the-outsidein
- ericgunnerson 9y agoATDD or design-driven development starts with integration tests first, and can be a great thing if written by the PO, as you can pretty much skip acceptance testing. It addresses a different concern than unit testing, however.
- wolco 9y agoYou will miss items if you don't visually inspect even in a ttd application. Tdd is a net to catch some expected bugs but should not be the only tests.
- stale2002 9y agoExactly this! It is literally faster to write the test, then to manually go around hitting your endpoint.