Token导航 LogoToken导航

Agent Skill · 前端设计

testing-strategy-builder(测试策略构建器)

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

testing-strategy-builder 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描已通过,按安装量在前端设计类的 10,216 个 Skill 里排第 5,329。

总安装 696周安装 29GitHub Stars 8下载 232核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/ariegoldkin/ai-agent-hub --skill testing-strategy-builder

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

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

安装方式:github,支持 Codex、Claude、Cursor、Gemini CLI。

来源仓库内路径:skills/testing-strategy-builder

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

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

常见问题

6 条

testing-strategy-builder 怎么安装?

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

testing-strategy-builder 支持哪些 AI 工具?

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

testing-strategy-builder 需要什么权限?

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

testing-strategy-builder 是免费的吗?

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

testing-strategy-builder 用的人多吗?

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

testing-strategy-builder 安全吗?

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

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

值得选的地方

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

先想清楚的地方

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

适不适合你

更适合

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

不太适合

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

前端设计类 Skill 对比

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

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
testing-strategy-builder

测试策略构建器 · 本页

6968操作浏览器MIT通过

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

SKILL.md 原文

Testing Strategy Builder

Overview

This skill provides comprehensive guidance for building effective testing strategies that ensure software quality, reliability, and maintainability. Whether starting from scratch or improving existing test coverage, this framework helps teams design robust testing approaches.

When to use this skill:

  • Planning testing strategy for new projects or features
  • Improving test coverage in existing codebases
  • Establishing quality gates and coverage targets
  • Designing test automation architecture
  • Creating test plans and test cases
  • Choosing appropriate testing tools and frameworks
  • Implementing continuous testing in CI/CD pipelines

Bundled Resources:

  • references/code-examples.md - Detailed testing code examples
  • templates/test-plan-template.md - Comprehensive test plan template
  • templates/test-case-template.md - Test case documentation template
  • checklists/test-coverage-checklist.md - Coverage verification checklist

Required Tools

This skill references the following testing tools. Not all are required - the skill will recommend appropriate tools based on your project.

JavaScript/TypeScript Testing

  • Jest: Most popular testing framework

- Install: npm install --save-dev jest @types/jest - Config: npx jest --init

  • Vitest: Vite-native testing framework

- Install: npm install --save-dev vitest - Config: Add to vite.config.ts

  • Playwright: End-to-end testing

- Install: npm install --save-dev @playwright/test - Setup: npx playwright install

  • k6: Performance testing

- Install (macOS): brew install k6 - Install (Linux): Download from k6.io - Command: k6 run script.js

Python Testing

  • pytest: Standard Python testing framework

- Install: pip install pytest - Command: pytest

  • pytest-cov: Coverage reporting

- Install: pip install pytest-cov - Command: pytest --cov=.

  • Locust: Performance testing

- Install: pip install locust - Command: locust -f locustfile.py

Coverage Tools

  • c8: JavaScript/TypeScript coverage

- Install: npm install --save-dev c8 - Command: c8 npm test

  • Istanbul/nyc: Alternative JS coverage

- Install: npm install --save-dev nyc - Command: nyc npm test

Installation Verification

# JavaScript/TypeScript
jest --version
vitest --version
playwright --version
k6 version

# Python
pytest --version
locust --version

# Coverage
c8 --version
nyc --version

Note: The skill will guide you to select tools based on your project framework (React, Vue, FastAPI, Django, etc.) and testing needs.

Testing Philosophy

The Testing Trophy 🏆

Modern testing follows the "Testing Trophy" model (evolved from the testing pyramid):

         🏆
       /    \
      /  E2E  \         ← Few (critical user journeys)
     /----------\
    / Integration\      ← Many (component interactions)
   /--------------\
  /     Unit       \    ← Most (business logic)
 /------------------\
/  Static Analysis   \  ← Foundation (linting, type checking)

Principles:

  1. Static Analysis: Catch syntax errors, type issues, and common bugs before runtime
  2. Unit Tests: Test individual functions and components in isolation
  3. Integration Tests: Test how components work together
  4. E2E Tests: Validate critical user workflows end-to-end

Balance: 70% integration, 20% unit, 10% E2E (adjust based on context)


Testing Strategy Framework

1. Coverage Targets

Recommended Targets:

  • Overall Code Coverage: 80% minimum
  • Critical Paths: 95-100% (payment, auth, data mutations)
  • New Features: 100% coverage requirement
  • Business Logic: 90%+ coverage
  • UI Components: 70%+ coverage

