Learn the vocabulary of comparing a component's rendered output against a previously saved reference file.
0 / 5 completed
1 / 5
At standup, a dev mentions capturing a component's rendered output once, saving it as a reference file, then automatically comparing future test runs against that saved reference to flag any unexpected change. What is this technique called?
Snapshot testing is exactly this: snapshot testing captures a component's rendered output once, saves it as a reference file, and automatically compares future test runs against that saved reference, flagging any difference as a potential unintended change for a developer to confirm or reject. A hash collision is an unrelated hash-table concept about two keys sharing a bucket. This capture-once-then-compare approach is exactly why snapshot testing can catch unintended UI changes without a developer having to write assertions for every visual detail by hand.
2 / 5
During a design review, the team adds snapshot testing for a component with many small visual details, specifically because comparing future renders against one saved reference file avoids writing a separate hand-written assertion for every individual visual detail. Which capability does this provide?
Snapshot testing here provides Broad regression coverage without writing per-detail assertions, since the saved reference captures the entire rendered output at once, and any unintended change to any detail shows up as a diff without needing a hand-written assertion for that specific detail. Writing a separate hand-written assertion for every individual visual detail would be extremely tedious and would still miss details no one thought to assert on. This capture-the-whole-output behavior is exactly why snapshot testing is favored for catching unintended changes across components with many small visual details.
3 / 5
In a code review, a dev notices a component with many small visual details is tested only with hand-written assertions checking a few specific properties, with no snapshot test comparing the full rendered output against a saved reference. What does this represent?
This is a missed snapshot-testing opportunity, since comparing the full rendered output against a saved reference would catch unintended changes to any detail, instead of relying on hand-written assertions that only check the few properties someone thought to assert on. A cache eviction policy is an unrelated concept about discarded cache entries. This assertions-only pattern is exactly the kind of coverage gap a reviewer flags once a component has many small visual details worth protecting.
4 / 5
An incident report shows an unintended visual regression shipped to production in a component detail no hand-written assertion happened to check, because the component relied only on hand-written assertions with no snapshot test comparing the full rendered output. What practice would prevent this?
Adding a snapshot test compares the full rendered output against a saved reference, catching regressions in details no hand-written assertion checks. Continuing to rely only on hand-written assertions checking a few specific properties regardless of how many other visual details the component actually has is exactly what caused the issue described in this incident. This snapshot-testing practice is the standard fix once a component is confirmed to have visual details worth protecting beyond what assertions check.
5 / 5
During a PR review, a teammate asks why the team adds a snapshot test on top of already-thorough hand-written assertions for a component. What is the reasoning?
Hand-written assertions only catch changes to the specific properties someone thought to check, while a snapshot test compares the entire rendered output against a saved reference and flags any unintended change, making the two complementary rather than redundant. This is exactly why thorough test suites combine both, rather than treating either one as a full substitute for the other.
What does the "Snapshot Testing Vocabulary" vocabulary exercise cover?
This exercise tests real IT vocabulary related to snapshot testing vocabulary through 5 multiple-choice questions, each built from realistic workplace sentences rather than abstract definitions.
Is this vocabulary exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 5 questions. Each one shows a real-world sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question, and a full results screen at the end.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Are these vocabulary exercises connected to other topics?
Yes — this module shares real-world context with 9 other vocabulary modules. See "Related vocabulary" below to keep building a connected skill set.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more vocabulary exercises?
Browse the full Vocabulary exercises hub for hundreds of modules covering Agile, DevOps, security, databases, architecture, and more — organised by IT role and skill.