SE.Software Integration_Testing and Documentation-Lecture 7
SE.Software Integration_Testing and Documentation-Lecture 7
⚫ Differentiate between
⚫ integration,
⚫ testing and
⚫ integration testing.
⚫ Integrate and test software using various integration strategies.
⚫ Document software using an appropriate documentation
structure and best practices
Integration of S/W Components
⚫ Software system integration refers to the practice
of combining individually tested software
components into an integrated whole.
• Often many Off-the-shelf components are used that cannot be unit tested
• Without integration testing the system test will be very time consuming
⚫ Objective:
⚫ To technically verify proper interfacing between modules,
and within sub-systems
⚫ Methods: White and Black Box testing
⚫ Is done by the developers
Integration Testing
⚫ What do you need?:
- Integration strategy
- Integration test environment and test suite
- Module (or component) specifications
- Interface and design documents
Integration Testing: Integration strategy
⚫ Integration Strategy usually refers to an approach
indicating the sequence or order to integrate different
units together
14
Top-Down Integration Testing
Top module is tested
with stubs
17
Top-down Integration Testing
Disadvantages
• Stubs need to be created to substitute for
modules that have not been built or tested
yet; this code is later discarded
• Because stubs are used to replace lower
level modules, no significant data flow can
occur until much later in the
integration/testing process
⚫ Large number of stubs may be required, especially if
the lowest level of the system contains many methods.
⚫ Some interfaces are not tested separately.
Bottom-Up Integration Testing
20
Bottom-up Integration Testing
Disadvantages
• Driver modules need to be built to test the
lower-level modules; this code is later
discarded or expanded into a full-featured
version
21
Stubs and drivers
⚫ Are designed for testing a program’s unit.
⚫ Stubs are for top-down testing,
⚫ It refers to the section of the code that performs the
imitation of the called function
⚫ Drivers for bottom-up testing
⚫ It refers to the section of the code that performs the
imitation of the calling function.
24
Sandwich Integration Testing
⚫ When integration for a certain functional
group is complete, integration and
testing moves onto the next group
25
A
Sandwich Integration Testing
B C D
Tes
tA
E F G
Test A,B,C,
Tes D
tE
Test
A, B, C,
Test B, E, F
Tes D,
tF E, F, G
Test D,G
Tes
tG
Sandwich Integration Testing
⚫ Advantage: Top and Bottom Layer Tests can be done
in parallel
Spread
SheetView Layer I
B C D
E F G
+ Cells
Sheet View + File Storage
+ Addition
Non Incremental Integration Testing
⚫ Big Bang - combine (or integrate) all parts at
once.
⚫ Advantages: simple
⚫ Disadvantages:
⚫ hard to debugging,
⚫ not easy to isolate errors
⚫ not easy to validate test results
⚫ impossible to form an integrated system
Integration Testing
Typical Steps
1. Based on the integration strategy, select a
component to be tested.
- Unit test all the classes in the component.
2. Put selected component together; do any
preliminary fix-up necessary to make the integration
test operational (drivers, stubs)
3. Test functional requirements: Define test cases that
exercise all uses cases with the selected component
Integration Testing
4 . Test subsystem decomposition:
Define test cases that exercise all dependencies
5. Test non-functional requirements: Execute
performance tests
34
Black-box Testing
⚫ The test cases satisfy the following:
35
Black-box Testing Categories
⚫ Incorrect or missing functions
⚫ Interface errors
⚫ Errors in data structures or external data base
access
⚫ Behavior or performance errors
⚫ Initialization and termination errors
36
Black-box Testing
Questions answered by black-box testing
⚫ How is functional validity tested?
⚫ How are system behavior and performance
tested?
⚫ What classes of input will make good test
cases?
⚫ Is the system particularly sensitive to certain
input values?
⚫ How are the boundary values of a data class
isolated?
⚫ What data rates and data volume can the
system tolerate?
⚫ What effect will specific combinations of data
37
have on system operation?
Equivalence Partitioning
⚫ A black-box testing method that divides the input domain of
a program into classes of data from which test cases are
derived
⚫ An ideal test case single-handedly uncovers a complete
class of errors, thereby reducing the total number of test
cases that must be developed
⚫ Test case design is based on an evaluation of equivalence
classes for an input condition
⚫ An equivalence class represents a set of valid or invalid
states for input conditions
⚫ From each equivalence class, test cases are selected so
that the largest number of attributes of an equivalence
class are exercised at once
38
Guidelines for Defining Equivalence
Classes
⚫ If an input condition specifies a range, one valid and two invalid
equivalence classes are defined
⚫ Input range: 1 – 10 Eq classes: {1..10}, {x < 1}, {x > 10}
⚫ If an input condition requires a specific value, one valid and two invalid
equivalence classes are defined
⚫ Input value: 250 Eq classes: {250}, {x < 250}, {x > 250}
⚫ If an input condition specifies a member of a set, one valid and one invalid
equivalence class are defined
⚫ Input set: {-2.5, 7.3, 8.4} Eq classes: {-2.5, 7.3, 8.4}, {any other x}
⚫ If an input condition is a Boolean value, one valid and one invalid class are
define
⚫ Input: {true condition} Eq classes: {true condition}, {false condition}
39
Boundary Value Analysis
⚫ A greater number of errors occur at the boundaries of the input
domain rather than in the "center"
⚫ Boundary value analysis is a test case design method that
complements equivalence partitioning
⚫ It selects test cases at the edges of a class
⚫ It derives test cases from both the input domain and output domain
40
Guidelines for Boundary Value Analysis (class reading)
⚫ 1. If an input condition specifies a range bounded by values a
and b, test cases should be designed with values a and b as well
as values just above and just below a and b
⚫ 2. If an input condition specifies a number of values, test case
should be developed that exercise the minimum and maximum
numbers. Values just above and just below the minimum and
maximum are also tested
⚫ Apply guidelines 1 and 2 to output conditions; produce output that
reflects the minimum and the maximum values expected; also test
the values just below and just above
⚫ If internal program data structures have prescribed boundaries
(e.g., an array), design a test case to exercise the data structure
at its minimum and maximum boundaries
41
Black Box Testing
⚫ Black-box test case design techniques are the most
prevalent during integration, although a limited
amount of white-box testing may be used to ensure
coverage of major control paths.
⚫ After the software has been integrated (constructed),
a set of high-order tests are conducted.
⚫ Validation criteria (established during requirements
analysis) must be tested.
⚫ Validation testing provides final assurance that software
meets all functional, behavioral, and performance
requirements. Black-box testing techniques are used
exclusively during validation.
System Integration Testing
System Testing is done after integration
• Objective
• To verify that the system components perform
control functions
• To perform inter-system test
• To demonstrate that the system performs both
functionally and operationally as specified
• To perform appropriate types of tests relating to
Transaction Flow, Installation, Reliability,
Regression etc.
⚫ System Documentation
⚫ User Documentation
Product Documentation
⚫ System Documentation
⚫ Describes how the system works, but not how to
operate it
⚫ Examples:
⚫ Requirements Specification
⚫ Architectural Design
⚫ Detailed Design
⚫ Commented Source Code
⚫ Including output such as JavaDoc
⚫ Test Plans
⚫ Including test cases
⚫ Verification & Validation plan and results
⚫ List of Known Bugs
Product Documentation
⚫ User Documentation has two main types
⚫ End User
⚫ System Administrator
Draft
Peer Reviews
Revise Check
2. Product Standards
⚫ Goal is to have all documents created for a
specific product attain a consistent structure
and appearance
⚫ Can be based on organizational or contractually
required standards