3 ms·
The one thing is a spec doesn't mean the product is correct - you still need testing, just in a different way. It'll probably replace unit tests though.
by exdsq 5y ago
The one thing is a spec doesn't mean the product is correct - you still need testing, just in a different way. It'll probably replace unit tests though.
- logicchains 5y agoA spec can catch anything your tests can. And if your spec overlooks something, your tests will overlook it too.
- exdsq 5y agoI've seen projects using formal methods including mathematical specifications miss things caught in end-to-end tests written by domain experts rather than formal method engineers. Perhaps you're right in theory but I've yet to see it in practice.
- amw-zero 5y agoThis just means that you thought of something in the test suite that wasn't in the spec. You can underspecify something.
- amw-zero 5y agoCorrect, there’s still nothing stopping us from writing the wrong spec or writing an insufficient spec, but there’s really no solution to that problem anyway. And the same problem exists with tests today - you can have an insufficient amount of test cases, or you can write the wrong cases because you misunderstand the requirements. The difference being, when you realize your tests are wrong, what do you do? Change and add more test cases. You may also need to remove some, because they don’t make sense anymore. Vs., updating logic in a specification, and that’s it.