playwright-testing

Guide for using Playwright MCP tools for visual and functional regression testing. Use when testing features, validating UI, or running regression checks.

⭐23stars🔀25forks📁View on GitHub🕐Updated Jan 8, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill leverages Playwright MCP tools to perform comprehensive visual and functional regression testing directly within the AI environment. It streamlines the QA process by enabling interactive UI validation, automated multi-breakpoint screenshot comparisons, and real-time console error monitoring, ensuring high-quality software delivery without the need for manual test script maintenance.

Use Cases

  • Visual Regression Testing: Automatically capture and compare screenshots across mobile, tablet, and desktop breakpoints to ensure UI consistency and detect layout shifts.
  • Functional Feature Validation: Interactively verify complex user workflows, such as form submissions and navigation, to ensure features behave correctly after updates.
  • Cross-Device UI Audits: Validate that interactive elements like buttons, links, and hover states function correctly across various screen widths (320px to 1440px+).
  • Real-time Error Monitoring: Monitor browser console logs during testing sessions to instantly identify and flag JavaScript errors, network failures, or security warnings.
  • Edge Case & State Testing: Systematically test UI components in different states (loading, disabled, error) to ensure robust error handling and user feedback.
nameplaywright-testing
descriptionGuide for using Playwright MCP tools for visual and functional regression testing. Use when testing features, validating UI, or running regression checks.

Playwright Testing (via MCP Tools)

Use Playwright MCP tools directly for testing - NOT npm/npx commands.

Testing Types

Functional Regression (Manual Testing)

Interactively verify features work using Playwright MCP tools:

0. Spin up the entire stack via Docker Compose. Ensure no cache is used for front and backend projects. Database projects should not be cleared and retain data where possible.
1. Navigate to page/component
2. Interact with elements (click, type, select)
3. Verify expected behavior
4. Check for console errors
5. Test error states and edge cases

Visual Regression (Screenshots)

Capture and compare screenshots at all breakpoints:

Breakpoint Width Use Case
Mobile 320px Small phones
Tablet 768px Tablets/iPad
Desktop 1024px Laptops
Large 1440px+ Desktop monitors

What to Test

  • All pages at every breakpoint
  • Interactive states: default, hover, focus, active, disabled, loading, error
  • User workflows: Complete user journeys end-to-end
  • Data integrity: Forms save correctly, displays show right data
  • Error handling: Invalid inputs, network failures, edge cases

Console Error Monitoring

Monitor browser console during all testing - flag ANY errors.

Functional Test Checklist

For each affected feature:

  • Navigation works
  • Forms submit correctly
  • Data displays properly
  • Buttons/links respond
  • Error states show correctly
  • No console errors

Visual Test Checklist

  • Screenshot at 320px
  • Screenshot at 768px
  • Screenshot at 1024px
  • Screenshot at 1440px
  • Compare with baseline
  • Flag unintended changes

Key Rules

  • ✅ Use Playwright MCP tools directly
  • ✅ Test interactively (manual regression)
  • ❌ Do NOT run npx playwright test
  • ❌ Do NOT create separate test spec files for regression