Professional Documents
Culture Documents
Test Levels
• Test Levels
System testing
$14,000
Faster Debugging
85% % Defects
Better Design
Percentage of Bugs
Introduced in
this phase
Reduce Future % Defects
Cost (Quality found in
in this phase
$1000
Effort & $ Cost to
Correction Cost) $25 $130 $250 repair defect
in this phase
Coding Unit Funct Field Post
Test Test Test Release
Detailed design
Code
Data model
Component specifications
Stub
Stub
B
Stub
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 14
Bottom-up Unit Testing
Driver: call software component
Test Test
Drivers Drivers
Level N Level N
Test
Drivers
Level N-1
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 15
Unit Test – Types/Technique
READ A (1)
READ B (2)
C = A + 2 * B (3)
IF C> 50 THEN (4)
PRINT “large C” (5)
ENDIF (6)
Path coverage:
Path 1: 1, 2, 3, 4, 5, 6
A = 20, B = 25
Path 2: 1, 2, 3, 4, 6
A = 20, B= 10
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 20
Path Testing
Read P, Q (1)
If P+Q > 100 then (2)
Print "Large“ (3)
If P > 100 then (4)
Print "P is Greater“ (5)
Endif (6)
Path coverage:
Path 1: 1, 2, 3, 4, 5, 6
P= 110, Q = 50
Path 2: 1, 2, 3, 6
P = 80, Q = 70
Path 3: 1, 2, 6
P=80, Q=10
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 21
Unit Test – Typical defects and failures
Why:
Unit tests only test the unit in isolation
Many failures result from faults in the interaction of
subsystems
Ensure integrate functions/modules follow architecture
design or high level design (HLD)
Ensure communication between functions/modules work
properly
When:
Depends on integration level
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 26
Integration Testing – Inputs (Test Basis)
Test A
A
Test B
Test C B C D
Test
Test D A, B, C, D,
E, F, G
Test E E F G
Test F
Integrate all components, systems at
Test G
one time
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 32
Big Bang Integration
Advantages:
Everything is finished before integration testing starts.
Disadvantages:
Time consuming
Difficult to trace cause of fault
Only effectively when the software expected to have no
defect.
A
Layer I
B C D Layer II
E F G
Layer III
Test
Test A Test A, B, C, D A, B, C, D,
E, F, G
Layer I
Layer I + II
All Layers
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 35
Top-down Integration Testing
Advantages:
No drivers needed
Test cases can be defined in terms of the
functionality of the system (functional requirements)
Disadvantages:
Large number of stubs may be required, especially
if the lowest level of the system contains many
methods.
Writing stubs is difficult: Stubs must allow all
possible conditions to be tested.
Some interfaces are not tested separately.
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 36
Bottom-Up Integration Testing
A
Layer I
B C D Layer II
Test E
Test B, E, F E F G
Layer III
Test F
Test C Test
A, B, C, D,
E, F, G
Test D,G
Test G
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 37
Bottom-Up Integration Testing
Advantages:
No stubs needed
Useful for integration testing of the following systems
•Object-oriented systems
•Real-time systems
•Systems with strict performance requirement
Disadvantages:
Tests the most important subsystem (user
interface) last
Drivers needed
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 38
Functional Incremental
Advantages:
Test cases can be defined in terms of the
functionality of the system (functional requirements)
Disadvantages:
Both stubs and drivers are needed.
Some interfaces are not tested separately.
Difficulty for integrator
9/21/2022 09e-BM/DT/FSOFT - ©FPT SOFTWARE – Fresher Academy - Internal Use 39
Section 4
SYSTEM TEST
Focuses on input and output of the software without regard to the internal
code of the program
Focuses on functional requirement of the software
Design sets of input conditions that will fully exercise all functional
requirements for a program
Business processes
User or business requirements
Regulations, legal contracts and standards
Use cases
System requirements
System or user documentation
Installation procedures
Do by end-users/customers
Conducted at end-user sites
Do after alpha testing
Developer is generally not present
The end-user records all problems that are
encountered and reports these to the developers at
regular intervals