Professional Documents
Culture Documents
Ivica Crnkovic
Mlardalen University
Department of Computer Engineering
ivica.crnkovic@mdh.se
SE course, Testing
Page 1, 2001-01-14
SE course, Testing
Page 2, 2001-01-14
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 2
Complicated process
SE course, Testing
Page 3, 2001-01-14
Defect classifications
SE course, Testing
Page 4, 2001-01-14
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 3
TYPE: WHAT?
Specification/
requirements
Requirements
or
specifications
Design
HW interface
SW interface
User interface
Functionality
Environment/
support
Code
(Inter-)Process
communications
Functional
description
Other
Logic
Test HW
Computation
Test SW
Data handling
Integration SW
Module
interface/
implementation
Development
tools
Data definition
Module design
Logic
description
Documentation
Error checking
Standards
Standards
MODE:
Missing
WHY?
Mdh/IDt, Ivica Crnkovic
Unclear
Wrong
Changed
Better way
SE course, Testing
Page 5, 2001-01-14
Other code
11%
Example:
Faults statistics (HP)
Data handling
6%
Documentation
19%
Computation
18%
Requirements
5%
Logic
32%
SE course, Testing
Hardware
4%
Process/interpr
ocess
5%
Page 6, 2001-01-14
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 4
Origin of problems
Specification/
requirements
Mdh/IDt, Ivica Crnkovic
Design
Code
SE course, Testing
Integration
Page 7, 2001-01-14
perform reviews
perform tests
SE course, Testing
Page 8, 2001-01-14
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 5
REQUIREMENTS
ANALYSIS
RS
OPERATION
& MAINTENANCE
Validate requirements
SYSTEM
DESIGN
ACCEPTANCE
TESTING
Verify design
System design
test description
SD, FS
SYSTEM
TESTING
PROGRAM
DESIGN
UNIT & INTE-
DS, Code
GRATION TESTING
Module test
description & code
CODING
SE course, Testing
Page 9, 2001-01-14
Uni t
testing
Module
testing
Sub-system
t esting
System
testing
Acceptance
testing
Component
testing
Mdh/IDt, Ivica Crnkovic
SE course, Testing
User
testing
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 6
Other
software
requirements
Customer
requirements
specification
Performance
test
Acceptance
test
User
environment
ponen
Unit
test
Design
System
specifications functional
requirements
d com
Unit
test
Teste
Component code
Function
test
Installation
test
t
ponen
d com
test
Integration
test
Integrated
modules
Functioning
system
Verified,
validated
software
Teste
Component code
.
.
.
Unit
SE course, Testing
Accepted
system
SYSTEM
IN USE!
Page 11, 2001-01-14
System tests
Alpha releases
Beta releases
Official
release
New functions
Fixing defects
SE course, Testing
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 7
Unit Testing
Different methods to test the code
? Code review - go trough the code
?
? Code inspection
?
Formal verification
Inputs to test the system and the predicted outputs from these
inputs if the system operates according to its specification
SE course, Testing
Black-box testing
Inputs causing
anomalous
behaviour
System
Oe
SE course, Testing
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 8
Interface testing
? Takes place when modules or sub-systems are integrated to
create larger systems
? Objectives are to detect faults due to interface errors or invalid
assumptions about interfaces
? Particularly important for object-oriented development as objects
are defined by their interfaces
Test
ca se s
SE course, Testing
Interfaces types
? Parameter interfaces
?
? Procedural interfaces
?
SE course, Testing
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 9
Test d at a
Test s
Deri ves
Com po nent
cod e
Test
o ut puts
SE course, Testing
Path testing
? A white-box testing
? Testing different combinations of program paths
? Measuring the coverage percentile of the test
i f-th en -e ls e
l oo p-wh ile
SE course, Testing
case -o f
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 10
Integration testing
? Test on the sub-systems levels
? Testing how the components work together
SE course, Testing
Test
E
Test
F
Test
G
Test
B,E,F
Test
C
Test
A,B,C,D,
E,F,G
A
Test
D,G
B
E
SE course, Testing
C
F
D
G
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 11
Top-down testing
? Test from the top level
? all components are not necessary completed (and tested)
?
Test
A
Test
A,B,C,D,
E,F,G
Test
A,B,C,D
A
B
E
Mdh/IDt, Ivica Crnkovic
SE course, Testing
Test
A
Test
C
Test
E
Test
A,B,C,D
Test
F
Test
A,B,C,D,
E,F,G
A
Test
D
Test
G
B
E
SE course, Testing
C
F
D
G
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 12
Sandwich Integration
Test
E
Test
B,E,F
Test
F
Test
A,B,C,D,
E,F,G
Test
D,G
Test
G
A
B
Test
A
SE course, Testing
C
F
D
G
Page 23, 2001-01-14
SE course, Testing
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 13
SE course, Testing
Modularity
Inheritance
Polymorphism
Small methods
Reuse
Encapsulation
Dynamic binding
Complex Interfaces
Interfaces
identified earlier
More integration
SE course, Testing
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 14
Code analysis
? Show some potential program errors and low quality code (too many
branches, complicated structure, bad naming policy
? Generate different graphs showing the program structure
? Data analyzer (initialization, usage, etc.)
? Dynamic Analyzers
?
Memory leakage
Measuring timing
SE course, Testing
Probability
of existence
of additional
faults
SE course, Testing
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 15
Requirements
analysis
System
design
Program
design
Program
implementation
Unit/integration testing
System testing
Maintenance
Mdh/IDt, Ivica Crnkovic
Integrated
modules
SE course, Testing
System
functional
requirements
Other
software
requirements
Customer
requirements
specification
Function
test
Performance
test
Acceptance
test
Functioning
system
Verified,
validated
software
SE course, Testing
User
environment
Installation
test
SYSTEM
IN USE!
Accepted
system
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 16
TEST SPECIFICATION
TEST 1
Requirements tested
TEST PLAN
TEST ANALYSIS
REPORT
Test procedures
1.
Methods
2.
Conditions
1
3,4
TEST 1
Results
Perform
test 1
Functions tested
SYSTEM TEST
FUNCTION
Function 1
Function 2
.
.
TEST DESCRIPTION
TEST 1
Test data
TEST SPECIFICATION
TEST 2
Requirements tested
TEST DESCRIPTION
TEST 2
Test data
TEST ANALYSIS
REPORT
Test procedures
1.
Methods
TEST 2
Results
Perform
test 2
Functions tested
2.
Conditions
SE course, Testing
FAULT REPORT
S.P0204.6.10.3016
ORIGINATOR:
Joe Bloggs
BRIEF TITLE:
FULL DESCRIPTION
Started NAS endurance and allowed it to run for a few minutes. Disabled the active NAS
link (emulator switched to standby link), then re-enabled the disabled link and CDIS exceptioned as above. (I
think the re-enabling is a red herring.)
(during database load)
ASSIGNED FOR EVALUATION TO:
DATE:
CATEGORISATION:
0 1 2 3 Design Spec Docn
SEND COPIES FOR INFORMATION TO:
EVALUATOR:
CONFIGURATION ID
dpo_s.c
DATE:
8/7/92
ASSIGNED TO
PART
COMMENTS: dpo_s.c appears to try to use an invalid CID, instead of rejecting the message. AWJ
ITEMS CHANGED
CONFIGURATION ID
dpo_s.c v.10
IMPLEMENTOR/DATE
AWJ 8/7/92
REVIEWER/DATE
MAR 8/7/92
BUILD/ISSUE NUM
6.120
INTEGRATOR/DATE
RA 8-7-92
COMMENTS:
CLOSED
SE course, Testing
DATE: 9/7/92
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic
Page 17
SE course, Testing
We reserve all rights in this document and in the information contained therein. Reproduction, use or disclosure to third parties without express
authority is strictly forbidden. MdH/IDt Ivica Crnkovic