Topic 4 - Software - Testing (SE)
Topic 4 - Software - Testing (SE)
Topic 4
Software Testing
NOR IADAH YUSOP
[email protected]
+ 2
n Validation:
tested?
§ To reveal the presence of errors NOT their absence in
the software
§ The aims are
§ to ensure that the software fulfills the clients’
requirements
§ to ensure the correctness, completeness and the
quality of the software
§ to discover program defects before it is put into use
+ 5
n Failure
An event when there is deviation of the
software from its expected result.
+ 7
Inspections
System
prototype Testing
+ 9
contains a
specific
detailed
procedure of
understanding
testing a
of what the
particular
eventual testing
requirement
workflow will be
Test
Plan
Stages of testing
n Development testing
n the system is tested during development to discover bugs and
defects – unit testing, component/integration testing, system
testing
n Release testing
n a separate testing team test a complete version of the system
before it is released to users.
n User testing
n users or potential users of a system test the system in their own
environment.
+ 11
Release testing
n Main differences:
User testing
n User or customer testing is a stage in the testing process in
which users or customers provide input and advice on system
testing.
Testing strategies
requirements
output
input
events
+ 19
Test data
Tests Derives
Component Test
code outputs
+ An input-output model of program 20
testing
System
1 1
2 2
3
3
6 4 6 4
7 8 5
7 8 5
9
9
11 10 26
11 10
+ Draw a control flow graph
u 1: IF A = 100
u 2: THEN IF B > C
u 3: THEN A = B
u 4: ELSEA= C
u 5: ENDIF
u 6: ENDIF
u 7: Print A
+
Determine Cyclomatic complexity
There are several methods:
1. Cyclomatic complexity = edges - nodes + 2p
*p = the number of unconnected path
Cyclomatic complexity
= 2+1= 3.
+ Determine Cyclomatic complexity
Cyclomatic complexity
=3
+ Determine Cyclomatic complexity
Cyclomatic complexity
= 7-8+ 2*2= 3.
+ 33
u Path 1: 1, 2, 3, 5, 6, 7.
u Path 2: 1, 2, 4, 5, 6, 7.
u Path 3: 1, 6, 7.
+
Generate test cases for each path