skills/mav-bp-integration-testing/SKILL.md
Integration testing conventions for applications. Covers test scope, external dependency management, environment setup, data isolation, and project testing guidance. Applied when writing or reviewing integration tests.
npx skillsauth add thermiteau/maverick mav-bp-integration-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ensure integration tests verify that components work together correctly across real boundaries — APIs, databases, file systems, and third-party services.
| Strategy | When to use | Example | | -------- | ----------- | ------- | | Containerised real service | Database, cache, message broker | Testcontainers, Docker Compose | | Local server | Lightweight service your code controls | In-process HTTP server, embedded DB | | Sandbox / test account | Third-party API with sandbox mode | Stripe test mode, AWS LocalStack | | Contract test + stub | External API you cannot control | Pact, WireMock with recorded responses |
should persist order and publish event when checkout completesdescribe blocks: describe('POST /orders')All projects must maintain a minimum 60% coverage for integration tests. Integration test coverage measures the percentage of cross-boundary code paths exercised by the test suite.
Integration test coverage is measured differently from unit test coverage:
| Metric | What it measures | How to assess | | --- | --- | --- | | API endpoint coverage | Percentage of endpoints with at least one integration test | Count tested vs total endpoints | | Database operation coverage | Percentage of query/mutation patterns exercised | Review repository/DAO layer coverage | | Service boundary coverage | Percentage of external service integrations tested | Count tested vs total integration points | | Line coverage during integration runs | Lines executed when integration tests run | Standard coverage tooling with integration test suite |
Use line coverage during integration test runs as the primary metric for the 60% threshold, measured the same way as unit test coverage but scoped to the integration test suite.
tests/integration/, __tests__/integration/)Before applying these standards, load the project-specific testing implementation:
digraph lookup {
"docs/maverick/skills/integration-testing/SKILL.md exists?" [shape=diamond];
"Read and use alongside these standards" [shape=box];
"Invoke upskill" [shape=box];
"Read generated skill" [shape=box];
"docs/maverick/skills/integration-testing/SKILL.md exists?" -> "Read and use alongside these standards" [label="yes"];
"docs/maverick/skills/integration-testing/SKILL.md exists?" -> "Invoke upskill" [label="no"];
"Invoke upskill" -> "Read generated skill";
"Read generated skill" -> "Read and use alongside these standards";
}
docs/maverick/skills/integration-testing/SKILL.mddo-upskill skill with:
describe\(|it\(|test\(|expect\(|assert|@SpringBootTest|@IntegrationTest|TestContainers**/integration/**, **/e2e/**, **/*.integration.*, **/docker-compose*.test*| Pattern | Issue | Fix | | ------- | ----- | --- | | Test hits production service | Risk of side effects and flakiness | Use container, sandbox, or stub | | No cleanup after test | Data leaks between tests | Add teardown or use transaction rollback | | Sleep-based waits for dependencies | Flaky timing | Use health-check polling with timeout | | Test duplicates unit test coverage | Wasted execution time | Delete and rely on unit test | | Shared mutable test data across tests | Order-dependent failures | Each test creates its own data | | No timeout set | Hanging test blocks CI | Set explicit per-test timeout | | Hard-coded connection strings | Breaks in different environments | Use environment variables or config | | Test requires manual environment setup | Not reproducible | Automate with containers or scripts |
<!-- maverick-plugin-version: 3.3.7 -->development
--- name: do-test description: Write or update tests for a code change. Operates in two modes: `unit` (module-scoped, fast, deterministic) and `integration` (crosses module / service / database boundaries). Intended to be invoked once per testable change from inside a do-issue-* or do-epic phase. Mode is required. argument-hint: mode: unit or integration user-invocable: true disable-model-invocation: false --- **Depends on:** mav-bp-unit-testing, mav-bp-integration-testing, mav-local-verificati
development
Implement a focused code change. Use this skill as the wrapper for any implementation work so the Maverick workflow report captures what was done and so the agent applies the project's coding standards before editing. Intended to be invoked once per task from inside a do-issue-* or do-epic phase, not standalone.
testing
How to stack a PR on top of an unmerged sibling branch, and how to retarget it to the repo's default branch once the sibling merges. Prevents orphan-merge incidents when a dependent story is ready before its parent.
development
Claim, lease, heartbeat, and release protocols for when multiple Claude Code instances may act on the same issue or epic concurrently. GitHub labels and marker comments are the coordination surface; local state is a cache.