Blog to understand automation concepts in QTP, Selenium Webdriver and Manual Testing concepts

Understanding Integration Testing with example

In this article we will discuss on integration testing. Stage two in testing after component testing. We start integration testing once the individual components are tested and it is the time to validate if they fit in with each other.

Best example to understand importance of integration testing is the jigsaw puzzle, and you will know the importance far better, if you put in lot of effort in solving the puzzle and due to few incorrect pieces, you failed to complete the picture.

The small pieces of jigsaw puzzle can be considered as the module or component. When all the pieces in the puzzles fit in together perfectly, it creates the image. In software terms, it can be considered as the software system. Integration of different modules is important to fit in the pieces together. Below diagram shows the flow in testing as discussed in above explanation.





So now we have the basic knowledge of Integration testing. Let us discuss on the different standard approach for the Integration testing. Below are the different approaches for integration testing and will try to explain the same in plain language.

  • Top down Approach – In this approach, the top modules is tested and integrated first. When we say the top modules are tested first. Two questions come in mind immediately.
    • How to test the top module when the individual modules that will be integrated to form the top module are not developed yet?

      • Answer to this, we use stubs for flow of data from top level to bottom level modules. Stubs acts as simulator to simulate behavior of lower level module which are not developed or integrated as yet. Expected Output from stub is the same as expected in case module would have been developed and integrated.

    • What is the purpose of integration testing using top down approach? 

      • Answer:  Using Top down approach allows high level logic and data flow to be tested early in the testing process. Testing the top module earlier helps to flow the logic from system to sub-module so that end result is in focus and information flow from top level to bottom.

 
  • Bottom up Approach –If we represent Bottom up and top down approach in a pictorial representation, Bottom up approach is just reverse of Top down approach. In this approach, we test the bottom modules first and move to the top modules. Till the time top modules are ready, we use driver to simulate the system flow.
  • Big Bang Approach – In this all the sub-modules are developed first and are integrated once all the module are developed instead of incremental approach as in above examples. Big Bang Approach can be used in case of smaller system. In Large system, the big bang approach probability of failing is very high.

We have discussed on what is integration testing, types of approaches in integration testing. Let us now summarize on integration testing.
  • What is integration testing –Testing Integrating and Interaction of different modules or Interfaces in the system.
  • Who Performs integration tests – Integration testing should be performed by developers before releasing the system to QA. Testers should also test the interaction between subsystems.
  • Bottom up and top down are example of incremental approach to integration testing.

Are there any references for further study? While studying for integration testing and advanced concept on same. I find following two articles interesting. Please read through for further details on the topic


No comments:

Post a Comment