16 Integration Testing
16 Integration Testing
Integration Testing
and
Integration Methodologies
Software Testing
(STE -22518)
CO 5 I
Revision
V Model
Methods of testing :
Static, Dynamic
White Box, Black Box
Levels of Testing
Modular Software Architecture
Calling Functions, Called Functions
What is Unit ?
What is Unit Testing ?
How to design test cases for unit testing ?
Business Acceptance
Requirements Testing
System System
BRS Testing
Requirements
Quality
Verifies non functional
test requirements are
Ensures all functional satisfied
and non functional System
T testing
E requirements after
Function Verifies that functional
S system integration test requirements are
T satisfied
I Ensures that all
N components work Integration
G
together on integration testing
Logical
Organization of
testing.
Ensure that each ( Not necessarily
Unit Unit Unit
component works test test test how it‟s actually
as specified done! )
Code
Starts with Small Nishad Code
D Patel, Code Dhule
S.S.V.P.S's B. S. Deore Polytechnic, 4
EXAMPLE
Consider a following software architecture
Software is divided into
Modules modules
But …. Module is not an
isolated entity
Module under consideration
might be –
Calling other module
Getting Input from called
module
Being called by another
module
giving feedback to calling
module
Module is not independent
Sub Programs (Units) of
Can not be tested in
“Sort Numbers” module
isolation
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule 6
Unit
Unit Testing
Unit Testing
Unit Testing
The most „micro‟ scale of Testing
Each unit –
is tested in isolation / separately / independently
Objective :
To ensures that every unit is working according to the user
requirements (functional requirement)
To ensure that software meets baseline level of functionality prior
to integration and system testing
It is the first piece of system to be validated
Unit Testing is performed by Programmer
A tester can help.
Unit Testing
Requires detailed knowledge of
Specification
the internal program design and
code
Not to be confused with debugging.
Also known as component, module, or program testing
Integration testing
System is made up of multiple modules
Comprise of – software and hardware
Integration testing involves –
1. Integration of Units to make a module
2. Integration of Modules to make a system
3. Integration of System with environmental components like –
hardware, other third party software, networking etc.
Such components are – varying in nature
Starts at module level –
when two independently tested units are available
Ends at System level –
when all module interfaces have been tested
Final round of integration –
Involves all components integrated together to form a system
Called as Final Integration Testing or System Integration 20
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule
Modules
Called by
Calling Main
Module Program
Called Calling
Modules
Module
Called
Modules
Interaction among
modules is complicated.
Data may be lost during
interaction.
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule 22
Integration Testing
It mainly focuses on –
Input / output protocols
Parameter passing between different units / modules or system
Architecture, construction of software
Integration – is defined as –
Set of interactions among components
Integration testing – can be defined as
Testing the interaction between the modules and
Testing the interaction with other system externally
Main objective – to test the interfaces between
different modules / systems
Thus integration testing is a testing of Interfaces
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule 23
Types of Interfaces
Internal Interfaces –
Provides communication across two modules within a product
Communication is Internal to the product
External Interfaces –
Communication with components that are outside of the product
For e.g. Components / products developed by Third party vendors,
solution providers
For Integration Testing –
knowledge of design, architecture, and usage is required
Interfaces are
very generic in nature
Not limited to a specific application or language
Some of the interfaces are explicit
Are documented (e.g. in SRS, HLD)
Some of the interfaces are implicit
Some may not be documented.
But known to developers, testers (for e.g. JDBC)
This results in increase of permutations and combinations
of scenarios of usage of interfaces
Thus complexity of interface testing also increases
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule 26
Integration Methodologies
Methodologies –
Decides the order for integration testing
i.e. – in what order interfaces need to be – integrated and then
tested
These are –
1. Top – Down Integration
2. Bottom – Up Integration
3. Bi – Directional Integration
4. System Integration
Call Graph
Based
Bi Directional
Integration
(Sandwich)
Integration testing
Starts from – topmost module
Ends at – bottom most module
Integration starts – with testing the interface between
component 1 and component 2
To complete the testing, all interfaces, covering all arrows,
need to be tested together
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule 36
Order in which
interfaces are tested
Sub Systems
(Indicated in Step
4, 6, 8)
Is a set of
components and
Step Interfaces Tested
their related
interfaces 1 1–2
Sub system – 2 1–3
delivers functionality 3 1–4 Sub System
without expecting 4 1–2–5
the presence of
5 1–3–6
other components
Sub system – can 6 1–3–6–(3–7)
work independently 7 1 – 2 – 5 – (( 1 – 3 – 6 ) – ( 1 – 3 – 7 ))
It makes integration 8 1–4–8
testing easier 9 1 – 2 – 5 – (( 1 – 3 – 6 ) – ( 1 – 3 – 7 )) – ( 1 – 4 – 8 )
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule 37
Breadth First
Component order such as –
1 -2 , 1 – 3, 1 – 4 will be tested first
Then components 5, 6, 7, 8 are integrated with previously tested
components and tested
Depth First
Component order such as –
1 – 2 – 5, 1 – 3 – 6, 1 – 3 – 7, 1 – 4 – 8 will be followed
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule 38
2. Bottom Up Integration
I
N
T
E
G
R
A
T
I
O
N
Integration
starts from bottom most module - „Component 1‟
Progresses towards tops and covers all sub systems and
Ends at top most module - „Component 8‟
Assume that components are received for testing in the
order of their number
Nishad D Patel, S.S.V.P.S's B. S. Deore Polytechnic, Dhule 40
Order in which
interfaces are
tested
Drawbacks
3. Bi Directional Integration
(Sandwich Integration)
Order of Integration
Another possibility is …
Component 4
4. System Integration
Drawbacks
Difficult to exactly locate the problem
Correcting the root cause of defect is difficult
May have to make compromise on software quality as –
Integration happens in the end SO it delay the release of the product
If product is to be released on release date, then testing is
compromised and thereby quality
Certain components may require excessive amount of time for
development
Thus wasting time
Guidelines for
selecting integration methods
Sr. Suggested
Factors
No. Integration
1 Clear requirements and design Top Down
2 Dynamically changing requirements, Bottom Up
design, architecture
3 Changing architecture, Bi – Directional
stable design
4 Limited changes to existing Big Bang
architecture with less impact
5 Combination of above Select any one of
the above after
careful analysis