Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Integration Testing

Direct 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.

When to use this

Use it when designing, executing or reviewing automation tests around Integration Testing. Keep requirement/risk, test oracle, fixture/environment identity, exercised scope, raw observations and target/workload outcome as separate proof boundaries.

First 30 seconds

1. Integration tests check components together (roles on VMs, API clients against test APIs).

2. Use lab environments.

3. Clean up after.

4. Slower — run in CI stages.

5. Catch interface issues.

Operational verification

components → integrated test → results

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
automation testing
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformautomation testing · Integration Testing owns real cross-component contract checks; API, database, queue and platform branches own their detailed semantics. · pytest
Key commandpytest -q <test-path>
Scope / prerequisiteUse it when designing, executing or reviewing automation tests around Integration Testing. Keep requirement/risk, test …
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence1
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

component A → real contract/interface → dependency B → protocol result → durable state/read-back → cleanup → compatibility/failure evidence

Healthy evidence: real contract boundaries are exercised with versioned dependencies, isolated data and durable-state assertions.

Step 2 Command read-back and what it shows Verify boundary

pytest -q <test-path> is the bounded verification surface selected for Testing → Integration Testing. A known-good result is the intended component versions exchange the expected request/state and receive the correct response/side effects across the real boundary, including selected error cases, and repeated runs cleanly isolate test data. Treat schema/auth/protocol mismatch, missing side effects, incompatible version behavior or apparent success that depends on a permissive stub not representative of the real integration as broken/suspicious. pytest shows outcomes of the selected integration cases and their configured dependencies, but it does not show every downstream system or full end-to-end behavior.

Step 3 Failure modes and next checks Narrow the fault

Suspicious evidence: tests use shared mutable environments, assert only transport success or silently adapt to incompatible dependency behavior.

Integration Testing shows selected real component contracts under the test setup, but it does not show the complete user/workload path or every production dependency.

Step 4 Observation-driven branch and next-check logic Narrow the fault

For a failing Testing → Integration Testing case, freeze scope first: target/object, desired revision or request, and failure time. Inspect pytest -q <test-path>. Branch on evidence rather than labels: if setup cannot establish dependent services, fix environment before product interpretation; if request reaches dependency but contract/schema/status differs, inspect the shared interface; if interface succeeds but workflow fails later, move to the next integration boundary rather than changing the first component.

Step 5 Common mistakes Narrow the fault
  • No integration tests against a lab.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • 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.
Key checks
  • molecule test — Ansible role integration
  • Test against real APIs in lab — integration
  • Contract tests for APIs — compatibility
ReferenceWhat it is1 section · depth on demand

Core model

Define the contract boundary, provision representative dependencies, use controlled credentials/data, execute the integration, assert both protocol result and durable state, then clean up without hiding evidence from failures.

ReferenceHow it works1 section · depth on demand

How it works

In Testing → Integration Testing, effective state is split across the contract between two or more real components, including request/response schemas, authentication, persistence/message semantics and failure handling at their shared boundary. Integration tests deliberately keep the interface between components real enough to validate serialization, protocol and state exchange while controlling unrelated dependencies; the useful evidence is at the shared boundary. Schema migrations, clocks, queues/databases, credentials, network and version compatibility are independent dependencies. This matters because unit tests can pass while components disagree on schema or semantics, and an integration test can pass against a stub that is less strict than the real dependency.

ReferenceImportant terms & boundaries2 sections · depth on demand

What this shows and what it does not

Integration Testing owns real cross-component contract checks; API, database, queue and platform branches own their detailed semantics.

Method

Integration testing checks that automation works with real components — a real API, database, container or device image — rather than mocks.

1. Provision a disposable environment (containers, VMs, virtual network devices such as Containerlab/CML).

2. Load known test data into dependent systems (NetBox fixtures, test accounts).

3. Run the automation exactly as in production (same entry point and options).

4. Assert on the resulting state of the real components.

5. Run a second time to check idempotency.

6. Tear down the environment.

molecule test -s docker            # Ansible role against containers
containerlab deploy -t lab.clab.yml && pytest tests/integration && containerlab destroy -t lab.clab.yml
Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docautomation testing current

Authoritative/upstream documentation reviewed for bounded claims in Testing > Integration Testing. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.pytest.org/en/stable/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
integration testing automationautomation integration testsreal dependency tests
Embedded reference data

Quick lookup tables

Integration Testing testing proof-boundary map

Fast criteria/scope, execution and effective-outcome proof boundaries for Integration Testing.

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
Confirmation

Confirm action

Continue?