What is Incremental Testing in Software Testing

OVERVIEW

Incremental testing is an approach used during the testing phase of integration tests. It uses a number of stubs and drivers to test each module independently. This helps identify any errors or defects in the modules

Following the completion of unit testing, integration testing is performed in order to detect the interfaces and interactions between different modules. As the integration process continues, a variety of methods and technologies are used, one of which is incremental testing. In this approach, developers sum up each module one by one using stubs or drivers.

What is Incremental Testing?

As a developer, once you complete unit testing, you will need to perform integration testing. This process verifies how interfaces perform and how different modules interact. When you integrate, developers make use of tons of techniques. One among them is known as the incremental approach.

When you perform incremental integration testing, you can integrate different modules with the help of drivers or stubs to fix the bugs.

Why is incremental testing important?

Incremental testing has its own set of advantages when you want to test a variety of elements. This is why you need incremental testing:

  • To ensure that different modules' functioning is quite successful after it has been integrated.
  • Through this method, you can quickly identify all the defects before passing each phase. This would let every developer get an edge in identifying the core cause of the problem.
  • You can fix issues without requiring much rework and reducing software testing life cycle costs.

When should you use Incremental Testing?

Every software testing company would hire their employees after checking if they have the right skills and knowledge in their niche and domain. All these qualified professionals know how different testing types work. Be it reliability testing, penetration testing, installation testing or exploratory testing, the specialist has the capability to perform website testing on a high-end basis.

When a tester has to perform integration testing, he will find incremental testing as a boon. The major reason for this to happen is that both integration testing and incremental testing are the same way. When we perform incremental testing, we verify the system's elements separately. This way, the testing specialist can achieve faster and better results to support the developers.

Do you want to learn more about exploratory testing? Here is a video:

Subscribe to our LambdaTest YouTube Channel to get the latest updates on tutorials around smoke testing, software quality, responsive design, and more.


...

Incremental Testing Methodologies

Before we discuss in detail about incremental testing, we need to know about stubs and drivers. They are nothing but the dummy or pseudo code we use in component testing or integration testing. We use them when one or more than one modules are under development, but you need to test another module.

We use stubs in the top-down test strategy. We can also address them as “called programs.” Through stubs, you can simulate different interfaces between the underdeveloped lower lever module.

On the other hand, we use drivers in the bottom-up testing approach. They are also called “calling programs.” Drivers can simulate the interface between different top-level modules which might not be available or are still under development.

Many of us might have a question needing an answer:

  • Why use a stub or driver before we test?
  • Why don’t we wait until we develop every application module?

The best thing to note is that developers would have to sit idle until every module is developed. This would also make it challenging to analyze the root cause of the defect. To prevent that from happening, we make use of stubs and drivers.

Let’s take a look at different Incremental Testing methodologies:

Top Down methodology

As evident from the name, you can perform code-based testing from top to bottom. It happens right from the central module and ends at the sub-module. This method first tests the modules from the top application layer. Generally, we involve the structural flow of the application under testing when we use this approach. We can substitute unavailable or underdeveloped components or modules with stubs. This testing type, where you can integrate and test every module at the layer-side first, is called “breadth-first”.

Top Down methodology

Here is an example:

  • Module L: Login to the website.
  • Module O: Order what you want
    • Module Order Summary/ OS (Yet to be developed)
  • Module P: Payment to be made
    • Module Payment-by-cash/ PC
    • Module Debit Card/Credit Card Payment aka DP (Yet to be developed)
    • Module E-Payment/ EP (Yet to be developed)
  • Module R: Reporting (Yet to be developed)

For top-down Incremental Integration testing approach, these will be the delivered test cases:

  • Test Case 1: Integrate and test Module L and Module O
  • Test Case 2: Integrate and test Module L, O, and P
  • Test Case 3: Integrate and test Module L, O, P, and R

And so on other test cases are derived.

The next category would be “depth-first”.

You can derive the following test cases for “depth-first”:

  • Test Case 1: Integrate and test Module L and Module O.
  • Test Case 2: Integrate and test Module L, O, and OS.
  • Test Case 3: Integrate and test Module L, O, OS, and P.
  • Test Case 4: Integrate and test Module L, O, OS, P, and CP.

You can similarly derive other test cases.

Why should you use Top-down Methodology?

With top-down methodology, you get to access early architecture defects easily. This can teach you how an application would work in its early stages. Through this, you can easily identify any design defects. You can also test the main control points as early as possible.

Disadvantages of Top-down Methodology

Through this method, you can test the significant modules later in the cycle. It’s quite hard to write different test environment conditions. You cannot call a stub a perfect implementation of modules related to each other. It would simulate only the data flow happening between two modules.

Bottom Up methodology

Through this approach, you can understand that testing would take place from bottom to top. You can integrate and test the modules from the bottom layer first, and after that, you can sequentially integrate other modules as you keep moving up. You can replace underdeveloped or unavailable modules with drivers.

Here is an example to help you understand better:

Modules of healthy food, fruits, vegetables, citrus fruits, oranges, and lemons are under development. Hence we can substitute them with related Drivers:

Bottom Up methodology

For the bottom-up Incremental Integration testing approach, the following test cases will be derived:

  • Test Case 1: Conduct Unit testing for the Modules Orange and Lemon.
  • Test Case 2: Integrate and test Modules Citrus fruits-Orange-Lemon.
  • Test Case 3: Integrate and test Modules Fruits-Citrus fruits-Orange-Lemon.
  • Test Case 4: Conduct Unit testing for Module Vegetables.
  • Test Case 5: Integrate and test Modules Healthy food-Vegetables-Fruits-Citrus fruits-Orange-Lemon.

