3 ms·
There's a similar concept of "snapshots" in UI testing, which I maybe should have included in the post I think snapshots definitely lower (but don't eliminate)
by brundolf 3y ago
There's a similar concept of "snapshots" in UI testing, which I maybe should have included in the post
I think snapshots definitely lower (but don't eliminate) the cost of a certain class of tests, and can sometimes tip the scales from "not worth it" to "worth it"
- MoreQARespect 3y agoIt's almost the same thing, I think. I do the same thing with text artefacts and screenshots. There is a hidden cost to snapshot testing - theyre highly susceptible to flakiness. The tests have to be hermetic and the all the code has to be deterministic or it doesnt work. Achieving those two things is not always easy.
- brundolf 3y agoYeah. They're highly flaky, but counterbalanced by being very easy to update when they break IMO, if you've decided to test flaky behaviors of the code anyway, you may as well do it in a way where updating is really easy