4 ms·
In TDD, u-tests are called "spec". Pretty much sums it up.
by mihaigalos 2y ago
In TDD, u-tests are called "spec". Pretty much sums it up.
- lucianbr 2y agoSo again, any inputs outside of those exemplified in unit tests are unspecified behaviour? How would this work for mathematical operators for example?
- viraptor 2y agoA part of this lives in the spec name, and a part in the assumption that the Devs are not psychos. As in, if you test that sum(a,b) returns a sum of your numbers, the name/description of the test says so. And the second part means that it should hold for all numbers and the exceptions would be tested explicitly - nobody added "if a=5 & b=3 return 'foobar'" to it.
- samatman 2y agoInduction is a valid form of inference.
- advisedwang 2y agospec and documentation are things different though?
- gpmcadam 2y agoIn TDD spec is converted to behaviours that can be ran as automated tests so if the logic of the code changes, it breaks the spec and in turn the tests Whereas documentation can (inevitably) go stale with no feedback or build failures