Token导航 LogoToken导航

Agent Skill · 开发

test-automator(测试自动化机)

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

test-automator 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 10,276。

总安装 2,324周安装 94GitHub Stars 76下载 729核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:test-automator(测试自动化机)
来源仓库:https://github.com/404kidwiz/claude-supercode-skills
仓库路径:skills/test-automator
安装命令:
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill test-automator
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill test-automator

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

test-automator 提供端到端测试框架搭建与自动化用例编写能力,支持 Playwright 和 Cypress 等主流工具。适用于设置 E2E 测试框架、编写复杂场景(如认证和支付流程)、实施视觉回归测试及调试不稳定测试。

在 Codex、Claude、Cursor 或 Gemini CLI 中协助生成测试代码、计划或根据日志定位问题。安装方式:通过 npx 从 GitHub 仓库添加,需确认项目测试框架和运行命令后再调用。注意:避免为通过测试而修改真实逻辑;涉及浏览器或外部服务时应区分模拟与生产环境。

来源仓库内路径:skills/test-automator

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill test…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

test-automator 怎么安装?

在终端执行 npx skills add https://github.com/404kidwiz/claude-supercode-skills --skill test-automator。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

test-automator 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

test-automator 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

test-automator 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

test-automator 用的人多吗?

公开数据是累计安装 2,324 次,近一周安装 94 次,下载 729 次,GitHub 76 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

test-automator 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
test-automator

测试自动化机 · 本页

2,32476操作浏览器MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Test Automation Engineer

Purpose

Provides automated testing expertise specializing in end-to-end test frameworks using Playwright, Cypress, and AI-driven testing tools. Builds reliable, maintainable automated test suites integrated into CI/CD pipelines with visual regression testing.

When to Use

  • Setting up a new E2E framework (Playwright/Cypress)
  • Writing complex test scenarios (Auth flows, Payment gateways)
  • Implementing Visual Regression Testing (Percy/Chromatic)
  • Debugging flaky tests (network race conditions)
  • Configuring CI/CD test runners (GitHub Actions sharding)
  • Implementing Component Testing (React/Vue/Svelte components in isolation)

Examples

Example 1: Playwright Framework Setup

Scenario: Building a maintainable E2E test framework from scratch.

Implementation:

  1. Set up Playwright with TypeScript
  2. Implemented Page Object Model for maintainability
  3. Created custom fixtures for common operations
  4. Added parallel execution with worker isolation
  5. Integrated with GitHub Actions with retry logic

Results:

  • Test suite runs in under 10 minutes (parallelized)
  • 80% reduction in test flakiness
  • Clear pattern for writing new tests
  • Zero maintenance burden for framework itself

Example 2: Payment Flow Testing

Scenario: Testing complex payment gateway integrations.

Implementation:

  1. Mocked payment provider responses for reliability
  2. Created test data factories for orders
  3. Implemented proper test isolation with database cleanup
  4. Added comprehensive assertions for payment states
  5. Created visual regression testing for checkout flow

Results:

  • 100% test coverage for payment flows
  • Tests run reliably in CI without mocks failures
  • Caught 3 critical bugs before production
  • 50% faster test execution with parallelization

Example 3: Visual Regression Testing

Scenario: Preventing UI regressions in a design-heavy application.

Implementation:

  1. Integrated Percy for visual testing
  2. Created baseline images for all pages
  3. Added ignore regions for dynamic content
  4. Configured automatic baseline updates for intentional changes
  5. Integrated with PR comments for review

Results:

  • Caught 15 visual regressions in first month
  • Designers confident in catching UI changes
  • Clear process for approving visual updates
  • Reduced manual QA time by 60%

Best Practices

Test Design

  • Page Object Model: Encapsulate page logic in objects
  • User-Facing Locators: Use role, label, text instead of CSS
  • Single Responsibility: One assertion per test concept
  • Data Factories: Create test data programmatically

Flakiness Prevention

  • Wait Strategies: Use explicit waits, not sleep
  • Retry Logic: Implement intelligent retries in CI
  • Test Isolation: No dependencies between tests
  • Deterministic Data: Stable test data, not production snapshots

CI/CD Integration

  • Parallel Execution: Maximize workers for fast feedback
  • Smart Scheduling: Run critical tests first
  • Failure Analysis: Capture artifacts on failure
  • Quality Gates: Block merges on critical failures

Maintenance

  • Regular Cleanup: Remove deprecated tests
  • Locator Updates: Keep locators stable
  • Code Review: Review test code as production code
  • Metrics: Track flakiness and coverage trends


2. Decision Framework

Tool Selection

RequirementTool RecommendationWhy?
Modern Web (React/Vue)PlaywrightFastest, reliable locators, multi-tab support.
Legacy / SimpleCypressGreat DX, but slower and single-tab limit.
Visual TestingPercy / ChromaticPixel-perfect diffs (SaaS).
Mobile NativeAppium / MaestroReal device automation.
Component TestingPlaywright CT / VitestRender components without full app stack.

Test Pyramid Strategy

  1. Unit Tests (70%): Fast, isolated. (Dev responsibility).
  2. Integration/Component (20%): Mocked API, real UI. (Shared responsibility).
  3. E2E (10%): Full stack, real API. (QA responsibility). *Keep these minimal critical paths.*

Red Flags → Escalate to devops-engineer:

  • Tests take > 30 minutes to run in CI (Need parallelization/sharding)
  • Test environment is unstable (500 errors causes flaky tests)
  • No specialized test data seeding (Using production data)


3. Core Workflows

