testing

Use when choosing a testing strategy, right-sizing test coverage, or understanding test categories. Covers the Test Trophy model, test type tradeoffs, and guidance on balancing static analysis, unit, integration, and end-to-end tests. USE FOR: testing strategy, Test Trophy, test type selection, right-sizing test coverage, balancing test categories, choosing testing tools, test automation architecture DO NOT USE FOR: specific test category implementation (use static-analysis, unit-testing, integration-testing, e2e-testing, etc.), BDD specification authoring (use specs/documentation/gherkin)

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "testing" with this command: npx skills add tyler-r-kendrick/agent-skills/tyler-r-kendrick-agent-skills-testing

Testing Strategy — The Test Trophy

Overview

The Test Trophy (Kent C. Dodds) is a modern testing strategy that prioritizes integration tests over unit tests, reflecting how today's tooling has shifted the cost/confidence tradeoffs of each test category.

"Write tests. Not too many. Mostly integration." — Kent C. Dodds

The Test Trophy

                  ┌───────┐
                  │  E2E  │  Few, high-confidence, slow, expensive
                 ─┴───────┴─
               ┌─────────────┐
               │ Integration  │  Most tests here — best ROI
              ─┴─────────────┴─
            ┌───────────────────┐
            │       Unit        │  Isolated logic, fast, cheap
           ─┴───────────────────┴─
         ┌───────────────────────────┐
         │     Static Analysis       │  Free — catches bugs at write time
         └───────────────────────────┘

Test Categories

CategoryWhat It TestsSpeedConfidenceCost
Static AnalysisTypes, syntax, lint rules, security patternsInstantLow-MediumFree
UnitIndividual functions/classes in isolationFastMediumLow
IntegrationMultiple units working togetherMediumHighMedium
E2EFull user flows through the real systemSlowVery HighHigh

Beyond the Trophy

CategoryWhat It TestsWhen to Use
ContractAPI compatibility between servicesMicroservices / distributed systems
APIHTTP endpoints directlyREST/GraphQL APIs
PerformanceLoad, stress, scalabilityBefore launch, capacity planning
VisualUI appearance / regressionDesign systems, component libraries
AccessibilityWCAG compliance, screen readersAll user-facing apps
AcceptanceBusiness requirements (BDD)Stakeholder-facing features
ChaosSystem resilience under failureDistributed systems, microservices

Right-Sizing Your Tests

The Trophy Distribution

Allocate effort roughly proportional to the Trophy shape:

Category% of TestsRationale
Static AnalysisAlways onZero-cost, catches trivial bugs
Unit~20%Pure logic, algorithms, edge cases
Integration~50%Best confidence-per-dollar
E2E~20%Critical user journeys only
Other (contract, perf, a11y, visual)~10%As needed per project type

When to Shift the Balance

Project TypeEmphasizeReduce
Library / SDKUnit tests (public API surface)E2E (no UI)
MicroservicesContract + integrationE2E (too many services)
Monolithic web appIntegration + E2EContract (single deploy)
Design systemVisual + accessibilityPerformance
Real-time / tradingPerformance + unitVisual
Regulated / healthcareAcceptance (BDD) + integration

Cross-Platform Tool Landscape

Static Analysis

ToolLanguages
TypeScriptJS/TS (type checking)
ESLint / BiomeJS/TS (linting)
Roslyn AnalyzersC#
Pylint / Ruff / mypyPython
SemgrepMulti-language SAST

Unit Testing

ToolLanguages
Vitest / JestJS/TS
xUnit / NUnit / MSTestC#
pytestPython
JUnit / TestNGJava
Go testGo

Integration Testing

ToolLanguages
TestcontainersJava, .NET, Node, Python, Go
Vitest / JestJS/TS
xUnit + WebApplicationFactoryC# / ASP.NET
pytestPython

E2E Testing

ToolPlatforms
PlaywrightWeb (Chromium, Firefox, WebKit)
CypressWeb (Chromium-based)
SeleniumWeb (all browsers)
AppiumMobile (iOS, Android)
MaestroMobile (iOS, Android)

Contract Testing

ToolType
PactConsumer-driven contracts
PactFlowBi-directional contract testing
Spring Cloud ContractJVM contract testing

API Testing

ToolFormat
.http filesVS Code / JetBrains REST Client
BrunoGit-friendly API collections
Postman / NewmanCollections + CLI runner
REST Client (VS Code)Inline .http files
k6Scripted API + load testing

Performance Testing

ToolType
k6 (Grafana)Load / stress (JS scripts)
JMeterLoad / stress (GUI + CLI)
GatlingLoad / stress (Scala/Java)
ArtilleryLoad / stress (YAML config)
LighthouseWeb performance audit

Visual Testing

ToolIntegration
ChromaticStorybook visual regression
Percy (BrowserStack)Cross-browser visual diffs
BackstopJSCSS regression (headless)
Playwright screenshotsCustom visual assertions

Accessibility Testing

ToolType
axe-core / @axe-core/playwrightAutomated WCAG checks
Pa11yCLI accessibility audits
LighthouseAccessibility scoring
Storybook addon-a11yComponent-level checks

Acceptance Testing (BDD)

ToolLanguages
CucumberJava, JS, Ruby
SpecFlow / ReqnrollC#
BehavePython
GaugeMulti-language (Markdown specs)
GodogGo

Chaos Testing

ToolType
Chaos MonkeyRandom VM termination (Netflix)
GremlinSaaS fault injection platform
LitmusKubernetes chaos engineering (CNCF)
Chaos MeshKubernetes fault injection
ToxiproxyTCP proxy for network faults
AWS Fault Injection ServiceAWS-native chaos
Azure Chaos StudioAzure-native chaos

Test Automation Architecture

CI Pipeline
  │
  ├── Static Analysis ──► ESLint + TypeScript + Semgrep (on every commit)
  │
  ├── Unit Tests ────────► Vitest / xUnit / pytest (on every commit)
  │
  ├── Integration Tests ─► Testcontainers + API tests (on every PR)
  │
  ├── Contract Tests ────► Pact verify (on every PR)
  │
  ├── E2E Tests ─────────► Playwright critical paths (on merge to main)
  │
  ├── Visual Tests ──────► Chromatic snapshot comparison (on every PR)
  │
  ├── A11y Tests ────────► axe-core in Playwright (on every PR)
  │
  ├── Performance Tests ─► k6 load tests (nightly / pre-release)
  │
  └── Chaos Tests ────────► Litmus / Gremlin experiments (pre-release / game days)

Best Practices

  • Follow the Test Trophy shape — invest most in integration tests, not unit tests.
  • Run static analysis on every keystroke (IDE) and every commit (CI) — it's free confidence.
  • Write E2E tests only for critical user journeys — they're expensive to maintain.
  • Use contract tests instead of E2E for verifying service boundaries in microservices.
  • Use Testcontainers for integration tests that need real databases, message brokers, or caches.
  • Use .http files or Bruno for API testing that's version-controlled alongside the code.
  • Run performance tests regularly (nightly or pre-release), not just before launch.
  • Include accessibility testing in CI — axe-core catches >50% of WCAG violations automatically.
  • Use BDD/Gherkin for features where business stakeholders need to verify acceptance criteria.
  • Keep test data factories close to the tests — avoid shared global test fixtures.
  • Use chaos engineering to verify resilience assumptions — inject real faults in staging and production with controlled blast radius.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

specs

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

ai

No summary provided by upstream source.

Repository SourceNeeds Review
Automation

markdown-token-optimizer

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

testing

No summary provided by upstream source.

Repository SourceNeeds Review