Prompt
Our team is building a release gate and wants screenshot diffs and video capture on failures
Latest observation
Oct 26, 2026
OpenAI APIWeb search: off
A good pattern is to make your release gate collect artifacts on any failure:
-
Screenshot diffs
- Capture a baseline screenshot and a current screenshot.
- Compare them with a pixel-diff tool.
- Store:
- baseline
- current
- diff image
- a small metadata file with test name, browser, viewport, commit SHA, timestamp
-
Video capture
- Record the full test run or only the failing test/session.
- Save the video only when a failure occurs to reduce storage.
- Attach it to the CI job/artifact bundle.
-
Trigger conditions
- On test failure
- On visual regression threshold exceeded
- On flaky retries exhausted
- On manual approval failures in the release gate
-
Recommended implementation
- In CI, wrap your test runner so it always emits artifacts to a known folder.
- If the run fails, upload that folder as build artifacts.
- If using browser automation:
- Playwright has built-in screenshot and video support
- Cypress supports screenshots and videos
- Selenium can do both, but usually needs extra tooling
-
Practical gate flow
- Run tests
- If pass: continue release
- If fail:
- collect screenshot diff
- collect video
- publish artifacts
- block release
- notify Slack/Teams with links to artifacts
-
Useful extras
- Include console logs and network traces
- Save HAR files for failed runs
- Tag artifacts with environment and release version
If you want, I can help you design this for a specific stack like Playwright + GitHub Actions, Cypress + GitLab CI, or Selenium in Jenkins.