Token导航 LogoToken导航

Agent Skill · 研究检索

testing(测试)

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

testing 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 57,063。

总安装 441周安装 18GitHub Stars 4下载 141核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/89jobrien/steve --skill testing

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

testing 支持测试策略制定、TDD 开发和端到端自动化测试用例编写。适用于单元测试、集成测试、CI/CD 流水线集成及 Playwright 网页测试场景。可协助分析覆盖率、调试失败用例并生成测试夹具与模拟数据。使用时应区分测试环境与生产环境,避免因测试修改破坏真实业务逻辑。

testing 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/testing

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/89jobrien/steve --skill testing;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

testing 怎么安装?

在终端执行 npx skills add https://github.com/89jobrien/steve --skill testing。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

testing 支持哪些 AI 工具?

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

testing 需要什么权限?

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

testing 是免费的吗?

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

testing 用的人多吗?

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

testing 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

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

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
testing

测试 · 本页

4414操作浏览器MIT未通过

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

SKILL.md 原文

Testing

This skill provides comprehensive testing capabilities including test strategy, automation setup, Test-Driven Development (TDD), test writing best practices, coverage analysis, CI/CD integration, and web application testing with Playwright.

When to Use This Skill

  • When setting up test infrastructure for a project
  • When creating test strategies and test plans
  • When writing unit, integration, or E2E tests
  • When implementing TDD/test-first development
  • When analyzing test coverage and quality
  • When integrating tests into CI/CD pipelines
  • When testing web applications with Playwright
  • When debugging test failures or improving test reliability
  • When writing test fixtures, mock data, or factory functions
  • When mocking external dependencies (APIs, databases, file systems)
  • When organizing test file structure and test suites
  • When testing async code, Promises, or event-driven behavior
  • When implementing snapshot tests for UI components
  • When configuring test coverage thresholds

What This Skill Does

  1. Test Strategy: Designs comprehensive testing strategies (unit, integration, E2E)
  2. Test Automation: Sets up test frameworks and automation tools
  3. TDD Methodology: Implements Test-Driven Development workflows (Red-Green-Refactor)
  4. Test Writing: Writes focused, maintainable tests with proper patterns
  5. Coverage Analysis: Analyzes and improves test coverage
  6. CI/CD Integration: Integrates tests into continuous integration pipelines
  7. Web App Testing: Tests web applications using Playwright
  8. Test Quality: Improves test reliability and maintainability

Test Strategy

Test Pyramid

Recommended Distribution:

  • Unit Tests: 70% - Fast, isolated, test individual functions
  • Integration Tests: 20% - Test component interactions
  • E2E Tests: 10% - Test complete user workflows

Test Types:

  • Functional tests (happy path, edge cases, error handling)
  • Non-functional tests (performance, security, accessibility)
  • Regression tests (prevent breaking changes)
  • Smoke tests (critical path verification)

Framework Selection

JavaScript/TypeScript:

  • Jest, Vitest, Mocha for unit/integration
  • Playwright, Cypress for E2E
  • React Testing Library for component testing

Python:

  • pytest for unit/integration
  • Selenium, Playwright for E2E
  • unittest for standard library testing

Java:

  • JUnit for unit tests
  • TestNG for integration
  • Selenium for E2E

Go:

  • Built-in testing package
  • Testify for assertions

Rust:

  • Built-in test framework
  • Cargo test for running tests

Test-Driven Development (TDD)

TDD is a design technique, not just a testing technique. It produces better-designed, more maintainable code through small, disciplined steps.

Core Principle

Write tests before code. Always. TDD forces you to think about:

  • What behavior do I need?
  • How will I know it works?
  • What's the simplest implementation?

The Three Laws (Never Violate)

  1. Write NO production code without a failing test first
  2. Write only enough test to demonstrate one failure
  3. Write only enough code to pass that test

Red-Green-Refactor Cycle

Phase 1: RED - Write Failing Test

  1. Write ONE test that defines desired behavior
  2. Run test - verify it FAILS
  3. Verify it fails for the RIGHT reason (not syntax error)
  4. DO NOT write implementation yet

Phase 2: GREEN - Minimal Implementation

  1. Write MINIMAL code to make test pass
  2. Resist urge to add extra features
  3. Run test - verify it PASSES
  4. If test still fails, fix implementation (not test)

Phase 3: REFACTOR - Clean Code

  1. Remove code duplication (DRY)
  2. Improve naming for clarity
  3. Extract complex logic into functions
  4. Run ALL tests - must stay green throughout
  5. Check test coverage on changed lines

After REFACTOR, start new RED phase for next behavior.

Test Writing Patterns

Arrange-Act-Assert (AAA)

Structure:

  1. Arrange: Set up test data and conditions
  2. Act: Execute the code being tested
  3. Assert: Verify the expected outcome

Example:

describe('UserService', () => {
  it('should create user with valid data', async () => {
    // Arrange
    const userData = { email: 'test@example.com', name: 'Test User' };

    // Act
    const result = await userService.createUser(userData);

    // Assert
    expect(result).toHaveProperty('id');
    expect(result.email).toBe(userData.email);
  });
});

Given-When-Then (BDD Style)

Structure:

  1. Given: Initial context/preconditions
  2. When: Action/event that triggers behavior
  3. Then: Expected outcome

Test Organization

File Structure:

project/
├── src/
│   └── components/
│       └── User.jsx
├── tests/
│   ├── unit/
│   │   └── User.test.jsx
│   ├── integration/
│   │   └── UserAPI.test.js
│   └── e2e/
│       └── user-flow.spec.js
├── jest.config.js
└── playwright.config.js