Workflow 1: Playwright Framework Setup

Goal: Initialize a robust E2E suite with TypeScript.

Steps:

  1. Installation npm init playwright@latest # Select: TypeScript, GitHub Actions, Install Browsers
  2. Configuration (playwright.config.ts) import {defineConfig, devices} from '@playwright/test'; export default defineConfig({testDir: './tests', fullyParallel: true, forbidOnly:!!process.env.CI, retries: process.env.CI? 2: 0, workers: process.env.CI? 1: undefined, reporter: 'html', use: {baseURL: 'http://localhost:3000', trace: 'on-first-retry', video: 'retain-on-failure',}, projects: [{name: 'chromium', use: {...devices['Desktop Chrome']}}, {name: 'firefox', use: {...devices['Desktop Firefox']}}, {name: 'webkit', use: {...devices['Desktop Safari']}},],});
  3. First Test (tests/login.spec.ts) import {test, expect} from '@playwright/test'; test('has title', async ({page}) => {await page.goto('/'); await expect(page).toHaveTitle(/My App/);}); test('login flow', async ({page}) => {await page.goto('/login'); await page.getByLabel('Email').fill('user@example.com'); await page.getByLabel('Password').fill('password'); await page.getByRole('button', {name: 'Sign in'}).click(); await expect(page).toHaveURL('/dashboard');});


Workflow 3: API Testing (Integration)

Goal: Verify backend endpoints directly (faster than UI).

Steps:

  1. API Context ` test('create user via API', async ({request}) => {const response = await request.post('/api/users', {data: {name: 'Test User', email: test-${Date.now()}@example.com}}); expect(response.ok()).toBeTruthy(); const body = await response.json(); expect(body.id).toBeDefined();}); `


Workflow 5: Playwright Sharding (CI Parallelism)

Goal: Run 500 tests in 5 minutes (instead of 50).

Steps:

  1. GitHub Actions Strategy strategy: fail-fast: false matrix: shardIndex: [1, 2, 3, 4] shardTotal: [4]
  2. Run Command npx playwright test --shard=${{matrix.shardIndex}}/${{matrix.shardTotal}}
  3. Merge Reports

- Upload blob-report artifact from each shard. - Use npx playwright merge-reports --reporter html./all-blob-reports.



5. Anti-Patterns & Gotchas

❌ Anti-Pattern 1: Hardcoded Waits

What it looks like:

  • await page.waitForTimeout(5000);

Why it fails:

  • Slows down tests unnecessarily.
  • Flaky if the app takes 5.1 seconds.

Correct approach:

  • Use Auto-waiting assertions: await expect(locator).toBeVisible();.
  • Use await page.waitForURL().

❌ Anti-Pattern 2: Test Interdependency

What it looks like:

  • Test B relies on Test A creating a user.

Why it fails:

  • If Test A fails, Test B fails (Cascade).
  • Cannot run tests in parallel (Sharding impossible).

Correct approach:

  • Isolation: Each test must setup its own data (via API or Fixtures).

❌ Anti-Pattern 3: Selecting by CSS Classes

What it looks like:

  • page.locator('.btn-primary')

Why it fails:

  • Classes change for styling.
  • Not accessible.

Correct approach:

  • User-facing locators: getByRole('button', {name: 'Submit'}), getByLabel('Email'), getByTestId('submit-btn').


7. Quality Checklist

Reliability:

  • Flakiness: No flaky tests allowed in main. Quarantined if flaky.
  • Retries: configured for CI (max 2).
  • Isolation: Tests run in parallel without data collision.

Maintainability:

  • POM: Page Object Model used for shared UI logic.
  • Locators: User-facing locators used (Role, Text, Label).
  • Base URL: Configured in config, not hardcoded.

Coverage:

  • Critical Paths: Login, Checkout, core features covered.
  • Browsers: Tested on Chromium, Firefox, WebKit.
  • Mobile: Tested on Mobile Viewport (Emulation).

Anti-Patterns

Test Design Anti-Patterns

  • Brittle Selectors: Using fragile CSS/XPath selectors - use semantic locators
  • Test Data Coupling: Tests depending on specific test data - use data factories
  • Long Test Chains: Tests doing too much - single responsibility per test
  • Hardcoded Waits: Using sleep/fixed waits - use dynamic waiting strategies

Flaky Test Anti-Patterns

  • Network Assumptions: Tests assuming network reliability - mock external services
  • Timing Dependencies: Tests sensitive to execution timing - remove timing dependencies
  • State Leakage: Tests affecting each other - ensure test isolation
  • Race Conditions: Tests hitting race conditions - add proper synchronization

Maintenance Anti-Patterns

  • Page Object Bloat: Page objects becoming too large - split and refactor
  • Hardcoded URLs: URLs embedded in tests - use configuration
  • No Page Transitions: Tests not handling navigation - proper flow handling
  • Snapshot Drift: Unreviewed visual changes - always review visual diffs

CI/CD Anti-Patterns

  • Long Test Runs: Tests taking too long - parallelize and optimize
  • No Test Retry: Flaky tests failing builds - implement intelligent retries
  • Environment Mismatch: Tests passing locally but failing in CI - containerize environments
  • No Test Metrics: Not tracking test health - monitor flakiness and coverage

平台分布

Claude Code

29.56%
按下载量换算215

OpenCode

21.22%
按下载量换算155

Codex

18.27%
按下载量换算133

windsurf

10.67%
按下载量换算78

Cursor

7.26%
按下载量换算53

Gemini CLI

3.53%
按下载量换算26

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills