Chapter-5 Levels of Testing
Chapter-5 Levels of Testing
1 Tadele M.
System decomposition tree
2
Different Levels of testing
• A process where every unit or component of a software/system is tested
• Defined by a given environment
• Environment is a collection of attributes:
• People or responsible individual
• Strategy or the element to be tested
• Testing goal
3
Levels of testing
• UnitTesting
• IntegrationTesting
• System Testing
• AcceptanceTesting
• Regression testing
4
1. Unit Testing
• A unit is smallest testable piece of the system
– can be compiled, linked, loaded, executed
– e.g functions/procedures, classes, interfaces
• Testing of individual components separately
• Normally done by programmer
• Find unit bugs
– Wrong implementation of functional specs
• Better to use “BuddyTesting”
5
1. Unit Testing
BuddyTesting
• A collaborative approach to software
testing where a developer and a tester pair
up
• Team approach to coding and testing
• One programmer codes the other tests and
vice versa
– Test cases ‐ written by tester(before
coding starts). Better than single worker
approach
6
2. Integration testing
• Systems built by merging existing libraries
• Modules coded by different people
• Mainly tests the interfaces among units by checking
the data flow from one module to other modules
• Test for correct interaction between system units
• Performed by developers/testers on the
programmer’s workbench
7
2. Integration testing…
• Top down integration testing
• Units at the top level are tested first, and
then units at low levels are tested one by
one.
• Use of stubs : to allow testing of the upper levels
of the code, when the lower levels of the code are
not yet developed
• Bottom up integration testing
• The reverse of the top-down approach.
• Use of drivers: to allow testing of the lower levels
of the code, when the upper levels of the code are
not yet developed.
8
2. Integration testing…
9
3. System Testing
10
Types of System Testing
Read about:
11
4. Acceptance Testing
12
5. Regression Testing
• This testing is required when there is any:
• Change in requirements and code is modified as per the changed
requirements
• Added new features in product
• Bug fixing
• Fixing of performance related issues
13
Factors influencing test scope
• Size of project
• Complexity of project
• Budget for project
• Time scope for project
• Number of staff
14
Why test at different levels
• Easily track bugs
• Ensures a working subsystem/ component/ library
• Software reuse more practical
• Software development naturally split to phases
15
The “V” model and test levels
16