---
id: playwright-generate-test
name: "playwright-generate-test"
url: https://skills.yangsir.net/skill/playwright-generate-test
author: github
domain: ai-code-generation-quality
tags: ["playwright-test-generation", "codegen", "end-to-end-testing", "test-automation", "browser-automation"]
install_count: 12500
rating: 4.50 (330 reviews)
github: https://github.com/github/awesome-copilot
---

# playwright-generate-test

> 基于Playwright MCP的智能测试生成工具,根据业务场景自动创建端到端测试脚本,支持多浏览器兼容性测试和UI自动化,大幅降低测试编写成本,提升测试覆盖率和代码质量保障。

**Stats**: 12,500 installs · 4.5/5 (330 reviews)

## Before / After 对比

### 自动化生成Playwright测试脚本提升测试效率

## Readme

# Test Generation with Playwright MCP

Your goal is to generate a Playwright test based on the provided scenario after completing all prescribed steps.

## Specific Instructions

- You are given a scenario, and you need to generate a playwright test for it. If the user does not provide a scenario, you will ask them to provide one.
- DO NOT generate test code prematurely or based solely on the scenario without completing all prescribed steps.
- DO run steps one by one using the tools provided by the Playwright MCP.
- Only after all steps are completed, emit a Playwright TypeScript test that uses `@playwright/test` based on message history
- Save generated test file in the tests directory
- Execute the test file and iterate until the test passes


---
*Source: https://skills.yangsir.net/skill/playwright-generate-test*
*Markdown mirror: https://skills.yangsir.net/api/skill/playwright-generate-test/markdown*