World’s largest virtual agentic engineering & quality conference
Learn what integration testing is, its types, examples, and best practices. Understand how modules interact to ensure reliable software performance.

Zahwah Jameel
Author

Saurabh Prakash
Reviewer
Last Updated on: August 5, 2026
A green test suite is not the same as a working application. Modules that each pass unit testing in isolation can still break the moment they are wired together, because nothing has yet checked the assumptions they make about each other.
A typical application has a login module, a payment module, and a notification module. Each passes on its own, then payment sends an amount in cents where notification expects rupees, and the customer gets an email for a hundred times what they paid. Integration testing is the level that catches exactly this class of defect.
Integration testing is the software testing level where individually tested modules are combined and verified as a group, confirming that the interfaces between them pass data correctly and behave as specified. It runs after unit testing and before system testing.
These defects live at the interface rather than inside any single module. A module can compute the correct result on its own and still fail once connected, because it sends a date as a string where the receiver expects an epoch, or assumes a field that the caller sometimes omits. Every module passes its own unit tests and the combined flow still breaks.
An integration test crosses a real boundary: a database, a message broker, an internal service, or a third-party API. Crossing that boundary is what makes these tests slower to run than unit tests, and what lets them catch the contract mismatches that mocks hide.
The two levels differ in what they hold constant: unit testing fixes the boundary and varies the logic, integration testing fixes the logic and varies the boundary. Our guide on unit testing vs integration testing covers the trade-off in depth, and module and API seams are where enterprise application testing concentrates its effort.
| Unit testing | Integration testing |
|---|---|
| It is a white box testing process. | It is a black box testing process. |
| It is performed by developers. | It is performed by testers. |
| Finding defects is easy as each unit is tested individually. | Finding defects is hard as all modules are tested together. |
| It is always performed first before going through any other testing process. | It is performed after unit testing and before system testing. |
| Developers are aware of the internal design of the software while testing. | Testers are not aware of the internal test design of the software. |
| Integration testing | System testing |
|---|---|
| It ensures all combined units can work together without errors. | To ensure that the total build fills the business requirements and specifications. |
| It is black box testing. | It is a white box and black box testing or grey box testing. |
| It does not fall in the acceptance testing class and performs functional types of tests. | It falls in the acceptance testing class and performs functional and non-functional tests. |
| It is level two testing. | It is level three testing. |
| It identifies majorly interface errors. | It helps to identify system errors. |
Where integration testing checks module pairs, system integration testing validates whole subsystems against each other, which is the level enterprise teams reach once several independently built systems have to interoperate.
Integration testing sits in the middle layer of the test pyramid, above unit tests and below end-to-end tests. Its role is to validate that modules which work in isolation also work correctly together.

