Re:A development process to ship features fast
by osigurdson on Tuesday September 13, 2022 @12:34AM
(#32820672)
This is an example the test/hash antipattern. Here, the tests approach a hash of the source code. When some code changes, the hash no longer matches which fails the test. Great, this is letting us know that something as changed. After examining the changes and decide that they are correct, we update the hash and now the all the tests are green again. Our code base has 100% coverage.
[ Parent
| on HN ]
Re:A development process to ship features fast
by abracadabra_ on Tuesday September 13, 2022 @04:12AM
(#32821779)
This is why tests should be seen as an executable specification rather than simply a series of checks.
Test_OnePlusOneEqualsTwo()
is not as useful as
Test_CanAddTwoNumbersTogether()
Test for behaviour, not implementation.