Coverage Types:

  • Line Coverage: Percentage of code lines executed
  • Branch Coverage: Percentage of decision branches taken
  • Function Coverage: Percentage of functions called
  • Statement Coverage: Percentage of statements executed

Important: Coverage is a metric, not a goal. 100% coverage ≠ bug-free code.

2. Test Classification

Static Analysis

Purpose: Catch errors before runtime Tools: ESLint, Prettier, TypeScript, Pylint, mypy, Ruff When to run: Pre-commit hooks, CI pipeline

Unit Tests

Purpose: Test isolated business logic Tools: Jest, Vitest, pytest, JUnit Characteristics:

  • Fast execution (< 100ms per test)
  • No external dependencies (database, API, filesystem)
  • Deterministic (same input = same output)
  • Test single responsibility

Coverage Target: 90%+ for business logic

See references/code-examples.md for detailed unit test examples.

Integration Tests

Purpose: Test component interactions Tools: Testing Library, Supertest, pytest with fixtures Characteristics:

  • Test multiple units working together
  • May use test databases or mocked external services
  • Moderate execution time (< 1s per test)
  • Focus on interfaces and contracts

Coverage Target: 70%+ for API endpoints and component interactions

See references/code-examples.md for API integration test examples.

End-to-End (E2E) Tests

Purpose: Validate critical user journeys Tools: Playwright, Cypress, Selenium Characteristics:

  • Test entire application flow (frontend + backend + database)
  • Slow execution (5-30s per test)
  • Run against production-like environment
  • Focus on business-critical paths

Coverage Target: 5-10 critical user journeys

See references/code-examples.md for complete E2E test examples.

Performance Tests

Purpose: Validate system performance under load Tools: k6, Artillery, JMeter, Locust Types:

  • Load Testing: System behavior under expected load
  • Stress Testing: Breaking point identification
  • Spike Testing: Sudden traffic surge handling
  • Soak Testing: Sustained load over time (memory leaks)

Coverage Target: Test all performance-critical endpoints

See references/code-examples.md for k6 load test examples.


Test Planning

1. Risk-Based Testing

Prioritize testing based on risk assessment:

High Risk (100% coverage required):

  • Payment processing
  • Authentication and authorization
  • Data mutations (create, update, delete)
  • Security-critical operations
  • Compliance-related features

Medium Risk (80% coverage):

  • Business logic
  • Data transformations
  • API integrations
  • Email/notification systems

Low Risk (50% coverage):

  • UI styling
  • Static content
  • Read-only operations
  • Non-critical features

2. Test Case Design

Given-When-Then Pattern:

Given [initial context]
When [action occurs]
Then [expected outcome]

This pattern keeps tests clear and focused. See references/code-examples.md for implementation examples.

3. Test Data Management

Strategies:

  • Fixtures: Pre-defined test data in JSON/YAML files
  • Factories: Generate test data programmatically
  • Seeders: Populate test database with known data
  • Faker Libraries: Generate realistic random data

See references/code-examples.md for test factory and fixture examples.


Testing Patterns and Best Practices

1. AAA Pattern (Arrange-Act-Assert)

Structure tests in three clear phases:

  • Arrange: Set up test data and context
  • Act: Perform the action being tested
  • Assert: Verify expected outcomes

See references/code-examples.md for detailed AAA pattern examples.

2. Test Isolation

Each test should be independent:

  • Use fresh test database for each test
  • Clean up resources after each test
  • Tests don't depend on execution order

See references/code-examples.md for test isolation patterns.

3. Mocking vs Real Dependencies

When to Mock:

  • External APIs (payment gateways, third-party services)
  • Slow operations (file I/O, network calls)
  • Non-deterministic behavior (current time, random values)
  • Hard-to-test scenarios (error conditions, edge cases)

When to Use Real Dependencies:

  • Fast, deterministic operations
  • Critical business logic
  • Database operations (use test database)
  • Internal service interactions

See references/code-examples.md for mocking examples.

4. Snapshot Testing

Use for: UI components, API responses, generated code

Warning: Snapshots can become brittle. Use for stable components, not rapidly changing UI.

5. Parameterized Tests

Test multiple scenarios with same logic using data tables.

See references/code-examples.md for parameterized test patterns.


Continuous Testing

1. CI/CD Integration

Pipeline Stages:

# Example: GitHub Actions
name: Test Pipeline

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install dependencies
        run: npm ci
      - name: Lint
        run: npm run lint
      - name: Type check
        run: npm run typecheck
      - name: Unit & Integration Tests
        run: npm test -- --coverage
      - name: Upload coverage
        uses: codecov/codecov-action@v3
      - name: E2E Tests
        run: npm run test:e2e
      - name: Performance Tests (on main branch)
        if: github.ref == 'refs/heads/main'
        run: npm run test:performance

