Skip to content

nodoubtz/playwright-mcp

 
 

Repository files navigation

playwright-mcp

A project utilizing Playwright for automated browser testing, tailored to the needs of the MCP (Multi-Channel Platform) ecosystem.

Table of Contents

Overview

playwright-mcp provides a robust framework for end-to-end and integration testing of web applications using Playwright. It is designed to support scalable, maintainable, and secure test automation for MCP-related projects.

Features

  • Cross-browser automation (Chromium, Firefox, WebKit)
  • Headless and headed execution modes
  • Parallel test execution
  • Customizable configuration for different environments
  • Easy integration with CI/CD pipelines
  • Secure handling of test data and credentials

Installation

  1. Clone the repository:

    git clone https://github.com/nodoubtz/playwright-mcp.git
    cd playwright-mcp
  2. Install dependencies:

    npm install
  3. Install Playwright browsers:

    npx playwright install

Usage

  • Run all tests:

    npx playwright test
  • Run a specific test file:

    npx playwright test tests/example.spec.ts
  • Generate test reports:

    npx playwright show-report
  • Configure environment variables:
    Create a .env file at the root to securely store credentials and sensitive data.

Project Structure

playwright-mcp/
├── tests/              # Test specifications
├── src/                # Source files/utilities
├── configs/            # Playwright/test config files
├── .github/            # GitHub Actions workflows
├── package.json
├── playwright.config.ts
└── README.md

Configuration

  • Update playwright.config.ts to customize browser settings, test retries, timeouts, etc.
  • Refer to the Playwright Configuration Docs for advanced options.

Contributing

Contributions are welcome! Please open issues or pull requests for enhancements, bug fixes, or new features.

  1. Fork the repo and create your branch.
  2. Make changes with clear commit messages.
  3. Ensure all tests pass.
  4. Open a pull request describing your changes.

License

This project is licensed under the MIT License.


References:

About

Playwright MCP server

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • TypeScript 86.4%
  • JavaScript 11.5%
  • HTML 1.3%
  • Dockerfile 0.8%