Promptles
Testing & Quality

Snapshot Test

intermediate

Definition

A test that takes a 'photo' of what something looks like the first time it runs and saves it. From then on, every test run compares the current look against the saved photo and warns you if anything has changed. Easy to set up, but you have to actually look when something is different: not just rubber-stamp the new photo.

In the wild

A snapshot test of a sign-up button captures its exact appearance the first time it runs. A week later, a teammate accidentally changes the button's color. The snapshot test notices the difference and refuses to pass: forcing a human to look at the change and decide whether it was on purpose.

More from Testing & Quality