Get started
Insights

How to create a top-down integration testing strategy

How to create a top-down integration testing strategy

Introduction

Testing is one of the most important aspects of the modern software development process. Just a year ago, the testing market was estimated to be worth $40 billion. With ever-increasing quality standards, businesses are investing more than ever in qualified testing services for their software development initiatives.

More and more of these organizations have recognized that bugs and glitches swept under the rug tend to lead to huge expenses in the long term — both to fix the issues and deal with any security breaches and lost productivity that can occur.

The quality bar is especially high when it comes to testing complex, multi-component systems when overall performance depends on how smoothly components interact with each other. In this article, we’ll go through the main aspects of integration testing and lay out tips for using this type of testing effectively.

What is Integration Testing?

Integration testing is executed to identify bugs in the interfaces and in the interactions between integrated components or systems. Integration testing aims at ensuring that all system modules work together as expected. This testing method is designed to detect errors in the communication of system modules. It involves the entire system being tested not in parts, but as a whole. The two major items tested in an integration test are the interfaces and the data flows between modules. 

This testing method utilizes a systematic approach, but has its drawbacks: Several modules in a group are tested at once, and you can only evaluate the final result of the test, without knowing which of the modules caused the issue. Without the rigorous testing of each component, it’s impossible to know how well the individual modules perform. If the issues detected require further investigation and there are a lot of components involved, retesting may be time-consuming. But without this additional testing, the reliability of the data cannot be guaranteed.

However, if you are testing a relatively small system, these disadvantages are minimized. There are also a few techniques QA practitioners use to make the most out of integration testing.

Approaches and strategies in Integration Testing

There are four main types of integration testing:

  • Top-down
  • Big Bang
  • Sandwich
  • Bottom-up

It is necessary to understand which testing methodology in system integration suits each particular software solution — to save time and resources, and to achieve the most accurate results. Each type of integration testing is intended for differently composed systems.


To assess the functionality of the modules en masse, you must first test the modules separately. When it comes to the
 Top-down method, the main feature is that testing begins with the higher-level components of the software and gradually progresses towards the lower-level ones. This approach is especially advantageous when some system parts have priority over others.

If some system components are still in the works, and it’s impossible to simulate the data flow without them, QA engineers turn to stub and driver functions — dummy programs that act as lower- and higher-level components accordingly.


Unsurprisingly, Bottom-up integrated testing
 is the opposite of the top-down method covered above. The speed of this check depends on the number of lower-level modules, so it makes this method suitable for simple few-level systems. Same as for top-down testing, stubs and drivers take the place of lacking submodules to perform as called and calling programs.

When combined, the top-down and bottom-up approaches become the Sandwich (Hybrid) test integration method. This approach is convenient when it comes to large software projects containing multiple subsystems, but it can be costly for tightly-knit systems with heavy module interdependence.

Next in line is the Big Bang technique, which is optimal in situations where you need to check the entire application with all components interlinked after system development is complete. This approach requires the minimum amount of time for planning and running tests without compromising the accuracy of the results — and this is why it’s also referred to as the “Run-it-and-see” approach among software developers. But there’s a serious drawback — since all modules are already integrated, it’s painstaking to isolate the one containing an issue.

As you might have guessed, every integration testing approach comes with its own set of pros and cons. Below, we’ll go into detail on 7 steps that will help you build a viable top-down testing strategy that works best for you. 

 

7 key points to a top-down integration testing strategy

1. Make sure top-down testing fits your bill

Even when a top-down testing strategy seems to achieve the best possible quality for your product, keep other testing strategies in mind and be ready to utilize them according to your resource allocation, software delivery model, and other factors. This will enable you to set realistic expectations and achieve on-time delivery. 

2. Create a test plan and stick to it

As more and more organizations hop on the bandwagon of continuous delivery (CD), it’s natural to wonder if test plans still make sense. In most cases, they absolutely do, as long as they are kept up-to-date. Keeping test designs fresh will have to become a routine for your QA team to avoid ineffective tests that don’t align with the current objectives of your project.

