360 Secure SkillHub
360 安全技能中心

playwright-generate-test

该 Skill 要求用户提供测试场景,使用 Playwright MCP 逐步执行页面操作,随后基于过程生成 @playwright/test 的 TypeScript 测试,保存到 tests 目录并执行迭代,直到测试通过;缺少场景时会先询问用户。

github
热度 0.00
最近更新 2026-10-18 22:10:58
分类:开发依赖:MCP 服务 / 代码执行 / 读写文件应用场景:代码生成 / 自动化脚本 / 调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add github/awesome-copilot/playwright-generate-test
Metadata
name
playwright-generate-test
description
Generate a Playwright test based on a scenario using Playwright MCP

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