What is integration testing and what types of testing are there?

Essential to guarantee the performance of a software, automated integration testing identifies failures, errors and bugs during the development of a system. 

Imagine that you need to develop a website for an e-commerce. The company that hired the service has its own product database and needs that bank to talk to the site. For this to be possible, the integration between the database and the website systems is carried out and, before it is completed, tests are carried out to see if they talk to each other and do not present a problem. 

That is, integration testing serves to increase the security and efficiency of an application before project completion. 

This saves time, money and, of course, increases customer reliability. However, did you know that there are different types of tests?

In today's content, we'll talk about integration testing, its importance and its different types. The idea is to help you expand your knowledge of web development in a simple and objective way

What is Integration Testing?

Integration testing is when modules (code units) are group tested to ensure that there is no break in what has been done as a unit and what is being integrated together.

The ideal scenario is that unit testing is done first and then integration testing is done to understand if the modules will work together. 

Returning to the e-commerce example, imagine that the programmer developed the product page interface and needs to pull a specific product from the company's database. The website has a module and the database another. Integration testing enters this scenario as the method to verify that the two modules can present the product page together without fail. 

Integration testing is more complex than unit testing, which is for testing a small unit of system code, which can be a function or a method. As it focuses on simpler and faster testing, unit testing is not enough, requiring integration testing to be done to ensure full project functionality. 

Integration Test 

Integration testing is a systematic activity that aims to verify the construction of the structure of the software being developed and its communication between modules. 

Imagining e-commerce again, if the website module cannot pull the information from the database module, in the integration test it is possible to check the problem and correct it before the website goes live, minimizing the possibility of failures. 

Description of strategies 

Before carrying it out, it is essential to draw up a plan and determine your strategies. Thus, it is possible to analyze combinations between test conditions and define the expected result.

 

Among some of the elements that should be considered when describing strategies are: objectives; what will be done in each of the steps; schedule; responsible professional; standard for defect reporting, indication of the most important areas of the software being developed, as well as metrics, what will or will not be automated and, of course, the final report.

 

Now that you know what integration testing is, find out what types of approaches are:

Bottom-Up Tests

In it, infrastructure components are integrated and then functional components are added. In this approach, systems integration starts from the lowest level of the software, that is, the module. However, to integrate this set of modules it is necessary to create a driver, a control program that coordinates the input and output for each cluster (modules that perform a sub-function of the system).

 

Among the advantages of performing this technique are early verification of low-level behavior; stubs are not needed, it is simpler to formulate input data for some subtrees and also easier to understand output data.

Top-Down Tests

In the Top-Down approach, the integration is started from the first module to the last in the hierarchy (from top to bottom). In it, the skeleton of the system is developed, filling it with components. This test can be done in two ways: by depth or by width.

 

Depending on the approach chosen, the pseudo controllers are replaced, one at a time, by their real components. Tests are conducted as each component is integrated, and at the end of each test set, another pseudo controller is replaced by its real component. In this approach, the advantage is that you can test the main functions of the software right from the start.

Sandwich tests

In this approach, the system is integrated with a mix of the Top-down and Bottom-up technique, dividing it into three layers: logic – layer formed by the modules that are most frequently called. Here, the Bottom-up technique is used; middle (middle) – are the remaining modules; and the operational one, which is formed by the main modules, from an operational point of view, being tested using the Top-down technique.

 

Big Bang Tests

When using this technique, modules are tested separately and then integrated all at once. However, to perform the integration using Big-bang testing you need stubs and drivers to test the modules in isolation.

 

Widely used to demonstrate a minimum system operability, the biggest disadvantage of this approach is that if there is an error in the interface of one module with another, the reason will be more difficult to be found, since it is a non-incremental approach.

 

In the incremental approach, tests are done stepwise on classes. Classes are tested one by one against each other, making it easier to find possible errors in isolation, unlike the Big Bang

Enjoyed this article? Stay informed by joining our newsletter!

Comments

You must be logged in to post a comment.

About Author