MCP HubMCP Hub
스킬 목록으로 돌아가기

visual-testing-advanced

proffesor-for-testing
업데이트됨 Today
280 조회
267
56
267
GitHub에서 보기
기타visualregressionscreenshotpixel-diffpercyplaywrightresponsive

정보

이 Claude Skill은 픽셀 단위 완벽 비교와 AI 기반 차이 분석을 통해 고급 시각적 회귀 테스트를 수행합니다. 반응형 디자인을 검증하고 크로스 브라우저 시각적 일관성을 보장하여 UI 회귀 현상을 탐지하는 데 이상적입니다. 개발자는 디자인 검증이 필요하거나 릴리스 간 시각적 품질을 유지해야 할 때 이 기능을 사용해야 합니다.

빠른 설치

Claude Code

추천
기본
npx skills add proffesor-for-testing/agentic-qe
플러그인 명령대체
/plugin add https://github.com/proffesor-for-testing/agentic-qe
Git 클론대체
git clone https://github.com/proffesor-for-testing/agentic-qe.git ~/.claude/skills/visual-testing-advanced

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

Advanced Visual Testing

<default_to_action> When detecting visual regressions or validating UI:

  1. CAPTURE baseline screenshots (first run establishes baseline)
  2. COMPARE new screenshots against baseline (pixel-by-pixel or AI)
  3. MASK dynamic content (timestamps, ads, user counts)
  4. TEST across devices (desktop, tablet, mobile viewports)
  5. REVIEW and approve intentional changes, fail on regressions

Quick Visual Testing Steps:

  • Set up baseline on main branch
  • Compare feature branch against baseline
  • Mask dynamic elements (timestamps, avatars)
  • Use AI-powered comparison to reduce false positives
  • Integrate in CI/CD to block visual regressions

Critical Success Factors:

  • Functional tests don't catch visual bugs
  • AI-powered tools reduce false positives
  • Review diffs, don't just auto-approve </default_to_action>

Quick Reference Card

When to Use

  • UI component changes
  • CSS/styling modifications
  • Responsive design validation
  • Cross-browser consistency checks

Visual Bug Types

Bug TypeDescription
Layout shiftElements moved position
Color changeUnintended color modification
Font renderingTypography issues
AlignmentSpacing/alignment problems
Missing imagesBroken image paths
OverflowContent clipping

Comparison Algorithms

AlgorithmBest For
Pixel diffExact match requirement
Structural similarityHandle anti-aliasing
AI semanticIgnore insignificant changes

Visual Regression with Playwright

import { test, expect } from '@playwright/test';

test('homepage visual regression', async ({ page }) => {
  await page.goto('https://example.com');

  // Capture and compare screenshot
  await expect(page).toHaveScreenshot('homepage.png');
  // First run: saves baseline
  // Subsequent runs: compares to baseline
});

test('responsive design', async ({ page }) => {
  // Mobile viewport
  await page.setViewportSize({ width: 375, height: 667 });
  await page.goto('https://example.com');
  await expect(page).toHaveScreenshot('homepage-mobile.png');

  // Tablet viewport
  await page.setViewportSize({ width: 768, height: 1024 });
  await expect(page).toHaveScreenshot('homepage-tablet.png');
});

Handling Dynamic Content

test('mask dynamic elements', async ({ page }) => {
  await page.goto('https://example.com');

  await expect(page).toHaveScreenshot({
    mask: [
      page.locator('.timestamp'),     // Dynamic time
      page.locator('.user-count'),    // Live counter
      page.locator('.advertisement'), // Ads
      page.locator('.avatar')         // User avatars
    ]
  });
});

AI-Powered Visual Testing (Percy)

import percySnapshot from '@percy/playwright';

test('AI-powered visual test', async ({ page }) => {
  await page.goto('https://example.com');

  // Percy uses AI to ignore anti-aliasing, minor font differences
  await percySnapshot(page, 'Homepage');
});

test('component visual test', async ({ page }) => {
  await page.goto('https://example.com/components');

  // Snapshot specific component
  const button = page.locator('.primary-button');
  await percySnapshot(page, 'Primary Button', {
    scope: button
  });
});

Playwright Configuration

// playwright.config.js
export default {
  expect: {
    toHaveScreenshot: {
      maxDiffPixels: 100,      // Allow 100 pixel difference
      maxDiffPixelRatio: 0.01, // Or 1% of image
      threshold: 0.2,          // Color similarity threshold
      animations: 'disabled',  // Disable animations
      caret: 'hide'            // Hide cursor
    }
  }
};

Agent-Driven Visual Testing

// Comprehensive visual regression
await Task("Visual Regression Suite", {
  baseline: 'main-branch',
  current: 'feature-branch',
  pages: ['homepage', 'product', 'checkout'],
  devices: ['desktop', 'tablet', 'mobile'],
  browsers: ['chrome', 'firefox', 'safari'],
  threshold: 0.01
}, "qe-visual-tester");

// Returns:
// {
//   comparisons: 27,  // 3 pages × 3 devices × 3 browsers
//   differences: 2,
//   report: 'visual-regression-report.html'
// }

Agent Coordination Hints

Memory Namespace

aqe/visual-testing/
├── baselines/*          - Baseline screenshots
├── comparisons/*        - Diff results
├── components/*         - Component snapshots
└── reports/*            - Visual regression reports

Fleet Coordination

const visualFleet = await FleetManager.coordinate({
  strategy: 'visual-testing',
  agents: [
    'qe-visual-tester',   // Screenshot comparison
    'qe-test-executor',   // Cross-browser execution
    'qe-quality-gate'     // Block on visual regressions
  ],
  topology: 'parallel'
});

Related Skills


Remember

Functional tests don't catch visual bugs. Layout shifts, color changes, font rendering, alignment issues - all invisible to functional tests but visible to users.

AI-powered tools reduce false positives. Percy, Applitools use AI to ignore insignificant differences (anti-aliasing, minor font rendering).

With Agents: qe-visual-tester automates visual regression across browsers and devices, uses AI to filter noise, and generates visual diff reports. Catches UI regressions before users see them.

GitHub 저장소

proffesor-for-testing/agentic-qe
경로: .claude/skills/visual-testing-advanced
agenticqeagenticsfoundationagentsquality-engineering

연관 스킬

regression-testing

기타

This skill strategically selects and executes regression tests based on code changes and risk analysis. It's used to verify that fixes don't break existing functionality and to optimize test suites for faster feedback in CI/CD. Key features include impact analysis, change-based test selection, and continuous regression management.

스킬 보기

testability-scoring

기타

This skill provides AI-powered testability assessment for web applications using Playwright and optional Vibium integration. It evaluates applications against 10 intrinsic testability principles like Observability and Controllability to identify improvement areas. Use it when assessing software testability, evaluating test readiness, or generating testability reports.

스킬 보기

compatibility-testing

기타

This skill performs automated cross-browser, cross-platform, and cross-device compatibility testing to ensure consistent user experiences. It validates browser support, tests responsive designs across breakpoints, and runs parallel tests using cloud services. Use it when you need to verify compatibility across a defined matrix covering the majority of your user base.

스킬 보기

compatibility-testing

기타

This skill performs automated cross-browser, cross-platform, and cross-device compatibility testing to ensure a consistent user experience. Use it for validating browser support, testing responsive design breakpoints, or verifying platform compatibility. It runs parallel tests across a defined browser matrix and leverages cloud services for broad device coverage.

스킬 보기