You will need both a detailed integration test plan and a global plan for your team to adhere to. This helps to avoid confusion and ensure that everyone is on the same page with the testing strategy. Planning documents will serve as go-to resources regarding timelines, focus areas, and approaches. In top-down tests, a detailed test plan will help your team navigate through complex system structures, which in the long run will save you significant effort and reduce your costs.

3. Shift left and test early

Launch testing activities as early as possible in the software development delivery cycle. This will enable you to cut the costs associated with detecting and fixing issues. Also, introducing QA alongside development will positively impact the frequency of releases and lay the foundation for accelerated software delivery.

4. Automate to keep pace with continuous delivery

Integration tests and automation go well together. If you’re already using agile methodologies, you won’t be intimidated by concepts like “test automation,” but you might be leaning towards keeping things manual, due to costs and talent shortage. But you can start small and build up scope and resources over time, investing in automation where the business criticality demands it. 

5. Don't confuse integration tests with unit tests

There’s a clear difference in the expected results: while unit tests reveal issues in the code, failed integration tests point to environment changes that affect the interaction between modules.

Leave business logic inconsistencies to the fast-to-complete unit tests. Spreading your team too thin on recurring integration checks might be wasteful and have unintended consequences for your project deadlines. Instead, target the quality of the code to find and resolve issues in the early stages of development. You can verify complex data flows between modules every other build cycle to save time.

6. Combine various methods of integration testing

Testing goes beyond just checking if the system modules function at all. The end-user experience will be defined by many more external factors than just the source code quality — such as production ecosystems, tools, databases, servers, and others. To validate all of them on both high- and low-level components, you might need to reconsider your approach and run tests to simulate your production environment.

Your project size, engagement model, and methodology can change and evolve, and to continue to succeed, you’ll have to adapt your practices. You should be prepared to combine different testing strategies to arrive at the desired outcome and get a realistic picture.

7. Manage your accuracy expectations

In any case, even with a well-designed, logical strategy for software integration testing in place, it’s still only possible to simulate the work of receiving modules and achieve the most realistic test results. This means that you won’t know if there are any interaction issues in the lower-level modules.

Bottom line

Even though integration testing is a challenge in CI environments, the struggles are worth it. Integration testing is costly — it’s a fact. But it’s also a fact that high-level architecture defects are costly, and not just financially. When the leadership of an organization realizes the reputational value proper software testing possesses, delivering better outcomes is only a matter of planning. 

FAQ

Who is responsible for integration testing?

At different companies, different roles may be responsible for writing and running the integration tests. It all depends on each company’s hiring policy, as well as the engagement model for software delivery and the developer-to-tester ratio in the team. Thus, both the software developer and the systems integration or test engineer can be in charge.

Why is integration testing more complicated than unit testing?

Integration testing is considered to be a complex task because tests are carried out both separately for all modules and collectively for the entire circuit. Unlike in unit testing, where modules are tested in isolation, integration testing activities deal with the interaction between modules. It takes a lot of logical thinking effort to build a test suite capable of covering such scope without missing a detail.

What are the different levels of software testing?

There are many levels of software testing, but here are the four used across most projects:

  • Integration testing
  • System testing
  • Unit testing
  • Acceptance testing

What is the main purpose of integration testing?

The main goal is to identify errors in the interaction between system components at different levels. Integration testing checks if the interaction between system components is compliant with all requirements.

What are the most popular integration testing tools?

Since software testing remains service in high demand, there are numerous tools on the market for every budget, project size, and taste. The most popular, and worth checking out, are FitNesse and Validata ATS.

 

 

You may also like...

Modernizing Legacy Systems: Where do I Start?

Modernizing Legacy Systems: Where do I Start?

4 min By Egor Goryachkin
The 2024 DORA Report: Key Insights for DevOps and Platform Engineering

The 2024 DORA Report: Key Insights for DevOps and Platform Engineering

3 min By Matias Caniglia
What Components Make Up a Future-Proof Data Architecture?

What Components Make Up a Future-Proof Data Architecture?

2 min By Lucas Hendrich
More Insights