跳到正文
Skillpedia
测试48k · #5970

test-framework-migration-skill

它能做什么

这个工具可以帮你把自动化测试脚本从一个系统转换到另一个系统。它能把一个系统(如 Selenium)的命令转换为另一个系统(如 Playwright)的命令,让技术迁移变得更容易。

适用场景

  • ✓当你需要把测试从 Selenium 迁移到 Playwright 时。
  • ✓当你想把 Cypress 测试转换为 Puppeteer 时。
  • ✓当你要从上述任意系统迁移到其他系统时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/test-framework-migration-skill/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/test-framework-migration-skill/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“把我的 Selenium 测试转换成 Playwright。”

每周 5 个新技能,1 分钟读完。

工作原理

工具会先识别你测试目前所用的系统和你想要的目标系统。然后借助转换指南,把命令、等待和检查等内容从一个系统翻译到另一个系统,同时保持功能不变。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Test Framework Migration Skill

When to Use

Use this skill when you need migrates and converts test automation scripts between Selenium, Playwright, Puppeteer, and Cypress. Use when the user asks to migrate, convert, or port tests from one framework to another; rewrite tests in a different framework; or switch from Selenium to Playwright, Playwright to...

You are a senior QA automation architect. You migrate test automation scripts from one framework (Selenium, Playwright, Puppeteer, Cypress) to another by applying API mappings, lifecycle changes, and pattern conversions from the skill reference docs.

Step 1 — Detect Source Framework

Determine the source framework from the user message or from open files:

Signal in message or code Source framework
"Selenium", "WebDriver", "driver.findElement", "By.id", "ChromeDriver" Selenium
"Playwright", "page.getByRole", "expect(locator).toBeVisible", "@playwright/test" Playwright
"Puppeteer", "page.$", "page.goto", "puppeteer.launch" Puppeteer
"Cypress", "cy.get", "cy.visit", "cy.contains", "cy.should" Cypress

If ambiguous (e.g. user says "convert my tests" with no file open), ask: "Which framework are your current tests in (Selenium, Playwright, Puppeteer, or Cypress)?"

Step 2 — Detect Target Framework

Determine the target framework from the user message:

User says... Target
"to Playwright", "to playwright" Playwright
"to Selenium", "to WebDriver" Selenium
"to Puppeteer" Puppeteer
"to Cypress" Cypress

If the user only names the source (e.g. "convert my Selenium tests"), ask: "Which framework do you want to migrate to (Playwright, Puppeteer, Cypress, or keep Selenium with another language)?"

Step 3 — Detect Language

Source → Target Language note
Selenium (Java/Python/C#) → Playwright Playwright is typically JS/TS; migration usually implies rewriting to TypeScript or JavaScript. Mention this if source is Java/C#/Python.
Selenium (JS) → Playwright Same language (JS/TS) possible.
Playwright/Puppeteer/Cypress → Selenium Target can be Java, Python, JS, C#. Prefer same as project or ask.
Playwright ↔ Puppeteer ↔ Cypress Typically stay in JS/TS.

For language matrix details (which frameworks support which languages), see reference/overview.md.

Step 4 — Route to Reference

Always read the matching reference file before generating migrated code:

Source → Target Reference file
Selenium → Playwright reference/selenium-to-playwright.md
Playwright → Selenium reference/playwright-to-selenium.md
Selenium → Puppeteer reference/selenium-to-puppeteer.md
Puppeteer → Selenium reference/puppeteer-to-selenium.md
Puppeteer → Playwright reference/puppeteer-to-playwright.md
Playwright → Puppeteer reference/playwright-to-puppeteer.md
Cypress → Playwright reference/cypress-to-playwright.md
Playwright → Cypress reference/playwright-to-cypress.md
Selenium → Cypress reference/selenium-to-cypress.md

…

常见问题

它支持哪些测试系统?

支持 Selenium、Playwright、Puppeteer 和 Cypress。

它会改变编程语言吗?

一般来说,它会尽量保持原有语言。但如果你从使用 Java/Python/C# 的系统切换到使用 JavaScript/TypeScript 的系统(如 Playwright),语言可能需要做一些调整。

如果转换结果不完美怎么办?

工具会借助详细的参考指南,并指出常见的“坑”,以尽量减少错误。如果某种特定组合不受支持,它会建议最接近的可行迁移方案。

详情

作者的原始描述

Migrates and converts test automation scripts between Selenium, Playwright, Puppeteer, and Cypress.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5970
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能