microservices-testing
Skill1 starsChanged 52 days agoMITView on GitHub
Use when designing a test strategy for microservices or distributed systems — service/component tests, consumer-driven contracts, service virtualization, testing in production, sagas and distributed transactions, cross-service E2E minimization, and the test honeycomb.
In this repository98 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 42crunch-api-security-testingSkill
- a-b-testingSkill
- acceptance-testingSkill
- accessibility-testingSkill
- ai-agent-evaluationSkill
- ai-code-securitySkill
- ai-ml-testingSkill
- analytics-tracking-testingSkill
- api-testingSkill
- authn-authz-testingSkill
- autonomous-qa-orchestrationSkill
- bdd-gherkin-testingSkill
- blockchain-smart-contract-testingSkill
- bug-reportingSkill
- chaos-resilience-testingSkill
- chatbot-voice-agent-testingSkill
- cicd-testingSkill
- cli-testingSkill
- cloud-infrastructure-testingSkill
- code-coverage-analysisSkill
- compatibility-testingSkill
- compliance-testingSkill
- concurrency-race-condition-testingSkill
- configuration-feature-flag-testingSkill
- contract-testingSkill
- cross-browser-testingSkill
- database-testingSkill
- data-migration-testingSkill
- data-pipeline-etl-testingSkill
- date-time-timezone-testingSkill
- desktop-app-testingSkill
- disaster-recovery-backup-testingSkill
- e2e-testingSkill
- email-notification-testingSkill
- event-driven-messaging-testingSkill
- exploratory-testingSkill
- flaky-test-managementSkill
- functional-testingSkill
- fuzz-testingSkill
- game-testingSkill
- graphql-testingSkill
- iac-container-security-testingSkill
- installation-upgrade-testingSkill
- integration-testingSkill
- iot-embedded-testingSkill
- llm-security-auditSkill
- llm-testingSkill
- localization-testingSkill
- manual-testingSkill
- mcp-testingSkill
- memory-leak-resource-testingSkill
- mobile-testingSkill
- mutation-testingSkill
- observability-testingSkill
- payment-ecommerce-testingSkill
- performance-testingSkill
- production-monitoring-synthetic-testingSkill
- property-based-testingSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 43
Data ownership: no shared DB; tests must not read other services' tables.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Microservices Testing
Distributed systems shift bugs from inside components to between them. Favor the honeycomb: few unit, many integration/contract, very few E2E.
Layers
| Layer | Scope | Tooling |
| Unit | Domain logic in one service | unit-testing |
| Component | One service, real DB/cache (Testcontainers), stubbed peers | WireMock, MockServer, MSW, Testcontainers |
| Contract | Consumer expectations ↔ provider | Pact, Spring Cloud Contract (contract-testing) |
| Integration | 2–3 real services in a compose/k8s namespace | docker compose, kind/k3d, Tilt |
| E2E | Critical user journeys only (≤10) | Playwright/Cypress on staging |
| Production | Canary, synthetic probes, feature flags | production-monitoring-synthetic-testing |
Component test recipe
# docker-compose.test.yml
services:
orders: { build: ., depends_on: [pg, payments-stub] }
pg: { image: postgres:16 }
payments-stub: { image: wiremock/wiremock, volumes: ["./stubs:/home/wiremock"] }Stub not only success: timeouts, 500s, slow responses (fault delay), malformed JSON, connection reset. Assert timeouts, retries with backoff+jitter, circuit-breaker open/half-open, fallback behavior, bulkheads.
Distributed-transaction (saga) testing
Enumerate each step's failure → verify compensation runs, is idempotent, and final state is consistent. Test compensation failing. Test out-of-order and duplicate events. Verify orchestrator restart mid-saga resumes.
Cross-cutting checks
- API versioning: N and N-1 clients against N provider; deprecate with telemetry.
- Observability: trace ID propagates across all hops (
traceparent); one test asserts a request produces a connected trace (observability-testing). - Auth propagation: service-to-service tokens/mTLS; confused-deputy (service acts with user's rights only).
- Config & secrets: missing env var → fail fast at boot; readiness vs liveness probes.
- Data ownership: no shared DB; tests must not read other services' tables.
- Deployment: rolling update with in-flight requests; schema migration backward-compatible (expand/contract).
Anti-patterns
Giant shared staging environment as the only integration test · E2E for every rule · mocking the DB you own · no timeouts in client calls · testing only happy paths between services.
Related
contract-testing, event-driven-messaging-testing, chaos-resilience-testing, integration-testing, cloud-infrastructure-testing
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
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.

