Cloud concept · Updated

Integration Testing - Integration testing verifies that connected software components exchange data and work together correctly across their interfaces.

In short

Components that pass isolated tests can still fail when combined because of incompatible schemas, incorrect configuration, permissions, network restrictions, or unexpected dependency behavior. Integration testing exercises these boundaries before changes reach production, making it an important quality gate for application delivery and data pipeline deployment.

Cloud Concepts Hub →

6 key aspects of Integration Testing

Effective integration testing combines realistic component interactions, repeatable environments, explicit correctness assertions, and automated release gates.

01
Interface and interaction correctness

Verify that components agree on request formats, schemas, data types, protocols, and error behavior. Assert meaningful outcomes instead of treating a successful connection or completed job as proof of correctness.

02
Representative dependencies and configuration

Exercise important paths against real dependencies with workload-representative permissions and networking. Use mocks or emulators for speed where appropriate, but recognize which deployment risks they cannot expose.

03
Automated delivery gates

Run integration tests after fast checks and deployment to a test environment. Configure the delivery workflow to stop promotion when required assertions fail, and retain reports associated with the tested revision.

04
Repeatable, isolated test execution

Version fixtures and infrastructure definitions, isolate concurrent runs, and clean up resources after execution. Stable inputs and independent environments make failures easier to reproduce and reduce interference between tests.

05
Data and failure-path validation

For data pipelines, check transformed values, schemas, rejected records, and intended replay behavior. Exercise dependency failures and duplicate delivery where relevant to verify recovery without silent data loss or corruption.

06
Bounded asynchronous verification and diagnostics

Wait for observable completion conditions with explicit timeouts rather than arbitrary delays. Preserve logs, correlation identifiers, and test results to distinguish application defects from environment failures.

Cloud services for Integration Testing

A delivery workflow can use AWS CodePipeline to coordinate deployment and testing, with AWS CloudFormation provisioning an isolated environment. AWS CodeBuild runs the test harness, prepares controlled inputs, invokes AWS Glue jobs, and validates destination data after processing finishes. Amazon CloudWatch supplies logs and metrics for troubleshooting failed assertions or timeouts. The workflow should use appropriately scoped roles, preserve test reports, stop promotion on failure, and clean up temporary resources regardless of the test outcome. These services provide orchestration and execution capabilities; engineers still define the fixtures, expected results, and coverage.

AWS CodeBuildAWS CodeBuild

Runs test frameworks and scripts that prepare fixtures, invoke deployed components, and assert results. Configure test commands to return a failing exit status on assertion failures, and publish supported test reports for diagnosis.

AWS CodePipelineAWS CodePipeline

Orchestrates build, test-environment deployment, automated testing, and release stages. A failed required test action prevents the pipeline execution from advancing to subsequent release stages.

AWS GlueAWS Glue

Provides managed data integration jobs whose interactions with storage, catalogs, and destinations can be integration-tested. A test harness can start a job with controlled input, wait for its terminal state, and validate the resulting data separately.

AWS CloudFormationAWS CloudFormation

Provisions repeatable test infrastructure from version-controlled templates. Separate stacks can isolate test runs, but teardown procedures must account for retained resources and resources that require cleanup before deletion.

Amazon CloudWatchAmazon CloudWatch

Collects workload logs and metrics that help explain integration test failures. Use execution identifiers to connect test assertions with job logs, and avoid logging secrets or sensitive fixture data.

Integration Testing exam questions

Real practice exam questions on Integration Testing, with the correct answer and its explanation. Answer them with every option in the exam simulator.

DEA-C01

A data engineering team uses AWS CodeBuild to validate an AWS Glue Python shell job before production deployment. The job uses a PostgreSQL client to load each batch into an Amazon RDS database. It inserts a row into a batch_header table and then inserts the batch's records into a batch_detail table.

Both writes must commit together. If a detail-table insert fails, the job must report failure and leave no rows for that batch in either table. Existing tests verify successful loads, but a recent change enabled autocommit and caused failed loads to leave header rows behind.

An isolated test database has the same schema as production. Which additional automated check should the team run in CodeBuild to detect this type of regression?

Show answerCORRECT ANSWER

