0% found this document useful (0 votes)
13 views

Uint 4 Topic 3 Integration Testing

Uploaded by

Rayush Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Uint 4 Topic 3 Integration Testing

Uploaded by

Rayush Jain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Integration Testing

Dr. Rohit Rastogi


Associate Professor,
Computer Science & Engineering Department,
ABES EC, Ghaziabad
Affiliated to Dr. A.P.J. Abdul Kalam Technical University, Uttar
Pradesh, Lucknow
Basic
Integrationtesting is the process of testing the interface
between two software units or modules.

Its focus is on determining the correctness of the interface.

Integrationtesting aims to expose faults in the interaction


between integrated units.

Once all the modules have been unit tested, integration


testing is performed.
Conti…
 Integration testing is second level of software testing process
comes after unit testing.

 Here, units or individual components of software are tested in


a group.

 Focus of integration testing level is to expose defects at time of


interaction between integrated components or units.

 Unittesting uses modules for testing purpose, and these


modules are combined and tested in integration testing.
Conti…
Software is developed with a number of software
modules that are coded by different coders or
programmers.
Goal of integration testing is to check correctness of
communication among all modules.
Conti…
 Tests that do these things aren’t bad. Often they are worth writing, and
they can be written in a unit test harness.

 However, it is important to be able to separate them from true unit


tests so that we can keep a set of tests that we can run fast whenever
we make our changes.

 Integrationtesting, as its name implies, verifies that the interface


between two software units or modules works correctly.

 It
is a broader type of testing that covers connection between 2 or
more moduled and can also in some cases, cover the whole
Conti…
In the end-to-end process of software testing,
Integration Testing will be performed after the Unit
Testing and before System Testing.

It is a very common activity in large organizations, that


are not Independent software vendors (ISVs) which
means that their main business doesn’t involve software
development, to perform integration testing, to ensure
different off-the-shelf softwares can work seamlessly
together, without harming each other’s functionality.
Conti…
Conti…
In integration testing, we ensure that a group of modules
works fine when integrated. Unlike in unit testing, an
individual module is tested in isolation.
◦ Integration testing covers connection between two or more
modules.

◦ It is suitably carried out in large-scale industries with individual


software vendors or ISVs.

◦ Sole purpose of Integration testing is to ensure all modules work


fine without disturbing functionalities of modules that are put
Conti…
Let’s take the previous example of login component.

To ensure that login button is only clickable when some


entries are filled in username and password parameter,
it is considered Integration testing as it relies upon
integrating other components in test.
Conti…
Incompanies, it usually happens that several developers are
working on different components, so it becomes essential to
perform integration testing when all components are
brought under one roof and work co-dependently.

Integration testing is of two types.


Example
Once all components or modules are
working independently, then we need to
check data flow between dependent
modules is known as integration testing.

Let us see one sample example of a


banking application, for amount
transfer.
Conti…
First,we will login as a user P to amount transfer and
send Rs200 amount, confirmation message should be
displayed on screen as amount transfer successfully.

Now logout as P and login as user Q and go to amount


balance page and check for a balance in that account =
Present balance + Received Balance.

Therefore, the integration test is successful.


Conti…
Also,we check if the amount of balance has reduced by
Rs 200 in P user account.

Click on transaction, in P and Q, message should be


displayed regarding data and time of amount transfer.
Integration Testing Techniques
Any testing technique (Blackbox, Whitebox, and
Greybox) can be used for Integration Testing; some are
listed below:
Black Box Testing White Box Testing
 State Transition technique  Data flow testing

 Decision Table Technique  Control Flow Testing

 Boundary Value Analysis  Branch Coverage Testing

 All-pairs Testing  Decision Coverage Testing

 Cause and Effect Graph


 Equivalence Partitioning

Types of Integration Testing
Two types
◦ Incremental integration testing
◦ Non-incremental integration testing
Incremental Approach
In Incremental Approach, modules are added in
ascending order one by one or according to need.

Selected modules must be logically related.

Generally, two or more than two modules are added and


tested to determine correctness of functions.

The process continues until successful testing of all


modules.
Conti…
For example: Suppose we have a Flipkart application, we
will perform incremental integration testing, and flow of
application would like this:
Flipkart→Login→Home→Search→Addcart→Payment →
Logout

Incremental integration testing is carried out by further


methods:
◦ Top-Down approach
◦ Bottom-Up approach
Non- incremental integration testing
We apply this method, when data flow is very complex
and when it is difficult to find who is a parent and who
is a child.

And in such case, we will create data in any module


bang on all other existing modules and check if the data
is present.

Hence, it is also known as the Big bang method.


Conti…
Big Bang Method
In this approach, testing is done via integration of all
modules at once.
It is convenient for small software systems, if used for
large software systems identification of defects is difficult.
Since this testing can be done after completion of all
modules due to that testing team has less time for
execution of this process so that internally linked
interfaces and high-risk critical modules can be missed
easily.
Example of Integration testing
Let us assume a Gmail application where we perform
integration testing.

