360 Secure SkillHub
360 安全技能中心

playwright-generate-test

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

分类:开发
github
热度 69.42
最近更新 2026-10-18 22:10:58

安装

发给 Agent
帮我安装这个技能: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