Pcornel
Automation · Testing

Integration Testing

Cheat sheet · https://pcornel.dk/topic.php?topic=5927

Back to the Topic

Answer

Integration testing checks that real components work together across actual interfaces — an API, database, queue or cloud provider — rather than testing each piece in isolation with mocks.

Remember

  • Integration pass ≠ full end-to-end workflow passes.
  • HTTP/API success ≠ downstream durable state correct.
  • One dependency version works ≠ supported versions all work.
  • Shared test dependency healthy ≠ test isolation guaranteed.

First checks

  • molecule test — Ansible role integration
  • Test against real APIs in lab — integration
  • Contract tests for APIs — compatibility

Commands

pytest -q <test-path>
Read-only/validation observation for pass/fail result and assertion/error output for the explicitly selected test scope.

Verify in this order

components → integrated test → results

Where it usually breaks

Integration Testing proves selected real component contracts under the test setup; it does not prove the complete user/workload path or every production dependency.

Integration Testing testing proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Scope / oracleRequirement, case, expected result and exercised scope are explicitA generic green status exists without a trustworthy oracle or coverage boundary
Fixture / environmentData, dependencies and environment versions are reproducibleShared state, floating versions or stale fixtures make results non-reproducible
Effective outcomeAuthoritative state/read-back and service-relevant evidence match the expected resultTool/test/validator success substitutes for effective target or workload proof
Limits / next actionCoverage limits, unknowns and failures drive the next narrower checkUnknown evidence becomes pass, retries hide failures or broad success is inferred from one check

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5927

Confirmation

Confirm action

Continue?