P-Y on Nostr: Third: will it be unchanging, i.e. is it not brittle? A brittle test is a test that ...
Third: will it be unchanging, i.e. is it not brittle?
A brittle test is a test that fails or needs to be updated even though the external behavior of the code under test hasn't changed.
Strive to write unchanging tests: tests that only need to be updated if the external behavior changed but not after introducing refactorings, new features or bug fixes.
Fourth: is it clear?
Can I easily understand what the test is checking?
Can I easily diagnose failures?
A brittle test is a test that fails or needs to be updated even though the external behavior of the code under test hasn't changed.
Strive to write unchanging tests: tests that only need to be updated if the external behavior changed but not after introducing refactorings, new features or bug fixes.
Fourth: is it clear?
Can I easily understand what the test is checking?
Can I easily diagnose failures?