First,we will do functional testing on the login page,


which includes various components such as username,
password, submit, and cancel button. Then only we can
perform integration testing.

The different integration scenarios are as:


Conti…
Conti…
Scenarios1:
◦ First, we login as P users and click on the Compose mail and
performing functional testing for specific components.

◦ Now we click on Send and also check for Save Drafts.

◦ After that, we send a mail to Q and verify in Send Items folder


of P to check if send mail is there.

◦ Now, we will log out as P and login as Q and move


to Inbox and verify that if mail has reached.
Conti…
Secanrios2:
◦ We also perform integration testing on Spam folders. If
particular contact has been marked as spam, then any mail
sent by that user should go to spam folder and not in inbox.

As we can see in below image, we will perform functional


testing for all text fields and every feature.

Then we will perform integration testing for related functions.


We first test add user, list of users, delete user, edit user, and
then search user.
Conti…
Conti…
Note:
◦ There are some features, we might be performing
only functional testing, and there are some features where we
are performing both functional and integration testing based
on feature's requirements.

◦ Prioritizing is essential, and we should perform it at all phases,


which means we will open application and select which
feature needs to be tested first.

◦ Then go to that feature and choose which component must be


Conti…
Note:
◦ Go to those components and determine what values to be
entered first. And don't apply 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 two features, we must be performing only positive


integrating testing or both positive and negative
integration testing, and this also depends on features need.
Advantages of Integration Testing
Integration testing offers a systematic procedure to set
up your software by identifying all the errors associated
with different levels of software.
It catches all the errors when several modules are
working together.
It broadens the coverage of tests performed in the
software, making the product more reliable.
It can be used in early as well as at the later stage of
development; however, for more testing coverage, it is
preferred in the later stages.
Disadvantages of Integration Testing
Several additional efforts are required such as properly
creating stubs and drivers, without which it may result
in inadequate testing.

It is very difficult to perform integration testing. The


complexity while performing integration testing is fairly
high compared to system testing.

Identifying and testing every connection between the


modules is not very handy.
Unit v/s Integration Testing
Unit Testing Integration Testing

In unit testing, each module of the software is In integration testing, all modules of the
tested separately. software are tested combined.

In unit testing tester knows the internal design Integration testing doesn’t know the internal
of the software. design of the software.

Unit testing is performed first of all testing Integration testing is performed after unit
processes. testing and before system testing.

Unit testing is white box testing. Integration testing is black box testing.

Unit testing is performed by the developer. Integration testing is performed by the tester.
Conti…
Unit Testing Integration Testing

Detection of defects in integration testing is


Detection of defects in unit testing is easy.
difficult.

It tests parts of the project without waiting for


It tests only after the completion of all parts.
others to be completed.

Unit testing is less costly. Integration testing is more costly.

Unit testing is responsible to observe only the Error detection takes place when modules are
functionality of the individual units. integrated to create an overall system.

Module specification is done initially. Interface specification is done initially.


Conti…
Unit Testing Integration Testing

The proper working of your code with the The proper working of your code with the
external dependencies is not ensured by unit external dependencies is ensured by integration
testing. testing.

Maintenance is cost effective. Maintenance is expensive.

Its speed is slow because of the integration of


Fast execution as compared to integration testing.
modules.

Unit testing results in in-depth exposure to the Integration testing results in the integration
code. structure’s detailed visibility.
Conti…
Unit Testing Integration Testing

It tests small modules or a piece of code of an application or a product Two or more units of a program are combined and tested as a group

It's a quick write-and-run test It is slower to run

Typically performed by a software developer It is traditionally carried out by a separate team of testers

It can be performed at any time It is usually carried out after Unit Testing but before the overall system testing

It has very low maintenance It has very high maintenance

It has very limited in scope, as it only covers a piece of code It has wider scope as it covers broader part of the application or the product

It focus on one single module It pays attention to integration among two or more modules

Finding errors is relatively easy Finding errors is more difficult

Test executor knows the internal design of the software Testers don't know the internal design of the software

It is white box testing It is a black box testing


Conti…
Unit Testing Integration Testing

It tests the individual component of the entire system at a time. It tests the system when components are integrated to work
together.

It is faster in execution as only a single component is tested. It is slower in execution as multiple components at a time are
tested.

It does not rely upon interacting with external dependencies. It relies upon talking with outside dependencies.

It is conducted during the early development phase. Therefore, it It is conducted after the development. Therefore it is tested by a
is tested by a developer. tester.

Maintaining unit tests is fairly cheap. It is costly to conduct and maintain Integration testing.

It identifies issues and bugs that lie within the component only. It identifies all the errors that may lie when multiple components
are under test.

It can be performed in the beginning phase of the development It is only carried out after unit testing and before system testing.
and then carried out anytime.

You might also like