Token导航 LogoToken导航

Agent Skill · 研究检索

testing-strategy(测试策略)

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

testing-strategy 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 66,285。

总安装 267周安装 11GitHub Stars 8下载 87核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/ar4mirez/samuel --skill testing-strategy

这个 Skill 是做什么的

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

testing-strategy 用于辅助测试设计、自动化测试和回归验证,适合编写单元测试和端到端测试用例。适用于测试覆盖率提升、测试计划制定和失败日志分析,支持 CI/CD 集成和测试框架配置。通过 npx skills add 命令从指定 GitHub 仓库安装,需确认项目测试框架和运行命令。

避免为了通过测试而改坏真实逻辑,涉及浏览器或外部服务时应区分模拟环境和生产环境。当前无详细 SKILL.md 内容,需参考仓库中的 Testing Strategy 了解覆盖率目标和测试前提条件。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

testing-strategy 怎么安装?

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

testing-strategy 支持哪些 AI 工具?

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

testing-strategy 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

testing-strategy 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

testing-strategy 用的人多吗?

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

testing-strategy 安全吗?

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

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 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-strategy

测试策略 · 本页

2678需要联网未明确未通过

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

SKILL.md 原文

Testing Strategy

Systematic test planning and coverage improvement workflow.

When to Use

TriggerDescription
Post-COMPLEX FeatureAfter implementing major features
Coverage DropWhen coverage falls below thresholds
Test Debt SprintDedicated testing improvement effort
New ProjectEstablishing testing foundation
Pre-ReleaseEnsuring quality before deployment

Coverage Targets

CategoryTargetWarningCritical
Business Logic>80%70-80%<70%
Overall>60%50-60%<50%
Critical Paths>90%80-90%<80%

Prerequisites

Before starting:

  • Test framework configured
  • Coverage tool available
  • CI/CD running tests
  • Access to current coverage report
  • Understanding of business-critical features

Strategy Process

Phase 1: Coverage Analysis
    ↓
Phase 2: Critical Path Identification
    ↓
Phase 3: Test Pyramid Planning
    ↓
Phase 4: Test Prioritization
    ↓
Phase 5: Edge Case Planning
    ↓
Phase 6: Flaky Test Remediation
    ↓
Phase 7: Implementation Roadmap

Phase 1: Coverage Analysis

1.1 Generate Coverage Report

Node.js (Jest/Vitest):

npm test -- --coverage
# or
npx vitest run --coverage

Python (pytest):

pytest --cov=src --cov-report=html

Go:

go test -cover ./...
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out

Rust:

cargo tarpaulin --out Html

1.2 Analyze Coverage Gaps

Review coverage report for:

AreaTargetCurrentGap
src/auth/90%45%-45%
src/api/80%62%-18%
src/utils/60%78%+18%
Overall60%55%-5%

1.3 Identify Uncovered Files

List files with lowest coverage:

Lowest Coverage Files:
1. src/auth/oauth.ts - 12% (critical!)
2. src/api/payments.ts - 28% (critical!)
3. src/services/email.ts - 35%
4. src/utils/validation.ts - 42%
5. src/api/users.ts - 48%

Phase 2: Critical Path Identification

2.1 Define Critical Paths

Critical paths are user journeys that MUST work:

