playwright-generate-test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTest Generation with Playwright MCP
使用Playwright MCP生成测试用例
Your goal is to generate a Playwright test based on the provided scenario after completing all prescribed steps.
你的目标是完成所有指定步骤后,根据提供的场景生成Playwright测试用例。
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 based on message history
@playwright/test - Save generated test file in the tests directory
- Execute the test file and iterate until the test passes
- 会为你提供一个场景,你需要为其生成Playwright测试用例。如果用户未提供场景,请要求他们提供。
- 不得在未完成所有指定步骤的情况下过早生成测试代码,也不得仅基于场景生成。
- 必须使用Playwright MCP提供的工具逐步执行步骤。
- 仅在所有步骤完成后,根据消息历史记录生成使用的Playwright TypeScript测试用例。
@playwright/test - 将生成的测试文件保存到tests目录中
- 执行测试文件并迭代,直到测试通过