Skip to content

QA-PW-143 — No screenshot/video capture on failure ​

← Back to the rule catalog

Generated from the rule registry. Get the same detail from the CLI with mjolnir explain QA-PW-143.

FieldValue
Severityinfo
Confidencehigh
Tierextended
Measured FP rate6% (n=80)
Evidence levelE2
QA impactTest hygiene debt (HYGIENE)
False-positive risk (author estimate)low
Autofix availableno
Languagestypescript, javascript
Frameworksplaywright
Detection strategyLEXICAL (regex heuristic)
Introduced inv0.3.8

Why this fails in production ​

Once the CI runner is gone, a failed UI test is just a stack trace. Screenshots/video on failure turn 'cannot reproduce' into a five-second diagnosis.

What gets flagged (real detector output) ​

playwright.config captures neither screenshots nor video on failure.

Example from this rule's own must-fire fixture: tests/fixtures/QA-PW-143/must-fire/playwright.config.ts

The fix ​

Add use: { screenshot: 'only-on-failure', video: 'retain-on-failure' } to the config.

Confirmed NOT to fire on the corresponding clean pattern ​

Verified against tests/fixtures/QA-PW-143/must-not-fire/playwright.config.ts — a legitimate, similar-looking pattern this rule correctly leaves alone.

Corpus-measured false-positive risk ​

Real occurrence counts from npm run corpus:audit against actively-maintained OSS repos — reproduce yourself, don't just trust this table (see the false-positive audit):

RepoOccurrences
calcom-cal2
github-docs1
hashicorp-vault1
Humanizr-Humanizer1
keycloak-keycloak2
microsoft-playwright-dotnet1
microsoft-playwright-mcp1
negative-fixtures60
nextauthjs-next-auth2
positive-fixtures62
sveltejs-kit25
vercel-next-js2
vitest-dev-vitest1
withastro-astro2

Released under the MIT License.