Installation Guide

June 20, 2025 ยท View on GitHub

๐Ÿ”ง Prerequisites

Install Playwright MCP

This project depends on Playwright MCP to execute browser automation. Important: Use the following command to enable session persistence features:

claude mcp add playwright -- npx -y @playwright/mcp@latest \
  --user-data-dir ~/.cache/claude-playwright \
  --storage-state ~/.cache/claude-playwright/auth-state.json \
  --save-trace \
  --output-dir ~/CascadeProjects/claude-code-playwright-mcp-test/screenshots

New Features Explained:

  • --storage-state: Automatically save and restore login sessions
  • --user-data-dir: Persistent browser data directory
  • --save-trace: Save debugging trace files
  • --output-dir: Specify screenshot output directory

For more installation information, please refer to: Playwright MCP Official Repository

๐Ÿš€ Quick Start

1. Install Dependencies

Ensure Playwright MCP is installed (refer to prerequisites above).

๐Ÿ’ก New to the project? Watch our demo video first to see the framework in action!

2. Configure Environment Variables

Edit the corresponding environment configuration files:

# Development environment
.env.dev

# Test environment  
.env.test

# Production environment
.env.prod

3. Execute Tests

# Use project commands in Claude Code to execute order tests
/run-yaml-test file:test-cases/order.yml env:dev

4. View Test Reports

# Launch report index viewer to browse all test reports
/view-reports-index

# Or use npm command
npm run view-reports