Sample questions
Ta Visual Regression ReportingDifficulty 1
What is the core idea behind visual regression testing?
- aA new screenshot is compared pixel-by-pixel against a stored baseline image to detect unintended visual changes✓
- bThe test measures how fast a page renders and fails if the render time exceeds a fixed threshold
- cThe test reads the page's HTML source and checks it against a stored copy of the markup
- dThe test replays a previously recorded video of the page and checks that the video file size has not changed
Explanation:Visual regression testing captures a current screenshot and diffs it against a saved baseline image, flagging pixel-level differences that indicate an unintended visual change.
Ta Visual Regression ReportingDifficulty 1
In visual regression testing terminology, what is a "baseline" image?
- aThe very first screenshot ever taken in the project's history, kept forever unchanged as a historical record
- bThe reference screenshot treated as the accepted, correct rendering that future runs are compared against✓
- cA screenshot taken automatically after every single keystroke a user makes
- dA blurred, low-resolution copy of the screenshot used only to save disk space
Explanation:A baseline is the accepted reference image representing the correct/expected UI state; each new test run's screenshot is diffed against this baseline to detect changes.
Ta Visual Regression ReportingDifficulty 1
What does the "diff" produced by a visual regression tool typically show?
- aA textual list of every CSS property that exists in the page's stylesheet
- bThe total number of HTTP requests the page made while loading
- cA highlighted image showing exactly where the current screenshot differs from the baseline✓
- dA list of every JavaScript function that was called during page load
Explanation:The diff output is usually a visual artifact: an image where the pixels that differ between baseline and current screenshot are highlighted, making the change easy to spot at a glance.
Ta Visual Regression ReportingDifficulty 2
Why do visual regression tools use a configurable "threshold" (tolerance) value when comparing images instead of requiring an exact pixel match?
- aBecause exact pixel matching is technically impossible to implement in any comparison library
- bBecause a threshold makes the test run faster by skipping most of the image
- cBecause the threshold determines how many baseline images are stored on disk
- dBecause minor rendering differences like anti-aliasing would otherwise cause false failures on every run✓
Explanation:A tolerance threshold absorbs tiny, non-meaningful rendering variance (anti-aliasing, font hinting, GPU differences) so the test only fails when the visual difference is large enough to be a real regression.
Ta Visual Regression ReportingDifficulty 2
What is "snapshot testing" as a broader concept (beyond just images), for example when comparing a rendered component's serialized output?
- aCapturing a serialized output once, storing it, and comparing future runs' output against that copy to catch changes✓
- bTaking a full database backup of the application's persisted data before every test run so state can be restored afterward if a test corrupts it
- cRecording the exact CPU and memory usage of the test runner machine at a single point in time
- dRunning the same test twice in a row and averaging the two results together
Explanation:Snapshot testing generalizes the baseline-diff idea to any serializable output (not just images): a reference snapshot is stored once and subsequent runs are compared against it to catch unintended changes.
Ta Visual Regression ReportingDifficulty 1
In Cypress, what happens by default when a test fails during a cypress run (headless) execution?
- aCypress automatically opens a pull request with a proposed fix for the failing test
- bCypress automatically captures a screenshot at failure and saves it as an artifact✓
- cCypress deletes the test file so it does not fail again in future runs
- dCypress pauses execution indefinitely and waits for a developer to manually intervene
Explanation:Cypress has built-in screenshot-on-failure behavior during cypress run: when a test fails, it automatically captures a screenshot of the browser at that moment and stores it as a CI artifact.