3 ms·
Not quite. Tests are just a way to document your software's behaviour, mostly so that future people (including future you) working with the software know what t
by randomdata 2y ago
Not quite. Tests are just a way to document your software's behaviour, mostly so that future people (including future you) working with the software know what the software is intended to do – to not leave them to guess based on observation of how undefined behaviour plays out.
That the documentation is self-validating is merely icing on the cake.
- bregma 2y agoThat's a beneficial side effect, not the purpose of having tests. It's like saying the purpose of eating is to fill your senses with wonderful flavours and texture. No, that's a beneficial side effect: the purpose of eating is to prevent death from starvation.
- randomdata 2y agoIndeed. You could write the documentation in Word instead, but when the "herbs and spices" come for free...