By Louise J Gibbs
Every integration test names a seam, sends real data across it, and asserts on what comes back. The four examples below cover the seams most applications actually have, and each one names the specific defect it catches.
In a ride-sharing app, a single booking crosses four services: user authentication, location tracking, ride matching, and payment processing. Integration testing follows one ride through all four and checks the handoffs:
Each handoff is a place where two teams agreed on a contract months apart. The test proves the contract still holds under real timing, rather than proving each service works alone.
This is the most common integration seam and the one most often faked with mocks. The test posts a new order through the API, then reads the row back from a real database rather than from the response body. Reading it back is the whole point, because the response only proves what the service intended to save.
Defects it catches that a mocked test cannot: a decimal column silently truncating a currency value, a timestamp stored without a timezone, a unique constraint that only fires on the second identical request, and a transaction that commits the order but not its line items. Pair this with database testing when the schema itself is under active change.
Here the seam is the JSON contract. The frontend renders a checkout summary from a payload the backend builds, and both sides were written against a schema document that has since drifted. The test drives the real UI against the real service and asserts on what the user sees, not on the payload.
Typical catches: a field renamed from totalAmount to total, a number arriving as a string so the UI concatenates instead of adding, and a null the frontend never guarded against rendering as the literal text "null" on the page. Because this example needs a browser, it is the one most teams run on a grid rather than locally, and it overlaps with API testing at the contract layer.
Third-party seams differ from internal ones because you cannot change the other side and it can change without telling you. Run these against the provider's sandbox, and cover the failure paths rather than only the successful charge: a declined card, a timeout after the charge succeeded, and a duplicate webhook for the same transaction.
The timeout case is the one that matters most and the one most suites skip. If the gateway charges the customer but the response never arrives, the order must not be left unpaid in your system, and a retry must not charge twice. That is an idempotency assertion, and it is only testable across the integration boundary.
Written up as formal test cases, the examples above look like this. The expected result names the observable outcome, so a reviewer can tell a pass from a fail without reading the code:
| Test case ID | Objective | Steps | Expected result |
|---|---|---|---|
| IT-01 | Order persists correctly from API to database | POST a valid order, then query the orders table directly by the returned ID | The stored row matches the submitted total to two decimal places, and its line items are present in the same transaction |
| IT-02 | Checkout summary renders the backend payload | Log in, add one item to the cart, open the checkout page against the live service | The displayed total equals the service total, and no field renders as empty, "null", or "undefined" |
| IT-03 | Payment is idempotent when the gateway response is lost | Charge a sandbox card, force a timeout on the response, then retry the same request with the same idempotency key | The customer is charged once, and the order reaches the paid state on the retry rather than duplicating |
| IT-04 | Declined payment leaves no partial order | Submit checkout using the provider's decline-test card | The user sees the decline message, no order row is created, and reserved stock is released |
Integration testing catches defects at the module boundary, where assumptions made by two teams meet for the first time. The Capgemini World Quality Report 2024-25 reports more acknowledgment of the importance of quality but finds organizations still need to put their objectives to work, and a defined integration stage is one of the places that gap closes.
While the ideal Test Pyramid suggests a 60-30-10 split (Unit/Integration/E2E), modern testing approaches are shifting toward a "Testing Honeycomb" structure. This is because in distributed systems, integration tests often become the largest layer as the most significant risks reside in the network boundaries and API contracts rather than isolated logic.
Murli Pawar, Vice President - Digital Engineering Division at SunTec India, with over 20 years of experience in software architecture and AI integration.
Integration testing types are grouped by how modules are brought together, either a few at a time or all at once:

In the incremental testing approach, all logically related modules are integrated and tested to check proper functionality as per the requirement. After this, other related modules are integrated incrementally, and the process continues until all integrated, logically related modules are tested successfully.
The incremental approach is carried out by three different methods:
The top-down integration testing approach involves testing top-level units first, and lower-level units are tested step-by-step. Test Stubs are needed to simulate lower-level units that cannot be available during the initial phases.
Advantages
Disadvantages

For a step-by-step walkthrough of this approach, see the dedicated top down integration testing guide.
Bottom-up approach involves testing bottom-level units first, followed by upper-level units. In the bottom-up testing approach, test drivers are needed to simulate higher-level units, which may not be available during the initial phases.
Advantages
Disadvantages

The Sandwich testing approach is known as "hybrid testing" because it combines top-down and bottom-up testing approaches. In this strategy, the low modules are tested in conjunction with the higher-level modules and vice versa. This strategy uses both stubs and drivers.
Advantages
Disadvantages

