3 ms·
How can you write a test for something that doesn't exist without deciding how it is going to work before building it? Tests are a form of a spec.
by loosescrews 6y ago
How can you write a test for something that doesn't exist without deciding how it is going to work before building it?
Tests are a form of a spec.
- deleted 6y ago[deleted]
- jdlshore 6y agoEither you’re making a point that’s technically correct but missing the point, or you’re misinformed about how TDD works. TDD is an iterative process that generates tests and code at the same time, in very small (1-5 lines of code) bite-sized pieces. Although it could be argued that tests are specs, they don’t happen up front.
- wickedsickeune 6y agoThe point is to never test how it's working. Instead declare what it should be doing. If you can't declare ahead of time what it should be doing (maybe this is what you mean "how it is going to work") then you can't build it, can you?