Coverage Analysis

Coverage Goals

Recommended Thresholds:

  • Lines: 80%+
  • Functions: 80%+
  • Branches: 80%+
  • Statements: 80%+

Critical Paths:

  • Always aim for 100% coverage on critical business logic
  • Authentication and authorization
  • Payment processing
  • Data validation

Coverage Gaps

Common Gaps:

  • Error handling paths
  • Edge cases
  • Boundary conditions
  • Integration points

Improvement Strategies:

  • Identify untested code paths
  • Add tests for error scenarios
  • Test edge cases and boundaries
  • Increase integration test coverage

CI/CD Integration

Test Pipeline

Stages:

  1. Unit Tests: Fast feedback, run on every commit
  2. Integration Tests: Run on pull requests
  3. E2E Tests: Run before merging to main
  4. Performance Tests: Run on main branch

Quality Gates:

  • All tests must pass
  • Coverage must meet threshold
  • No critical security issues
  • Performance benchmarks met

Web Application Testing with Playwright

Helper Scripts

This skill includes Python helper scripts in scripts/:

  • with_server.py - Manages server lifecycle (supports multiple servers). Always run with --help first to see usage. # Single server python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py # Multiple servers (e.g., backend + frontend) python scripts/with_server.py \ --server "cd backend && python server.py" --port 3000 \ --server "cd frontend && npm run dev" --port 5173 \ -- python your_automation.py

Decision Tree: Choosing Your Approach

User task → Is it static HTML?
    ├─ Yes → Read HTML file directly to identify selectors
    │         ├─ Success → Write Playwright script using selectors
    │         └─ Fails/Incomplete → Treat as dynamic (below)
    │
    └─ No (dynamic webapp) → Is the server already running?
        ├─ No → Run: python scripts/with_server.py --help
        │        Then use the helper + write simplified Playwright script
        │
        └─ Yes → Reconnaissance-then-action:
            1. Navigate and wait for networkidle
            2. Take screenshot or inspect DOM
            3. Identify selectors from rendered state
            4. Execute actions with discovered selectors

Playwright Best Practices

  • Use bundled scripts as black boxes - Use --help to see usage, then invoke directly
  • Use sync_playwright() for synchronous scripts
  • Always close the browser when done
  • Use descriptive selectors: text=, role=, CSS selectors, or IDs
  • Add appropriate waits: page.wait_for_selector() or page.wait_for_timeout()
  • CRITICAL: Wait for page.wait_for_load_state('networkidle') before inspection on dynamic apps

Example: Basic Playwright Script

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True)
    page = browser.new_page()
    page.goto('http://localhost:5173')
    page.wait_for_load_state('networkidle')  # CRITICAL: Wait for JS to execute
    # ... your automation logic
    browser.close()

Examples

See examples/ directory for:

  • element_discovery.py - Discovering buttons, links, and inputs on a page
  • static_html_automation.py - Using file:// URLs for local HTML
  • console_logging.py - Capturing console logs during automation

Reference Files

For detailed testing patterns and workflows, load reference files as needed:

  • references/framework_workflows.md - Framework-specific TDD workflows and examples for Python (pytest), JavaScript (Jest, Vitest), Java (JUnit), Go, Rust
  • references/test_patterns.md - Common test patterns, test organization, naming conventions, test doubles (mocks, stubs, spies), parametrization, and anti-patterns
  • references/webapp_testing.md - Web application testing patterns, Playwright best practices, and E2E testing strategies
  • references/TESTING_REPORT.template.md - Test quality report template with coverage metrics, audit findings, and recommendations

When working with specific frameworks or need detailed patterns, load the appropriate reference file.

Best Practices

Test Quality

  1. Isolation: Tests should be independent and runnable in any order
  2. Deterministic: Tests should produce consistent results
  3. Fast: Unit tests should run quickly (< 100ms each)
  4. Clear: Test names should describe what they test
  5. Maintainable: Tests should be easy to update when code changes

TDD Best Practices

  1. One Behavior Per Test: Each test verifies ONE behavior
  2. Descriptive Names: Test names describe the behavior being tested
  3. Independent Tests: Tests don't depend on each other
  4. Fast Tests: Mock external dependencies to keep tests fast
  5. Clear Assertions: Assertions clearly show what's being verified

Common Mistakes to Avoid

  • ❌ Writing multiple tests at once (write one test at a time)
  • ❌ Skipping refactor phase (always refactor after green)
  • ❌ Implementation before test (delete code and start with test)
  • ❌ Over-engineering in GREEN (simplest thing that passes)
  • ❌ Writing test that passes immediately (must fail first)

Test Maintenance

  • Review and update tests when requirements change
  • Remove obsolete tests
  • Refactor tests to reduce duplication
  • Keep test data factories up to date
  • Monitor test execution time

Integration with Other Skills

  • debugging: Use when tests fail unexpectedly
  • code-review: TDD produces code that's easier to review
  • dead-code-removal: Tests help identify unused code
  • performance: Use for performance testing strategies

Meta-Principle

TDD is a DESIGN technique, not a testing technique.

The cycle never changes: RED → GREEN → REFACTOR → Repeat

Writing tests first forces you to think about:
- What behavior do I need?
- How will I know it works?
- What's the simplest implementation?

This produces better-designed, more maintainable code.

平台分布

Claude Code

26.87%
按下载量换算38

OpenCode

23.48%
按下载量换算33

Antigravity

18.92%
按下载量换算27

Codex

12.45%
按下载量换算18

windsurf

8.64%
按下载量换算12

Gemini CLI

3.12%
按下载量换算4

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills