📖 Step 7: Testing & Quality#457 / 498

Visual Regression Testing

Visual Regression Testing

📖One-line summary

Testing that compares screenshots against a previous version to catch unintended visual changes.

✨Example

// 비주얼 리그레션 테스트

✓ 화면 스크린샷을 이전 버전과 비교해 의도하지 않은 디자인 변화를 잡아내는 테스트

Tests: 1 passed

⚡Vibe coding prompt examples

>_

Write visual regression tests with Playwright's toHaveScreenshot for the home, login, and pricing pages at desktop and mobile sizes.

>_

Screenshot comparisons fail because of areas that change every run, like dates and random images. Show me how to mask them.

>_

Set up GitHub Actions to run visual regression tests on every PR and upload diff images as artifacts.

Try these prompts in your AI coding assistant!