3 ms·
Seems like you’re describing snapshot testing, whereas the article talks about bisecting. Bisecting is useful when you find a bug which your test suite did not
by gcarvalho 3y ago
Seems like you’re describing snapshot testing, whereas the article talks about bisecting.
Bisecting is useful when you find a bug which your test suite did not, and which may have been introduced a long while ago. So you search for the first offender between the last known-good commit and the most recent, usually with an automated test that reproduces the bug, and which should be introduced in the suite to prevent it from happening again in the future.
A snapshot test is basically a “let me know if this unit stops giving this output for this specific input”. And sometimes the fix is to acknowledge that this new output is now the correct version by overwriting it to the snapshot.