Top-down and bottom-up approaches both need placeholder code to stand in for modules that are not ready yet. Stubs replace the modules below the one under test, drivers replace the ones above it.
| Stubs | Driver |
|---|---|
| They are mainly used in top-down integration testing. | They are mainly used in bottom-up integration testing. |
| Stubs can be understood as modules of software during the development process. | Drivers are used to invoke the component individually that requires testing. |
| They are crucial to test different features and functionalities of modules. | They are used when the main module of the software is not ready or developed for testing. |
| Stubs play a crucial role when low-level modules are not available. | Drivers get crucial when high-level modules are unavailable or sometimes in the absence of low-level modules. |
| In the case of a partially developed low-level module, you can use Stubs to test the main module. | In the case of a partially developed high-level module, you can use Drivers to test the main module. |
| Stubs are only considered when the upper levels of modules are done. | Drivers can be considered in both cases - when upper-level or lower modules are done. |
In this non-incremental testing approach, all the developed modules are tested individually and then integrated and tested once again. This is also known as big bang integration testing.
This type of integration testing involves coupling most of the developed modules into a larger system, which is then tested as a whole. This method saves time on small projects. Test cases and their results must be recorded correctly so a failure can be traced back to the module that caused it.
Advantages
Disadvantages
Testing whether modules deliver the behavior the requirements describe, rather than only that they connect, is covered separately in functional integration testing.
Note: Run integration tests across 10,000+ real devices and 3,000+ browser and OS combinations on TestMu AI, with no grid to maintain. Try TestMu AI free!
Once the units have passed their individual tests, they can be integrated and tested as a group in this sequence:
Entry Criteria
Exit Criteria
The tool you need depends on which boundary you are crossing: a browser-driving framework for UI-to-service flows, a Python runner for service-to-service tests, or a static-analysis suite for safety-critical embedded code. See our dedicated guide on integration testing tools for the full comparison.
TestMu AI (Formerly LambdaTest) is a cloud-native test execution platform for running integration suites at scale. Instead of maintaining a local Selenium Grid or device lab, teams execute integration tests across 10,000+ real devices and 3,000+ browser and OS combinations on TestMu AI's cloud. It supports Selenium, Playwright, Cypress, Pytest, Appium, Espresso, and WebdriverIO. Key capabilities include:
Selenium drives a real browser, which makes Selenium the common choice when an integration test suite has to exercise the UI-to-backend path rather than call services directly. Key features include:
Pytest is the usual runner for Python integration testing, where fixtures handle the setup and teardown that database and API tests need. That guide covers the fixture patterns and runnable examples in full. Key features:
Safety-critical and embedded teams work under different constraints, where certification evidence matters as much as pass or fail. Tools built for that context, including VectorCAST and LDRA, combine static and dynamic analysis with requirements tracing, and IBM Rational Integration Tester targets service and message-layer integration. Our test tool overview covers how to evaluate them.
Note: Integration suites are the slow stage of most pipelines. TestMu AI's HyperExecute orchestrates them across parallel runners, with test execution up to 70% faster and CI/CD support built in.
These five rules keep an integration suite maintainable as the number of modules grows:
Start by picking the approach that matches how your modules actually ship. Teams delivering top-down from a stable interface layer need stubs and can begin before the lower modules exist; teams building upward from shared services need drivers; a system already assembled and failing at the seams is a sandwich or big bang case. Write the entry criteria down before the first test, since an integration suite entered without completed unit tests reports module bugs as interface bugs.
To run that suite without maintaining a grid, use TestMu AI's cloud-based test automation platform for Selenium, Pytest, Playwright, and Cypress integration tests across 10,000+ real devices and 3,000+ browser and OS combinations. The HyperExecute getting started guide walks through the first pipeline, and end-to-end testing vs integration testing covers where each layer stops and the next begins.
Author
Zahwah Jameel is a community contributor with 5 years of experience in documentation, developer advocacy, and community engagement. She has led content strategies, built developer communities, authored API documentation, and created tutorials and demos for platforms including TestMu AI, JDoodle, MRHB.Network, and OnGraph Technologies. As founder of her own writing collective, she has delivered content for clients such as TestMu AI and Simplilearn. On LinkedIn, she is followed by 4,700+ QA engineers, developers, DevOps professionals, tech leaders, and AI innovators.
Reviewer
Saurabh Prakash is an Engineering Manager at TestMu AI (formerly LambdaTest), where he leads engineering on agentic AI development and scalable system architecture for the quality engineering platform. He has also contributed to Test at Scale, the company's open-source test intelligence platform. He brings over 9 years of experience across Node.js, Java, Spring, MVC, data structures, algorithms, and scalable system design, with earlier roles as SDE 2 at Zomato, Senior Software Engineer at LogicHub, and Software Development Engineer at Directi. Saurabh holds a B.Tech in Computer Science and Engineering from Delhi Technological University.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance