← 返回 Skills 市场
clawkk

Testing Strategy

作者 clawkk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
199
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install testing-strategy
功能描述
Deep testing strategy workflow—risk mapping, test pyramid, levels of isolation, flakiness, data, CI gates, and quality signals beyond coverage %. Use when de...
使用说明 (SKILL.md)

Testing Strategy (Deep Workflow)

Testing strategy answers: what failures would hurt users, what’s cheap to catch, and what signals we trust in CI. Coverage percentage alone is a weak proxy—risk alignment matters.

When to Offer This Workflow

Trigger conditions:

  • New service or major refactor; “what should we test?”
  • Flaky CI, long runtimes, or tests nobody trusts
  • Debate: unit vs integration vs e2e; QA headcount vs automation

Initial offer:

Use six stages: (1) risk & quality goals, (2) pyramid & layers, (3) design per layer, (4) data & environments, (5) CI & gates, (6) observability of test health. Confirm release cadence and regulatory needs.


Stage 1: Risk & Quality Goals

Goal: Connect tests to user impact and business risk.

Questions

  1. Worst failure categories: payments wrong, data leak, outage, wrong advice (AI)?
  2. SLO for critical paths—what must never break silently?
  3. Change velocity—how fast must PRs merge safely?

Output

Risk registertest priorities (not every line equally important).

Exit condition: Top 5 risks have explicit test intent.


Stage 2: Pyramid & Layers

Goal: Many fast tests, some integration, few e2e—proportion tuned to risk.

Layers (typical)

  • Unit: pure logic, cheap, deterministic
  • Integration: DB, queue, real dependencies in containers—slower but valuable
  • Contract: between services—consumer-driven contracts when decoupled teams
  • E2E: full stack—expensive; minimal happy path + critical regressions

Anti-patterns

  • E2E-only (slow, flaky)
  • Mock everything (misses real integration bugs)

Exit condition: Written policy: what belongs in each layer for this codebase.


Stage 3: Design Per Layer

Goal: Tests are readable, stable, and debuggable.

Unit

  • Given/when/then clarity; avoid testing implementation details
  • Property-based tests for tricky invariants (dates, money, parsers)

Integration

  • Testcontainers or docker-compose in CI; migrations applied
  • Parallel safe—unique DB schemas or transactions

E2E

  • Stable selectors (data-testid); retry policy disciplined—fix flakes, don’t hide them
  • Seed data minimal; idempotent setup

Exit condition: Flake classification process exists (quarantine + ticket).


Stage 4: Data & Environments

Goal: Representative data without PII leakage.

Practices

  • Fixtures versioned; factories for variations
  • Anonymized prod-like datasets for perf tests—governance for access
  • Env parity: staging behaves like prod enough for meaningful e2e

Exit condition: Data generation documented; secrets not in tests.


Stage 5: CI & Gates

Goal: Fast feedback on PRs; nightly heavier suites if needed.

Tiers

  • PR: lint, unit, fast integration subset
  • Main: full integration; optional e2e against ephemeral env
  • Release: smoke + canary in prod

Metrics

  • Flake rate, duration, quarantined tests count—visible

Exit condition: Merge policy tied to green checks; exceptions process defined.


Stage 6: Test Health & Culture

Goal: Tests are owned like features.

Practices

  • Ownership per suite; on-call for CI when org size supports
  • Delete tests that don’t pay rent—or fix them

Final Review Checklist

  • Risks mapped to test layers
  • Pyramid policy documented
  • Flake management process exists
  • CI tiers match team velocity
  • Data/fixture strategy safe and maintainable

Tips for Effective Guidance

  • Recommend testing seams: boundaries where contracts are stable.
  • Warn against snapshot abuse for large UI—diff noise kills trust.
  • For AI/LLM, discuss eval harnesses beyond classic unit tests.

Handling Deviations

  • Legacy untestable code: characterization tests then refactor seams.
  • Startup speed: smoke + critical path first; expand as pain appears.
安全使用建议
This is a guidance-only skill (no code, no installs, no credentials). It's internally consistent and low-risk. Before using, verify it aligns with your org's policies (especially around suggestions to use prod-like datasets — ensure proper governance and anonymization). As with any guidance, adapt recommendations to your stack and don't execute any commands or share secrets based solely on the document.
功能分析
Type: OpenClaw Skill Name: testing-strategy Version: 1.0.0 The skill bundle contains a structured workflow for an AI agent to assist users with software testing strategies. The content in SKILL.md and _meta.json is purely instructional and educational, focusing on risk mapping, test pyramids, and CI/CD integration without any executable code, data exfiltration logic, or malicious prompt injection.
能力评估
Purpose & Capability
The name and description match the SKILL.md content: a human-oriented testing strategy workflow. There are no unexpected requirements (no binaries, env vars, or config paths).
Instruction Scope
SKILL.md contains high-level guidance and checklists only. It does not instruct the agent to read files, call external endpoints, access secrets, or execute commands beyond advising test practices.
Install Mechanism
No install spec and no code files are present; nothing will be downloaded or written to disk by installation.
Credentials
The skill requests no environment variables, credentials, or config paths. Mentions of anonymized prod-like data are advisory and do not translate into required access.
Persistence & Privilege
always is false and the skill does not request persistent privileges or modify agent/system configuration. Autonomous invocation is allowed by default but not problematic here because the skill is read-only guidance.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install testing-strategy
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /testing-strategy 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the "testing-strategy" skill with a comprehensive workflow for designing test approaches. - Covers six key stages: risk mapping, test layers (pyramid), test case design, test data and environments, CI gates, and observability of test health. - Provides practical guidance for handling flaky CI, test ownership, debates over test types, and QA vs. dev responsibilities. - Includes a review checklist, practical tips, and strategies for legacy or fast-moving teams.
元数据
Slug testing-strategy
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Testing Strategy 是什么?

Deep testing strategy workflow—risk mapping, test pyramid, levels of isolation, flakiness, data, CI gates, and quality signals beyond coverage %. Use when de... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 199 次。

如何安装 Testing Strategy?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install testing-strategy」即可一键安装,无需额外配置。

Testing Strategy 是免费的吗?

是的,Testing Strategy 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Testing Strategy 支持哪些平台?

Testing Strategy 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Testing Strategy?

由 clawkk(@clawkk)开发并维护,当前版本 v1.0.0。

💬 留言讨论