| name | visual-artifact-qa |
| description | Visual output that passes static checks can still fail to render: |
| lastReviewed | 2026-04-30T00:00:00.000Z |
Visual Artifact QA
The Problem
Visual output that passes static checks can still fail to render:
- SVG validates but doesn't display correctly
- CSS passes linting but looks wrong
- HTML is valid but layout breaks
- No CI check catches visual regressions
The Solution
Render → View → Diff loop.
┌─────────────┐
│ Render │ Generate the visual artifact
└──────┬──────┘
▼
┌─────────────┐
│ View │ Actually look at it (image tool, browser)
└──────┬──────┘
▼
┌─────────────┐
│ Diff │ Compare against intent/previous version
└──────┬──────┘
▼
┌─────────────┐
│ Fix │ Correct issues found
└──────┬──────┘
│
└──────► Repeat until correct
For SVG Banners
const svg = generateBanner(config);
fs.writeFileSync('banner.svg', svg);
const sharp = require('sharp');
await sharp('banner.svg').png().toFile('banner-preview.png');
For CSS Changes
await page.screenshot({ path: 'after.png' });
Automation Limits
| Check Type | Automated? | Notes |
|---|
| Valid syntax | Yes | Lint, validate |
| Renders without error | Partial | Can detect crashes |
| Looks correct | No | Human judgment required |
| Matches design | No | Needs visual comparison |
Verification
- Artifact renders in target environment
- Visual output matches intent
- Changes are intentional (diff reviewed)
When to Apply
- SVG generation
- PDF generation
- Email templates
- Any visual output that humans see
Tags
quality visual testing qa