agentleFS
d-o-hubd-o-hub/github-template-ai-agents/.agents/skills/testing-strategy/SKILL.md

testing-strategy

Skill2 starsChanged 10 days agoMITView on GitHub

Design and implement comprehensive testing strategies for software projects. Use this skill when planning test suites, choosing testing approaches like property-based testing, visual regression, load testing, mutation testing, or E2E test generation — even if they just say "how should we test this" or "what testing approach should we use". Not for test-runner.

54 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use api-contract-design, deploy-checklist and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MohOneXSkill

    api-contract-design

    Designs and reviews API contracts (REST, RPC, GraphQL, library interfaces) for evolvability, backward compatibility, and failure semantics. Use when defining new endpoints/interfaces, versioning an API, reviewing a schema, or deciding how breaking changes propagate to clients.

    Also in 3 projects that use this

  • AnthropicSkill

    deploy-checklist

    Pre-deployment verification checklist. Use when about to ship a release, deploying a change with database migrations or feature flags, verifying CI status and approvals before going to production, or documenting rollback triggers ahead of time.

    Also in 4 projects that use this

  • xenitV1Skill

    react-patterns

    Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.

    Also in 4 projects that use this

  • AnthropicSkill

    tech-debt

    Identify, categorize, and prioritize technical debt. Trigger with "tech debt", "technical debt audit", "what should we refactor", "code health", or when the user asks about code quality, refactoring priorities, or maintenance backlog.

    Also in 4 projects that use this

  • MicrosoftSkill

    error-handling

    统一错误处理系统。在添加 API 端点、修改错误处理、添加前端 API 调用、编写错误相关测试时使用。

    Also in 5 projects that use this

  • MicrosoftSkill

    api-design

    Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.

    Also in 9 projects that use this

  • +4 more from anthropics
  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 44 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check mutation score thresholds (>80% target)

    line 57
  2. Very specific:

    Keep tests concise with pure-function factories (makeEntity(overrides)), realistic defaults, seeded randomness, and builders updated on …

    line 91

“Common” is measured: kept by at least 6 in 10 of the 44 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Testing Strategy

Design and implement comprehensive testing strategies with modern techniques.

When to Use

  • User asks to plan test suites or choose testing approaches
  • Need to decide between property-based, visual regression, load testing, etc.
  • Even if they just say "how should we test this" or "what testing approach should we use"

Strategy Decision Tree

What are you testing?
├── Business logic / algorithms → Property-Based Testing
│   └── Tool: Hypothesis (Python), fast-check (JS)
├── UI appearance / visual state → Visual Regression
│   └── Tool: Playwright screenshots, Percy, Chromatic
├── Performance under load → Load & Stress Testing
│   └── Tool: Locust (Python), k6 (JS), JMeter (Java)
├── Test suite quality itself → Mutation Testing
│   └── Tool: Mutmut (Python), Stryker (JS/Java/C#)
└── End-to-end user flows → E2E Testing
    └── Tool: Playwright, Cypress, Selenium

Strategy Reference

StrategyWhat It CatchesWhen To UseEffort
Property-BasedEdge cases, boundary conditionsAlgorithms, data transformations, parsersMedium
Visual RegressionUI layout shifts, rendering bugsAny visual component, responsive designLow
Load & StressPerformance bottlenecks, memory leaksAPIs, databases, critical pathsHigh
Mutation TestingWeak assertions, missing test casesAny code with existing unit testsMedium
E2EIntegration bugs, user flow breaksCritical user journeys, smoke testsHigh

Language-Specific Tools

LanguageProperty-BasedVisualLoadMutation
PythonHypothesisPlaywrightLocustMutmut
JavaScriptfast-checkPlaywright/Percyk6Stryker
JavajqwikSeleniumJMeterPIT
C#FsCheckPlaywrightNBomberStryker.NET

Quality Gates

Integrate testing into CI/CD:

  • Check mutation score thresholds (>80% target)
  • Monitor Core Web Vitals in load tests (LCP < 2.5s)
  • Auto-quarantine flaky tests after 3 consecutive failures
  • Fail build if coverage drops on new code

Gotchas

  • Property-based tests need shrinking configuration — without it, counterexamples are huge and unhelpful.
  • Visual regression tests are environment-sensitive — use fixed viewport sizes and font rendering settings.
  • Load tests against production data need anonymization — never use real customer data.
  • Mutation testing on legacy code produces many surviving mutants — start with a baseline and improve incrementally.
  • Flaky E2E tests erode trust — quarantine them immediately and fix root cause before re-enabling.

Rationalizations

RationalizationReality
"Testing takes too long, I need to ship now"Skipping tests creates technical debt and leads to regressions that take longer to fix.
"The code is self-explanatory, it doesn't need tests"Tests document behavior and ensure it stays consistent as code evolves.
"I'll add tests once the feature is 'finished'"Tests should be written alongside code (TDD/BDD) to ensure the implementation is correct.

Red Flags

  • Declining code coverage on new features
  • Committing code with failing or bypassed tests
  • Ignoring flaky tests instead of identifying and fixing the root cause
  • Running all tests on every change instead of targeted test selection

References

  • Testing Strategy Patterns - Comprehensive collection of testing patterns and strategies

Appendix: Deterministic Testdata Builders (absorbed from testdata-builders)

Keep tests concise with pure-function factories (makeEntity(overrides)), realistic defaults, seeded randomness, and builders updated on every schema change (CI fails otherwise). Patterns: references/builder-patterns.md; strategy: references/test-data-strategy.md.

See Also

  • test-runner — Execute tests and diagnose failures
  • nested-build-isolation — Isolate nested subprocess builds, tests, or coverage runners
  • dogfood — Exploratory testing of web applications

Voice & Context

  • Default: professional + blog
  • Reference: voice-profiles skill for definitions and auto-detection.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.