agentleFS
mejbaurbaharmejbaurbahar/software-tester-skills/skills/integration-testing/SKILL.md

integration-testing

Skill1 starsChanged 52 days agoMITView on GitHub

Use when verifying interactions between multiple components, modules, or services — API-to-database persistence, message queues, external service adapters, and Testcontainers.

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use performance-patterns, api-design and 2 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.
  • farming-labsSkill

    performance-patterns

    Explains web performance patterns including Core Web Vitals, network and JavaScript cost, rendering and hydration work, lazy loading, caching, and performance budgets. Use when diagnosing slow pages, improving user-perceived speed, or deciding which optimization strategy matters most.

    Also in 3 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 6 projects that use this

  • MicrosoftSkill

    error-handling

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

    Also in 3 projects that use this

  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 0

    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. Very specific:

    Prefer many narrow tests plus contracts and a few broad ones (microservices-testing).

    line 21

“Common” is measured: kept by at least 6 in 10 of the 8 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

Integration Testing

Integration tests verify that independently built pieces (modules, services, databases, queues, third-party adapters) work together across their real interfaces. They find the bugs unit tests structurally cannot: wrong SQL, serialization mismatches, misconfigured clients, transaction and timeout behavior.

Scope

KindWhat runs for realWhat is faked
NarrowOne service + its real datastore/cache/queue (Testcontainers)Other services (stubbed at HTTP level)
Broad / serviceSeveral services in compose/k8sOnly external third parties
ContractConsumer vs provider expectationsBoth sides verified independently (contract-testing)
Prefer many narrow tests plus contracts and a few broad ones (microservices-testing).

Core checklist

  1. Persistence & transactions: full CRUD against the same engine and version as production (no in-memory substitute for a different SQL dialect); migrations apply cleanly on an empty and on a populated database; rollback on failure leaves no partial writes; constraints, unique keys, cascades; concurrent transactions and pool behavior (concurrency-race-condition-testing).
  2. Messaging: publish/consume, serialization and schema compatibility, idempotent consumers, retries, DLQ routing, ordering assumptions (event-driven-messaging-testing).
  3. HTTP clients and adapters: timeouts, retries with backoff and jitter, circuit-breaker open/half-open, handling of 4xx/5xx/slow/malformed/empty responses, auth token refresh. Stub servers: WireMock, MockServer, MSW, Prism.
  4. Configuration wiring: the real DI container/app context boots; env vars and secrets resolve; health/readiness endpoints report dependency status.
  5. Security boundaries: authorization enforced at the service and data layer, not just in the controller.
  6. Time and files: scheduled jobs (fake clock), file storage, temp directories, object storage (MinIO/LocalStack).

Environment and fixtures

// JUnit 5 + Testcontainers (real Postgres, same major version as prod)
@Testcontainers class OrderRepoIT {
  @Container static PostgreSQLContainer<?> pg = new PostgreSQLContainer<>("postgres:16");
  @Test void persistsAndReadsBack() { /* run migrations, insert via repo, query via JDBC, assert */ }
}
# pytest + testcontainers
@pytest.fixture(scope="session")
def db():
    with PostgresContainer("postgres:16") as pg:
        run_migrations(pg.get_connection_url()); yield pg
docker compose -f docker-compose.test.yml up -d --wait && pytest -m integration && docker compose down -v
  • Cleanup strategy: wrap each test in a transaction and roll back, or truncate touched tables, or use a template database per worker. Never drop/recreate schema per test.
  • Isolation: unique IDs per test, no dependence on execution order, parallel-safe.
  • Determinism: pin image versions/digests; wait on health checks, not sleeps; poll-until with timeout for async effects.

Strategies for integrating many parts

Big-bang (avoid) · top-down with stubs · bottom-up with drivers · sandwich · incremental by risk: integrate the riskiest boundary first (payments, auth, data migration).

Anti-patterns

Shared mutable state between tests · running against a shared staging environment where concurrent writes cause flakiness · asserting on internals rather than observable results · mocking the database you own · slow suites with no tiering (tag and run them in a separate CI stage) · ignoring failure modes (timeouts, partial failures).

Related

unit-testing, contract-testing, database-testing, microservices-testing, test-environment-management, api-testing

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.