Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Integration Testing | Functional Testing
Introduction to Manual Testing & QA in Web Development
course content

Conteúdo do Curso

Introduction to Manual Testing & QA in Web Development

Introduction to Manual Testing & QA in Web Development

1. Introduction to Software Testing & QA
2. Software Testing in Practice
3. Functional Testing
4. Non-Functional Testing

bookIntegration Testing

Introduction

Integration Testing is a broad concept, however we will try to cover all the important aspects of integration testing in this chapter.

Integration Testing is a testing method categorized under Functional Testing. Integration Testing is a broad concept, and has many different types.

In Integration Testing, individual units or modules of the software are combined together and tested, to make sure that they work together correctly without any issues in their interaction.

This is why Integration Testing is usually performed after Unit Testing. An example of Integration Testing would be checking if a user can correctly login to their account after inputting correct credentials. We have performed many similar tests in the last section. Most-if not all-those which we performed in the last section fall under the category of integration testing.

In our chat application, the login / registration system is built using multiple units. The front-end of the app which includes the login or registration form, the fields and buttons, represents a separate module, while the backend of the application, for-example the database which stores the user information represents a different module. These two modules interact together to form the login / registration system.

Updates in our Application

Some updates have been made to the chat application. Following is a summary of the updates:

  • The users can no longer send empty messages into the chat.
  • The chat history is saved into the database and displayed to the users.

Types of Integration Testing

We will perform some integration tests on this newer version of the application. However, before that, we need to look at different types of Integration Testing.

  • Big Bang Testing: In this type of testing, all the modules are combined together and tested at once.
  • Top-Down Testing: In this type of testing, the higher level components are tested first and then the lower level components are tested later. This approach helps in finding errors or problems with the higher level or user - end features in the early stage of testing.
  • Bottom-Up Testing: In this approach to testing, the lower level components, or the components which are behind the abstraction of the user's end are tested before the higher level components. The lower level components are easier to test since they are more stable, are are closer to the functional code of the application.
  • Sandwich Integration Testing: This approach combines both Top-Down and Bottom-Up approaches. In this approach to testing, the tests are started from both lowest and highest level components or modules simultaneously.
  • Incremental Testing: In this approach, the application is tested as new modules are added. Each increment is tested thoroughly before moving on to the next.

The type of approach that we should use in our testing depends upon the structure of our application and most importantly how the development process is progressing.

For-example, if we have all the modules progressing at the same rate or ready at the same time then Big-Bang Testing is the most suitable since we can test all the modules at the same time.

If the modules are being worked up from a low level, then Bottom-Up approach is the most suitable, and if the high level modules are ready before the lower level modules have been completed then the Top-Down approach is better. If there is no particular order in how the modules are being worked on, then incremental testing is suitable. Since sandwich testing combines both top-down and bottom-up approaches, therefore, it is suitable when the development is progressing from both low level and high level at the same time.

In our application, we have the high level module (User Interface) and low level module (Database) both partially completed at the same time, and it's missing a Mid-level module, which is the API that we had planned in the beginning. Though the UI and the database can work without the API, and therefore, these two modules can work together and hence can be tested together. Therefore, in our case, the most suitable form of integration test would be Sandwich Integration Testing.

The first step towards writing test cases is to identify the requirements of the application. Sometimes there are technical requirements or constraints which are important if the application is developed in a certain manner. For-example, our chat application's database can store a username which has up to 36 characters. We can know that if we look at the code, however, in some cases the tester doesn't have access or knowledge of the code. In such cases the tester can use the defined project requirements or constraints in case they are given.

Requirements for the Registration Functionality:

  • The username cannot be more than 36 characters.
  • The username cannot contain special characters other than ! @ # $ % ^ & * ( ) _ - + = { } [ ] : . ? /.
  • The password cannot contain special characters other than ! @ # $ % ^ & * ( ) _ - + = { } [ ] : . ? /.
  • The password should be at least 8 characters in length.

Requirements for the Chat Functionality:

  • The chat messages should be sent to other users in real time.
  • The application should save the chat history.
  • The application should display the saved chat history in the chat box.
  • The chatbox should scroll to the bottom of the chat automatically in case of content overflow.

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
some-alt