Flutterexperts

Empowering Vision with FlutterExperts' Expertise
Integration Testing For Testers In Flutter

Hi everyone! today we start learning about Integration testing in a flutter, It is the phase in software testing in which individual software modules are combined and tested as a group. Integration testing is conducted to evaluate the compliance of a system or component with specified functional requirements. It occurs after unit testing and before system testing.

If you’re looking for the best Flutter app development company for your mobile application then feel free to contact us at — support@flutterdevs.com.


Table Of Contents::

What is Integration Testing?

Why do Integration Testing?

Example of Integration Testing

Types of Integration Testing

Sandwich Testing

How to do Integration Testing?

Brief Description of Integration Test Plans

Entry and Exit Criteria of Integration Testing

Conclusion


What is Integration Testing?:

INTEGRATION TESTING is defined as a type of testing where software modules are integrated logically and tested as a group. A typical software project consists of multiple software modules, coded by different programmers. The purpose of this level of testing is to expose defects in the interaction between these software modules when they are integrated

Integration Testing focuses on checking data communication amongst these modules. Hence it is also termed as ‘I & T’ (Integration and Testing), ‘String Testing’, and sometimes ‘Thread Testing’.

Why do Integration Testing?:

Although each software module is unit tested, defects still exist for various reasons like

  • A Module, in general, is designed by an individual software developer whose understanding and programming logic may differ from other programmers. Integration Testing becomes necessary to verify the software modules work in unity
  • At the time of module development, there are wide chances of change in requirements by the clients. These new requirements may not be unit tested and hence system integration Testing becomes necessary.
  • Interfaces of the software modules with the database could be erroneous
  • External Hardware interfaces, if any, could be erroneous
  • Inadequate exception handling could cause issues.

Example of Integration Testing:

Let us assume that we have a Gmail application where we perform the integration testing.

First, we will do functional testing on the login page, which includes the various components such as username, password, submit, and cancel buttons. Then only we can perform integration testing.

The different integration scenarios are as follows:

> Scenarios1:

  • First, we log in as P users and click on the Compose mail, and perform the functional testing for the specific components.
  • Now we click on the Send and also check for Save Drafts.
  • After that, we send a mail to Q and verify in the Sent Items folder of P to check if the send mail is there.
  • Now, we will log out as P and login as Q and move to the Inbox, and verify if the mail has reached.

> Secanrios2: We also perform the integration testing on Spam folders. If the particular contact has been marked as spam, then any mail sent by that user should go to the spam folder and not in the inbox.

Note: We will perform functional testing for all features, such as to send items, inbox, and so on.

As we can see in the below image, we will perform functional testing for all the text fields and every feature. Then we will perform integration testing for the related functions. We first test the add user, list of users, delete user, edit user, and then search user.

Note:

  • There are some features, we might be performing only the functional testing, and there are some features where we are performing both functional and integration testing based on the feature’s requirements.
  • Prioritizing is essential, and we should perform it at all the phases, which means we will open the application and select which feature needs to be tested first. Then go to that feature and choose which component must be tested first. Go to those components and determine what values to be entered first.
    And don’t apply the same rule everywhere because testing logic varies from feature to feature.
  • While performing testing, we should test one feature entirely and then only proceed to another function.
  • Among the two features, we must be performing only positive integrating testing or both positive and negative integration testing, and this also depends on the features needed.

Types of Integration Testing:

Integration testing can be classified into two parts:

  • Incremental integration testing
  • Non-incremental integration testing

> Incremental Testing:

In the Incremental Testing approach, testing is done by integrating two or more modules that are logically related to each other and then testing for the proper functioning of the application. Then the other related modules are integrated incrementally and the process continues until all the logically related modules are integrated and tested successfully.

1) Bottom-up Integration Testing: It is a strategy in which the lower-level modules are tested first. These tested modules are then further used to facilitate the testing of higher-level modules. The process continues until all modules at the top level are tested. Once the lower-level modules are tested and integrated, then the next level of modules is formed.

Diagrammatic Representation:

Advantages:

  • Fault localization is easier.
  • No time is wasted waiting for all modules to be developed unlike the Big-bang approach

Disadvantages:

  • Critical modules (at the top level of software architecture) which control the flow of applications are tested last and may be prone to defects.
  • An early prototype is not possible

2) Top-down Integration Testing: It is a method in which integration testing takes place from top to bottom following the control flow of the software system. The higher-level modules are tested first and then lower-level modules are tested and integrated to check the software functionality. Stubs are used for testing if some modules are not ready.

Diagrammatic Representation:

Advantages:

  • Fault Localization is easier.
  • Possibility to obtain an early prototype.
  • Critical Modules are tested on priority; major design flaws could be found and fixed first.

Disadvantages:

  • Needs many Stubs.
  • Modules at a lower level are tested inadequately.

Sandwich Testing:

Sandwich Testing is a strategy in which top-level modules are tested with lower-level modules at the same time lower modules are integrated with top modules and tested as a system. It is a combination of Top-down and Bottom-up approaches therefore it is called Hybrid Integration Testing. It makes use of both stubs as well as drivers.

How to do Integration Testing?:

The Integration test procedure irrespective of the Software testing strategies (discussed above):

  1. Prepare the Integration Tests Plan
  2. Design the Test Scenarios, Cases, and Scripts.
  3. Executing the test Cases followed by reporting the defects.
  4. Tracking & re-testing the defects.
  5. Steps 3 and 4 are repeated until the completion of Integration is successful.

Brief Description of Integration Test Plans:

It includes the following attributes:

  • Methods/Approaches to testing (as discussed above).
  • Scopes and Out of Scopes Items of Integration Testing.
  • Roles and Responsibilities.
  • Pre-requisites for Integration testing.
  • Testing environment.
  • Risk and Mitigation Plans.

Entry and Exit Criteria of Integration Testing:

Entry and Exit Criteria to Integration testing phase in any software development model

Entry Criteria:

  • Unit Tested Components/Modules
  • All High prioritized bugs were fixed and closed
  • All Modules to be code completed and integrated successfully.
  • Integration tests Plan, test case, scenarios to be signed off and documented.
  • Required Test Environment to be set up for Integration testing

Exit Criteria:

  • Successful Testing of Integrated Application.
  • Executed Test Cases are documented
  • All High prioritized bugs were fixed and closed
  • Technical documents to be submitted followed by release Notes.

Conclusion

This is all about Integration testing and its implementation in both the White box and Black box techniques. Hope we explained it clearly with relevant examples.

Test Integration is an important part of the testing cycle as it makes it easier to find the defect when two or more modules are integrated to integrate all the modules all together in the first step itself.

It helps in finding the defects at an early stage which in turn saves the effort and cost as well. It ensures that the integrated modules work properly as expected.

❤ ❤ Thanks for reading this article ❤❤

If I got something wrong? Let me know in the comments. I would love to improve.

Clap 👏 If this article helps you.


Feel free to connect with us:
And read more articles from FlutterDevs.com.

FlutterDevs team of Flutter developers to build high-quality and functionally-rich apps. Hire a flutter developer for your cross-platform Flutter mobile app project on an hourly or full-time basis as per your requirement! You can connect with us on Facebook, GitHub, Twitter, and LinkedIn for any flutter-related queries.

We welcome feedback and hope that you share what you’re working on using #FlutterDevs. We truly enjoy seeing how you use Flutter to build beautiful, interactive web experiences.


Leave comment

Your email address will not be published. Required fields are marked with *.