by dragonwriter · 2y ago · 0 comments
No, the value proposition of testing is that it identifies incorrect system behavior before it manifests in live use. Documentation of anything is not the central value proposition of testing.
Incorrect with respect to the documentation, yes. That's what I just said.
Tests are not intended to find undocumented incorrect behaviour. This is provable by taking it to the logical extreme of a codebase that is completely undocumented (no tests). When no tests run, no incorrect behaviour will be uncovered by it.
Only documented cases can reveal instances where the code does not conform to what is documented.
It’s documentation a machine can validate, which is the best kind of documentation.
(Static types are documentation a machine can validate, that also happen to be very good communication tools)
https://gist.github.com/gniemann/adaf12895c22eb5c11c0591f8cb...