2. Quality Gates

Block merges/deployments if:

  • Code coverage drops below threshold (e.g., 80%)
  • Any tests fail
  • Linting errors exist
  • Performance regression detected (> 10% slower)
  • Security vulnerabilities found

3. Test Execution Strategy

On Every Commit:

  • Static analysis (lint, type check)
  • Unit tests
  • Fast integration tests (< 5 min total)

On Pull Request:

  • All tests (unit + integration + E2E)
  • Coverage report
  • Performance benchmarks

On Deploy to Staging:

  • Full E2E suite
  • Load testing
  • Security scans

On Deploy to Production:

  • Smoke tests (critical paths only)
  • Health checks
  • Canary deployments with monitoring

Testing Tools Recommendations

JavaScript/TypeScript

CategoryToolUse Case
Unit/IntegrationVitestFast, Vite-native, modern
Unit/IntegrationJestMature, extensive ecosystem
E2EPlaywrightCross-browser, reliable, fast
E2ECypressDeveloper-friendly, visual debugging
Component TestingTesting LibraryUser-centric, framework-agnostic
API TestingSupertestHTTP assertions, Express integration
Performancek6Load testing, scriptable

Python

CategoryToolUse Case
Unit/IntegrationpytestPowerful, extensible, fixtures
API Testinghttpx + pytestAsync support, modern
E2EPlaywright (Python)Browser automation
PerformanceLocustLoad testing, Python-based
Mockingunittest.mockStandard library, reliable

Common Testing Anti-Patterns

❌ Testing Implementation Details

// Bad: Testing internal state
expect(component.state.isLoading).toBe(false);

// Good: Testing user-visible behavior
expect(screen.queryByText('Loading...')).not.toBeInTheDocument();

❌ Tests Too Coupled to Code

// Bad: Test breaks when implementation changes
expect(userService.save).toHaveBeenCalledTimes(1);

// Good: Test behavior, not implementation
const user = await db.users.findOne({ email: 'test@example.com' });
expect(user).toBeTruthy();

❌ Flaky Tests

// Bad: Non-deterministic timeout
await waitFor(() => {
  expect(screen.getByText('Success')).toBeInTheDocument();
}, { timeout: 1000 }); // Might fail on slow CI

// Good: Use explicit waits with longer timeout
await screen.findByText('Success', {}, { timeout: 5000 });

❌ Giant Test Cases

// Bad: One test does too much
test('user workflow', async () => {
  // 100 lines testing signup, login, profile update, logout...
});

// Good: Focused tests
test('user can sign up', async () => { /* ... */ });
test('user can login', async () => { /* ... */ });
test('user can update profile', async () => { /* ... */ });

Integration with Agents

Code Quality Reviewer

  • Reviews test coverage reports
  • Suggests missing test cases
  • Validates test quality and structure
  • Ensures tests follow patterns from this skill

Backend System Architect

  • Uses test strategy templates when designing services
  • Ensures APIs are testable (dependency injection, clear interfaces)
  • Plans integration test architecture

Frontend UI Developer

  • Applies component testing patterns
  • Uses Testing Library best practices
  • Implements E2E tests for user flows

AI/ML Engineer

  • Adapts testing patterns for ML models (data validation, model performance tests)
  • Uses performance testing for inference endpoints

Quick Start Checklist

When starting a new project or feature:

  • Define coverage targets (overall, critical paths, new code)
  • Choose testing framework (Jest/Vitest, Playwright, etc.)
  • Set up test infrastructure (test database, fixtures, factories)
  • Create test plan (see templates/test-plan-template.md)
  • Implement static analysis (ESLint, TypeScript)
  • Write unit tests for business logic (80%+ coverage)
  • Write integration tests for API endpoints (70%+ coverage)
  • Write E2E tests for critical user journeys (5-10 flows)
  • Configure CI/CD pipeline with quality gates
  • Set up coverage reporting (Codecov, Coveralls)
  • Document testing conventions in project README

For detailed code examples: See references/code-examples.md


Skill Version: 1.0.0 Last Updated: 2025-10-31 Maintained by: AI Agent Hub Team

平台分布

Claude Code

29.35%
按下载量换算68

Codex

24.77%
按下载量换算57

OpenCode

18.42%
按下载量换算43

Antigravity

13.23%
按下载量换算31

windsurf

9.27%
按下载量换算22

Gemini CLI

3.35%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

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

安装前确认

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

继续浏览同类 Skills