agentleFS
saitarrunsaitarrun/Devforge-ai/skills/enterprise-test-suites/SKILL.md

enterprise-test-suites

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Comprehensive testing matrix spanning Unit, Integration, E2E (Playwright), Contract (Pact), Chaos/Fault-Injection, Mutation, Load/Stress (k6), and Security Fuzz testing.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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
  1. Distinctive:

    Standard: Use ephemeral real dependencies with Testcontainers (Postgres, Redis, Kafka, LocalStack).

    line 45
  2. Distinctive:

    Invariants: Test database transactions, rollback on failure, connection pools, and migration compatibility.

    line 46

≈ “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.

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

Enterprise Multi-Tier Test Suite Engineering Skill

This skill defines industry standards for implementing a resilient, multi-tiered test pyramid for mission-critical enterprise applications.


1. The Enterprise Testing Matrix

                      / \
                     /   \
                    / E2E \       → Playwright / Cypress UI workflows
                   /-------\
                  / Contract\     → Pact / OpenAPI Consumer-Provider validation
                 /-----------\
                / Integration \   → Testcontainers (Postgres, Redis, Kafka)
               /---------------\
              /      Unit       \ → Vitest / Jest / PyTest (>80% branch coverage)
             /-------------------\
            / Specialized Suites  \
           /-----------------------\
          • Chaos & Fault Injection (Simulate network drop, latency, node crash)
          • Load & Performance (k6 / Artillery latency & concurrency benchmarks)
          • Security & Property Fuzzing (Malformed payload injection)
          • Mutation Testing (Stryker / mutmut test-quality validation)

2. Test Suite Specifications

A. Unit Test Suite (*.spec.ts / *_test.go)

  • Focus: Pure business logic, domain models, mathematical formulas, and validators.
  • Rules: Fast (<5ms per test), zero external I/O, deterministic mocking.
  • Coverage: Target >80% line and branch coverage.

B. Integration Test Suite (*.integration.spec.ts)

  • Focus: Database repositories, ORM queries, cache layers, external API clients, and queue consumers.
  • Standard: Use ephemeral real dependencies with Testcontainers (Postgres, Redis, Kafka, LocalStack).
  • Invariants: Test database transactions, rollback on failure, connection pools, and migration compatibility.

C. Consumer-Driven Contract Test Suite (*.contract.spec.ts)

  • Focus: Microservices API boundaries and webhook contracts.
  • Tooling: Pact / MSW.
  • Invariants: Assert request/response schemas, error codes, and headers without deploying the full fleet.

D. End-to-End (E2E) Test Suite (tests/e2e/*.spec.ts)

  • Focus: Critical user journeys (e.g. User Signup -> Policy Selection -> Payout -> Invoice Generation).
  • Tooling: Playwright headless browser runners with parallel workers and video/trace capture on failure.

E. Load & Stress Test Suite (tests/perf/*.js)

  • Tooling: k6 or Artillery.
  • Scenarios:
    • Load Test: Target expected average RPS (e.g. 500 RPS) for 10 minutes; assert p95 latency < 150ms.
    • Spike Test: 10x instant burst to verify auto-scaling and rate-limiting resilience.
    • Soak Test: Sustained traffic for 2 hours to detect memory leaks and connection exhaustion.

F. Chaos & Fault Injection Test Suite (tests/chaos/*.ts)

  • Focus: Distributed resilience and graceful degradation.
  • Simulations:
    • Database primary failover mid-transaction.
    • 500ms artificial network latency on Redis/Kafka.
    • External third-party payment gateway 503 outage (verify circuit breaker and fallback queue).

G. Security & Property-Based Fuzzing (tests/fuzz/*.ts)

  • Tooling: Fast-check / Atheris.
  • Focus: Property-based invariance testing with randomized edge-case inputs (overflow numbers, null bytes, unicode emojis, SQL fragments).

3. Test Suite Organization Standard

tests/
├── unit/                 ← Fast isolated unit tests
├── integration/          ← Testcontainers-backed DB & API integration tests
├── contract/             ← Pact consumer/provider verification
├── e2e/                  ← Playwright browser journeys
├── perf/                 ← k6 load, spike, and soak test scripts
├── chaos/                ← Circuit breaker & fault-injection simulations
└── fuzz/                 ← Property-based fuzzing harnesses

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.