Why should you use the Bottom-up Methodology?

We can use this method for applications with a bottom-up design model. You can easily create different test conditions using a bottom-up approach. When you start testing right from the testing hierarchy’s bottom level, it means you can test critical functionality or modules quite early. This way, you can easily identify any errors and bugs. You can also detect any defects in the interface early.

Disadvantages of Bottom-up Methodology

  • It’s quite hard to write Drivers compared to a stub.
  • You can catch the Design defects later on.
  • There is no working application until you build the last module.
  • We cannot call a Driver a complete implementation of any related Module. It’s just a way to simulate the data flow between two different modules.

Sandwich Testing methodology

Sandwich testing approach is a hybrid method of both top-down and bottom-up methodologies. We use stubs and drivers to manage underdeveloped or incomplete modules.

How do you perform Sandwich testing?

  • We identify a middle layer from which you perform top-down and bottom-up testing. We call the middle layer the target layer.
  • We then identify the target layer through a heuristic approach. Through this approach, you can choose a layer allowing minimal usage of drivers and stubs.
  • We can then start the top-down testing from the middle layer. Once we are done, we can move downwards towards different lower-level modules.
  • We call this layer present below the middle layer the Bottom layer.
  • We can also start the Bottom-up testing from the middle layer and move right towards the topmost layer modules. We call this layer above the middle layer the Top layer.
  • When you use stubs and drivers, you perform UI testing and functionality testing of different low-level modules, respectively.
  • Finally, we only have the middle layer left when we want to execute the final test.

Here is an example:

Sandwich Testing methodology

The following test cases can be derived with Sandwich Testing Strategy:

  • Test Case 1: Test A, E, F, and G on an individual basis – where Test A would come right under the Top layer test. You can also find Tests E, F, and G under the Bottom layer tests.
  • Test Case 2: Test A, B, C, and D.
  • Test Case 3: Test B, E, and F.
  • Test Case 4: Test Hand F.
  • Test Case 5: Test A, B, C, D, E, F, and G.

Why should you choose Sandwich Testing Methodology?

Whenever you carry out a big project with plenty of sub-projects, this method is beneficial. You can also run top-down and bottom-up testing methodologies parallely.

Disadvantages of Sandwich Testing Methodology

  • We don’t get a chance to test interfaces and subsystems thoroughly before unifying the modules.
  • The costs are higher since both top-down and bottom-up testing methodologies are involved
  • We don’t advise this testing type for a system with highly interdependent modules.

Points to remember when you perform incremental testing

It’s not rocket science to perform incremental testing for any well-experienced tester. These pointers can help you out when you perform incremental testing:

  • It might be a bit difficult if you want to find and fix those defects in every integrated component. To get that done, you can easily perform Incremental integration tests.
  • As soon as the development starts, you can fetch and fix those bugs as you perform incremental integration testing.
  • The incremental tests are quite faster in comparison to the end to end testing process.
  • You can easily find any existing system issues, such as corrupted database schema, cache integration, etc.
  • You can easily reduce software failure with incremental integration tests.
  • With this testing, you can easily check for any existing structural changes when a user shifts directly from one module to another.
  • You can fix those issues in the integrated modules when you want to reduce the bug count.
  • When you perform incremental integrated testing, it’s possible to cover a number of modules. This paves the way for much better testing capabilities.
  • For greater browser coverage, always use cloud testing platforms like LambdaTest to test your websites and apps on a scalable online browser farm and online browser farm device farm of 3000+ real browsers, devices, and operating systems.

It has a simple onboarding process to perform mobile app and web testing using automated testing tools like Selenium, Cypress, Playwright, Puppeteer, Appium, Espresso, etc.

Developers and testers can also harness LambdaTest’s HyperExecute - an end-to-end test orchestration cloud to run automated test suites at a blazing speed of up to 70% more than any other conventional cloud grids.

Conclusion

With incremental testing, you can quickly achieve the results you wish to accomplish from integrated tests. It’s always better to involve the right team to derive the best results. Integration testing, combined with incremental testing, provides developers and testers with the results they always aim for. The best development team, combined with the best test execution platform, can make this happen.

Frequently Asked Questions (FAQs)

What are 2 types of incremental integration testing?

The two types of incremental integration testing are horizontal and vertical incremental testing.

What is incremental and non-incremental integration testing?

When the relationship between different modules isn’t as obvious as it should be, we bring in big bang integration or non-incremental integration testing. With this testing, we create the data in a single module. We then combine it with different modules to test and check the data flow between them.

What are the two categories of incremental integration?

The two categories of incremental integration are Top-down incremental integration and Bottom-up incremental integration.

Author's Profile

...

Amrita Angappa

Amrita is an Ex employee at LambdaTest. She loves to explore the latest trends in emerging technologies, and deep dive into tech research. Travel, Food, Books...These are the nectars of her life. She is a staunch bibliophile lost somewhere in the world of muggles.

Hubs: 05

  • Twitter
  • Linkedin

Reviewer's Profile

...

Shahzeb Hoda

Shahzeb currently holds the position of Senior Product Marketing Manager at LambdaTest and brings a wealth of experience spanning over a decade in Quality Engineering, Security, and E-Learning domains. Over the course of his 3-year tenure at LambdaTest, he actively contributes to the review process of blogs, learning hubs, and product updates. With a Master's degree (M.Tech) in Computer Science and a seasoned expert in the technology domain, he possesses extensive knowledge spanning diverse areas of web development and software testing, including automation testing, DevOps, continuous testing, and beyond.

  • Twitter
  • Linkedin

Did you find this page helpful?

Helpful

NotHelpful