4 ms·
Yes. Test _can_ very much be documentation if you write them as such, although they aren't complete documentation. Tests are the specification, ie the the how
by sodapopcan 4y ago
Yes. Test _can_ very much be documentation if you write them as such, although they aren't complete documentation. Tests are the specification, ie the the how---documentation provides the why.
Test can be written to tell a story but most people aren't taught this way (or simply don't buy it or don't write tests).
- marcosdumay 4y agoNo, tests are not specification, they are examples, specifically on the form "do this, and this happens". Imagining a specification out of this is like solving those problems of "what is the next number on this sequence: 1 18 31". It's simply can not be done, you can guess something, but you will never know if it's the real answer.
- sodapopcan 4y agoThat _can_ be examples but I prefer to write them as specs. I mean, there are entire libraries centred around writing tests as specs. Just because you don't do it that way or buy into the idea doesn't mean it's not possible or valuable.
- marcosdumay 4y agoSpecs are complete. If you create real world software with complete tests, I will really want to read your Turing Award receiving discourse. It should be great.