Configure the test database to reject a detail-table insert after the header insert succeeds. Run the candidate job, require a failed job status, and use a separate database connection to verify that neither table contains rows for the test batch.

This exercises the actual transaction boundary between the job and the database. A failure after the first write exposes incorrect autocommit or rollback behavior. Checking both tables through a separate connection verifies the persisted state, while checking job status confirms that the failure is reported.

DVA-C02

A team manages an API service and a worker service with AWS Copilot. A deployed integration environment and a production environment already exist. Each integration test must exercise an approved combination of API and worker releases without changing production.

For each approved combination, the release team creates a Git tag containing both service manifests. These manifests specify prebuilt Amazon ECR images through image.location, using immutable release tags, and include the required integration environment overrides. The development branch instead contains manifests that use image.build to build images from local source code.

Which workflow should the developer automate before running the integration tests?

Show answerCORRECT ANSWER

Check out the approved Git tag. Run copilot svc deploy --name api --env integration and copilot svc deploy --name worker --env integration. Start the tests only after both deployments succeed.

The approved Git snapshot supplies the approved image references and environment-specific configuration. Deploying each service explicitly to integration applies that configuration and deploys the prebuilt approved images without rebuilding them or modifying production. Waiting for both deployments ensures the tests exercise the approved combination.

Practice Integration Testing in a full exam

Questions on Integration Testing in each practice exam, with every answer option and an explanation for each:

Start a free practice exam

What is Integration Testing

3 min read

Integration testing checks the behavior of two or more connected components rather than testing each component in isolation. The components might be application modules, an API and a database, or an ingestion job and its storage destination. The central question is whether their interaction produces the expected result under realistic conditions. Successful execution alone is insufficient: tests must assert the correctness of outputs, state changes, and failure handling.

For a cloud data pipeline, a practical integration test might upload a small, versioned input dataset to object storage, start a transformation job, wait for completion, and query the destination. Assertions could check the output schema, record counts, decimal precision, timestamp conversion, partition placement, and treatment of invalid records. A second execution with the same input can verify that the pipeline's intended deduplication or idempotency behavior prevents unintended duplicate records.

Integration tests also exercise operational boundaries that isolated tests often miss. A job may contain correct transformation logic but fail because its execution role cannot decrypt an input object, its network configuration cannot reach a database, or its catalog definition does not match the stored data. Use identities and configuration representative of the deployed workload. Tests run with administrator permissions can conceal authorization defects that appear after deployment.

In continuous integration and continuous delivery, commit the tests, fixtures, dependency definitions, and infrastructure templates alongside the pipeline code in version control. Run fast unit tests and static checks first, then deploy the candidate artifact to an isolated test environment and execute integration tests. Make test failures block promotion, and promote the same tested artifact rather than rebuilding it with potentially different dependencies. Continuous delivery can retain a production approval step; continuous deployment automatically releases changes after the required gates pass.

Keep test runs independent by using dedicated resources or unique database schemas, object prefixes, and execution identifiers. Provision environments reproducibly with infrastructure as code, use synthetic or appropriately de-identified data, and remove temporary resources even when tests fail. For asynchronous processing, poll for a defined completion condition with a bounded timeout rather than relying on fixed sleeps. Account for the consistency and delivery guarantees of each dependency, including duplicate or out-of-order events where applicable.

Integration tests usually cost more and take longer than unit tests because they involve additional dependencies and sometimes billable cloud resources. Emulators and test doubles provide fast feedback, but cannot establish that actual cloud permissions, networking, or managed-service behavior are correct. A practical strategy combines focused local tests with a smaller suite against real deployed dependencies. Capture logs, execution identifiers, test reports, and relevant metrics so failures can be diagnosed; avoid indiscriminate retries that hide genuine defects.

Integration testing is not synonymous with every other automated test. Unit tests isolate a small piece of logic, whereas integration tests examine interactions. End-to-end tests usually exercise a complete workflow, and acceptance tests evaluate business acceptance criteria. User interface tests exercise presentation-layer behavior, while security scans look for vulnerabilities or insecure configurations. These categories can overlap, but none replaces the others. Likewise, production monitoring detects operational problems after release; it complements rather than replaces predeployment testing.

Learn Integration Testing in lessons

6 short lessons on Integration Testing in 2 certification courses.

Open the lessons