4 ms·
Requirements drive your tests, which drive your code.
by squeaky-clean 5y ago
Requirements drive your tests, which drive your code.
- sidlls 5y agoOne doesn’t design around tests, unless the test code is the design spec. In which case something has gone horribly wrong in the requirements and analysis for the project.
- cgrealy 5y ago> One doesn’t design around tests No design gets to the coding stage until someone has answered "how will this be tested?" So, yeah, you should absolutely be designing around tests.
- sidlls 5y ago"how will this be tested?" can be answered without writing a single line of test code or defining what the test suite will look like. The design spec documents determine what the implementation should look like, and the tests should verify the implementation works as desired, not drive its structure. I don't want the implementation to be chopped up and scattered everywhere in the name of "testability" because someone decided that a tool should dictate the architecture of the code. That leads to unreadable, hard-to-maintain, inefficient code that, with a tight coupling to the test suite that makes both them of fragile in the presence of changes in the other. For very little gain.
- cgrealy 5y ago> That leads to unreadable, hard-to-maintain, inefficient code that, with a tight coupling to the test suite that makes both them of fragile in the presence of changes in the other. For very little gain. I completely disagree with everything above. Literally, take the sentence and make almost every word the opposite.
- drran 5y agoTDD is just about replacing of manual testing, during development, with automated testing, to improve ROI of automated unit test cases. > Requirements drive your tests, which drive your code. It's verification of implementation, not a unit testing, so it's a VDD, not a TDD.