Testing Tactics: TCS2411 Software Engineering 1
Testing Tactics: TCS2411 Software Engineering 1
1. The better the software is controlled, the more the testing can be
automated and optimized.
2. All possible outputs can be generated through some combination of
input in Software Testing
3. All code is executable through some combination of input in Software
Testing
4. Software and hardware states can be controlled directly by testing
5. Input and output formats are consistent and structured in Software
Testing
6. Tests can be conveniently specified, automated, and reproduced .
1. By controlling the scope of testing, problems can be
isolated quickly, and smarter testing can be performed.
2. The software system is built from independent
modules
3. Software modules can be tested independently in
Software Testing
1. The less there is to test, the more
quickly it can be tested in Software
Testing
2. Functional simplicity
3. Structural simplicity
4. Code simplicity
Methods
Strategies
Edge 1
Node
1
2,3
2
6 R2
4,5
3
R1
7 R3 8
6 4
Region
7 8 5 9
9
10
10
11 R4
11
1. Number of regions
The flow graph has 4 regions
2. V(G) = E – N + 2
E : Number of flow graph edges
N : Number of flow graph nodes
V(G) = 11 edges – 9 nodes + 2 = 4
3. V(G) = P + 1
P : Number of predicate nodes
V(G) = 3 predicate nodes + 1 = 4
1
…
i=1;
2
total.input = total.valid=0;
1
sum=0; 2
do while value[i] <> -999 and total.input<1003
4 increment total.input by 1;
if value[i] >= minimum AND value[i] <= maximum6 3
5 then increment total.valid by 1;
sum = sum + value[i]
7
else skip
8 end if 10 4
increment i by 1
9 End do
If total.valid > 0 10 12 11 5
11 then average = sum / total valid;
12 else average = -999;
13 End if 13
… 6
8 7
Condition testing
Data Flow testing
Loop testing
Input condition
area code : Input condition : Boolean – area code may or may not present
Input condition : Range – 200 – 999 with specific exception
prefix : Input condition : Range – specified value > 200 with no 0 digits
suffix : Input condition : Value – 4 digit length
password : Input condition : Boolean – password may or may not present
Input condition : Value – six character string
command : Input condition : Set – containing command
TCS2411 Software Engineering 34
Boundary Value
Analysis
It’s widely recognized that input values at the extreme
ends of input domain cause more errors in system. More
application errors occur at the boundaries of input
domain. ‘Boundary value analysis’ testing technique is
used to identify errors at boundaries rather than finding
those exist in center of input domain.
Advantages
Find missing functionality
Independent from code size and functionality
Find some coding errors
Constraints
No systematic search for low level errors
Specification errors not found