PathDescriptionFilesPriority
AuthenticationLogin, logout, sessionauth/*P0
CheckoutCart → Payment → Confirmpayments/*, cart/*P0
RegistrationSignup → Verify → Profileusers/*, email/*P1
SearchQuery → Results → Filtersearch/*, api/*P1

2.2 Map Critical Files

For each critical path, list involved files:

Authentication Path:

src/auth/login.ts        - 45% coverage
src/auth/session.ts      - 52% coverage
src/auth/middleware.ts   - 88% coverage
src/models/user.ts       - 72% coverage

2.3 Calculate Critical Path Coverage

Authentication Path:
- Total lines: 450
- Covered lines: 267
- Coverage: 59% (target: 90%)
- Gap: 183 lines to cover

Phase 3: Test Pyramid Planning

3.1 Ideal Test Pyramid

         /\
        /  \
       / E2E \         10% - Slow, expensive, covers user flows
      /______\
     /        \
    /Integration\      20% - Medium speed, covers integrations
   /______________\
  /                \
 /    Unit Tests    \  70% - Fast, cheap, covers logic
/____________________\

3.2 Current Distribution

Analyze current test distribution:

Current State:
- Unit tests: 45 (60%)
- Integration: 25 (33%)
- E2E: 5 (7%)

Ideal State:
- Unit tests: 70 (70%)
- Integration: 20 (20%)
- E2E: 10 (10%)

Gap:
- Need +25 unit tests
- Need -5 integration tests (or OK)
- Need +5 E2E tests

3.3 Test Type Guidelines

Unit Tests (70%):

  • Pure functions
  • Business logic
  • Utility functions
  • Model methods
  • State transitions

Integration Tests (20%):

  • API endpoints
  • Database operations
  • Service interactions
  • Authentication flows
  • External service mocks

E2E Tests (10%):

  • Critical user journeys
  • Happy path scenarios
  • Cross-system flows
  • Smoke tests

Phase 4: Test Prioritization

4.1 Priority Matrix

PriorityCriteriaExample
P0Critical path, no testsPayment processing
P1Critical path, low coverageAuthentication
P2High risk, medium coverageData validation
P3Medium risk, any coverageUtility functions
P4Low risk, nice to haveFormatting helpers

4.2 Effort Estimation

Test TypeEffortCoverage Impact
Unit (simple)15 minHigh
Unit (complex)1 hourHigh
Integration2 hoursMedium
E2E4 hoursLow (but valuable)

4.3 Prioritized Test Backlog

## Test Backlog

### P0 - Immediate (This Sprint)
- [ ] Unit: payment.processPayment()
- [ ] Unit: auth.validateToken()
- [ ] Integration: POST /api/payments
- [ ] E2E: Complete checkout flow

### P1 - High (Next Sprint)
- [ ] Unit: auth.refreshToken()
- [ ] Unit: user.validateEmail()
- [ ] Integration: GET /api/users/:id
- [ ] E2E: Registration flow

### P2 - Medium (Backlog)
- [ ] Unit: validation helpers
- [ ] Unit: formatting utilities
- [ ] Integration: Search API

### P3 - Low (Nice to Have)
- [ ] Unit: logging utilities
- [ ] Unit: config loaders

Phase 5: Edge Case Planning

5.1 Required Edge Cases

Every function should test:

CategoryCasesExample
Null/Undefinednull, undefined inputvalidateUser(null)
Empty"", [], {}searchUsers("")
Boundary0, -1, MAX_INTsetQuantity(0)
Invalid TypeWrong type inputcalculatePrice("abc")
ConcurrentRace conditionsParallel updates

5.2 Edge Case Checklist

For each function:

  • Happy path tested
  • Null input tested
  • Undefined input tested
  • Empty input tested
  • Minimum boundary tested
  • Maximum boundary tested
  • Invalid type tested
  • Error conditions tested

Phase 6: Flaky Test Remediation

6.1 Identify Flaky Tests

Signs of flaky tests:

  • Intermittent failures in CI
  • Tests that pass locally but fail in CI
  • Tests that depend on execution order
  • Tests with timing-dependent assertions

6.2 Common Causes & Fixes

CauseSymptomFix
TimingRandom timeoutsUse proper async/await
Order dependencyFails when run aloneReset state in beforeEach
Shared stateRandom failuresIsolate test data
External servicesNetwork failuresMock external calls
Date/timeFails at midnightMock dates

Phase 7: Implementation Roadmap

7.1 Sprint Planning Template

## Sprint 1: Critical Path (2 weeks)

### Goals
- Achieve 90% coverage on authentication
- Achieve 90% coverage on payments
- Add 5 E2E tests for critical paths

### Tasks
1. Unit tests for auth module (20 tests)
2. Unit tests for payment module (15 tests)
3. Integration tests for auth API (5 tests)
4. E2E test: Complete checkout (1 test)
5. E2E test: Login flow (1 test)

### Expected Outcome
- Overall coverage: 55% → 65%
- Critical path coverage: 59% → 90%

7.2 Test Writing Guidelines

Test Structure:

describe('Module or Function', () => {
  // Setup
  beforeEach(() => {
    // Reset state
  });

  describe('method or scenario', () => {
    it('should [expected behavior] when [condition]', () => {
      // Arrange
      const input = createTestInput();

      // Act
      const result = functionUnderTest(input);

      // Assert
      expect(result).toEqual(expectedOutput);
    });
  });
});

Naming Convention:

should [expected behavior] when [condition]

Examples:
- should return user when valid ID provided
- should throw error when user not found
- should update timestamp when saving

7.3 Coverage Tracking

Track coverage weekly:

WeekOverallBusinessCriticalTests Added
155%62%59%+15
262%75%78%+22
368%82%88%+18
472%85%92%+12

Quick Reference

Coverage Commands

# Node.js
npm test -- --coverage --coverageReporters=text-summary

# Python
pytest --cov=src --cov-report=term-missing

# Go
go test -cover ./... | grep -E "coverage:"

# Rust
cargo tarpaulin --out Stdout

Test Templates

Unit Test:

describe('functionName', () => {
  it('should [behavior] when [condition]', () => {
    const result = functionName(input);
    expect(result).toEqual(expected);
  });
});

Integration Test:

describe('POST /api/resource', () => {
  it('should create resource when valid data', async () => {
    const response = await request(app)
      .post('/api/resource')
      .send(validData);
    expect(response.status).toBe(201);
  });
});

Checklist

Analysis

  • Coverage report generated
  • Gaps identified
  • Critical paths mapped
  • Current pyramid analyzed

Planning

  • Tests prioritized
  • Edge cases documented
  • Flaky tests identified
  • Sprint plan created

Implementation

  • P0 tests written
  • P1 tests written
  • Edge cases covered
  • Flaky tests fixed

Validation

  • Coverage targets met
  • All tests passing
  • No flaky tests
  • CI/CD updated

Extended Resources

For detailed examples, patterns, and in-depth guidance, see:

  • references/process.md - Comprehensive testing patterns and examples

Related Resources

  • code-review - Includes test validation
  • refactoring - Tests enable safe refactoring
  • troubleshooting - When tests fail unexpectedly

平台分布

Codex

35.49%
按下载量换算31

Claude

30.41%
按下载量换算26

Cursor

20.1%
按下载量换算17

Gemini CLI

9.66%
按下载量换算8

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills