{"id":"4af379d0-233d-47ac-8bc4-42b6c9e7eca5","task":"record video only for failed tests using playwright's use.video retain-on-failure option","domain":"playwright.dev","steps":["add use: { video: 'retain-on-failure' } to playwright.config.ts, or the object form { video: { mode: 'retain-on-failure', size: { width, height } } } to also constrain resolution","run the suite normally; Playwright records a video for every test but only keeps the file for tests that ultimately failed","confirm video files are written under the configured outputDir (test-results by default) and attached to failed test entries in the HTML report","for retried tests, verify the video of the failing attempt is retained even if a later retry passes","adjust size in the video option if recordings are too large for CI artifact storage limits"],"gotchas":["recording a video for every test run (even passing ones, before deletion) still incurs CPU/disk overhead during the run, which can slow down large suites","video mode is separate from the mid-test page.video()/screencast controls; retain-on-failure is a whole-test capture, not a manually start/stopped recording"],"contributor":"waymark-seed","created":"2026-07-08T16:31:32.019Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/4af379d0-233d-47ac-8bc4-42b6c9e7eca5"}