원클릭으로
webapp-testing
Playwright testing with autonomous test agents (planner, generator, healer) and visual regression testing
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Playwright testing with autonomous test agents (planner, generator, healer) and visual regression testing
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Build AI-first applications with RAG pipelines, embeddings, vector databases, agentic workflows, and LLM integration. Master prompt engineering, function calling, streaming responses, and cost optimization for 2025+ AI development. Includes local LLM inference with Ollama for 93% CI cost reduction.
Use this skill when designing REST, GraphQL, or gRPC APIs. Provides comprehensive API design patterns, versioning strategies, error handling conventions, authentication approaches, and OpenAPI/AsyncAPI templates. Ensures consistent, well-documented, and developer-friendly APIs across all backend services.
Use this skill when documenting significant architectural decisions. Provides ADR templates following the Nygard format with sections for context, decision, consequences, and alternatives. Helps teams maintain architectural memory and rationale for backend systems, API designs, database choices, and infrastructure decisions.
Create beautiful ASCII art visualizations for plans, architectures, workflows, and data
Use when creating or developing anything, before writing code or implementation plans - refines rough ideas into fully-formed designs through structured Socratic questioning, alternative exploration, and incremental validation
Capture content from JavaScript-rendered pages, login-protected sites, and multi-page documentation using Playwright MCP tools or Claude Chrome extension. Use when WebFetch fails on SPAs, dynamic content, or auth-required pages.
| name | Webapp Testing |
| description | Playwright testing with autonomous test agents (planner, generator, healer) and visual regression testing |
| version | 1.1.0 |
| tags | ["playwright","testing","e2e","automation","agents","visual-regression",2025] |
Autonomous end-to-end testing with Playwright's three specialized agents plus native visual regression testing.
# 1. Install Playwright
npm install --save-dev @playwright/test
# 2. Add MCP server
claude mcp add playwright npx '@playwright/mcp@latest'
# 3. Initialize agents
npx playwright init-agents --loop=claude
# 4. Create tests/seed.spec.ts (required for Planner)
Requirements: VS Code v1.105+ (Oct 9, 2025) or Claude Desktop with Playwright MCP
1. PLANNER ──▶ Explores app ──▶ Creates specs/checkout.md
(uses seed.spec.ts)
│
▼
2. GENERATOR ──▶ Reads spec ──▶ Tests live app ──▶ Outputs tests/checkout.spec.ts
(verifies selectors actually work)
│
▼
3. HEALER ──▶ Runs tests ──▶ Fixes failures ──▶ Updates selectors/waits
(self-healing)
your-project/
├── specs/ ← Planner outputs (Markdown plans)
├── tests/ ← Generator outputs (Playwright tests)
│ └── seed.spec.ts ← Required: Planner learns from this
├── playwright.config.ts
└── screenshots/ ← Visual regression baselines
├── desktop/
└── mobile/
seed.spec.ts is required - Planner executes this to learn:
Generator validates live - Doesn't just translate Markdown, actually tests app to verify selectors work.
Healer auto-fixes - When UI changes break tests, Healer replays, finds new selectors, patches tests.
Replace Percy with Playwright's native screenshot testing (zero cost, faster, better).
import { test, expect } from '@playwright/test';
test('homepage visual regression', async ({ page }) => {
await page.goto('/');
// Full page screenshot with auto-retry
await expect(page).toHaveScreenshot('homepage.png', {
fullPage: true,
maxDiffPixels: 100, // Allow small rendering differences
});
});
test('product card visual', async ({ page }) => {
await page.goto('/products');
// Screenshot specific component
const productCard = page.locator('.product-card').first();
await expect(productCard).toHaveScreenshot('product-card.png', {
maxDiffPixelRatio: 0.01, // 1% tolerance
});
});
const viewports = [
{ name: 'mobile', width: 375, height: 667 },
{ name: 'tablet', width: 768, height: 1024 },
{ name: 'desktop', width: 1920, height: 1080 },
];
for (const viewport of viewports) {
test(`homepage ${viewport.name}`, async ({ page }) => {
await page.setViewportSize(viewport);
await page.goto('/');
await expect(page).toHaveScreenshot(`homepage-${viewport.name}.png`);
});
}
test('dashboard with masked content', async ({ page }) => {
await page.goto('/dashboard');
await expect(page).toHaveScreenshot('dashboard.png', {
mask: [
page.locator('.timestamp'), // Hide timestamps
page.locator('.user-avatar'), // Hide user photos
page.locator('.live-graph'), // Hide real-time data
],
});
});
playwright.config.ts:
export default defineConfig({
// Update screenshots in CI when expected
updateSnapshots: process.env.CI ? 'none' : 'missing',
// Relaxed thresholds for cross-platform consistency
expect: {
toHaveScreenshot: {
maxDiffPixels: 100,
threshold: 0.2, // 20% tolerance
},
},
// Separate screenshot storage by OS
snapshotPathTemplate: '{testDir}/__screenshots__/{platform}/{projectName}/{testFilePath}/{arg}{ext}',
});
GitHub Actions:
- name: Run Playwright tests
run: npx playwright test
- name: Upload visual diffs on failure
if: failure()
uses: actions/upload-artifact@v3
with:
name: playwright-visual-diffs
path: test-results/
# Update all screenshots
npx playwright test --update-snapshots
# Update specific test screenshots
npx playwright test homepage.spec.ts --update-snapshots
# Review diffs before updating
npx playwright show-report
test('complete checkout flow', async ({ page }) => {
// Add item to cart
await page.goto('/products');
await page.click('[data-testid="add-to-cart-123"]');
// Visual: Cart icon badge
await expect(page.locator('.cart-badge')).toHaveScreenshot('cart-badge-1-item.png');
// Proceed to checkout
await page.click('[data-testid="cart-icon"]');
await expect(page).toHaveScreenshot('cart-page.png', {
mask: [page.locator('.item-price')], // Prices may change
});
// Fill shipping info
await page.fill('[name="email"]', 'test@example.com');
await page.fill('[name="address"]', '123 Main St');
// Visual: Filled form
await expect(page.locator('.checkout-form')).toHaveScreenshot('checkout-form-filled.png');
// Submit order
await page.click('button[type="submit"]');
await page.waitForURL('**/order-confirmation/**');
// Visual: Confirmation page
await expect(page).toHaveScreenshot('order-confirmation.png', {
mask: [page.locator('.order-id'), page.locator('.timestamp')],
});
});
test('analytics dashboard', async ({ page }) => {
await page.goto('/dashboard');
// Wait for data to load
await page.waitForSelector('[data-loaded="true"]');
// Mask all dynamic content
await expect(page).toHaveScreenshot('dashboard.png', {
mask: [
page.locator('.live-counter'),
page.locator('.timestamp'),
page.locator('.chart-canvas'), // Charts with live data
page.locator('[data-dynamic="true"]'),
],
});
});
const themes = ['light', 'dark'];
for (const theme of themes) {
test(`homepage ${theme} theme`, async ({ page }) => {
await page.goto('/');
// Toggle theme
await page.evaluate((t) => {
document.documentElement.setAttribute('data-theme', t);
}, theme);
// Wait for CSS transitions
await page.waitForTimeout(500);
await expect(page).toHaveScreenshot(`homepage-${theme}.png`);
});
}
checkout-step-2-payment.png not screen-1.pngmaxDiffPixels: 100 for pixel-perfect, maxDiffPixelRatio: 0.02 for 2% toleranceSee references/ for detailed agent patterns and visual regression setup.
Version: 1.1.0 (December 2025)
MCP Requirement: Playwright MCP server
Visual Regression: Native Playwright toHaveScreenshot() (no Percy needed)