My_Software Testing
My_Software Testing
Software Testing
Testing programs to
establish the presence of
system defects
Component Integration
testing testing
System
System
Outputs
9999 100000
10000 50000 99999
Less than 10000 Between 10000 and 99999 More than 99999
Input values
Software Engineering Software Testing Slide 17
Search routine specification
procedure Search (Key : ELEM ; T: ELEM_ARRAY;
Found : in out BOOLEAN; L: in out ELEM_INDEX) ;
Pre-condition
-- the array has at least one element
T’FIRST <= T’LAST
Post-condition
-- the element is found and is referenced by L
( Found and T (L) = Key)
or
-- the element is not in the array
( not Found and
not (exists i, T’FIRST >= i <= T’LAST, T (i) = Key ))
Test data
Tests Derives
Component Test
code outputs
Mid-point
8 4
(if (elemArray [mid]< key
5 6
9
Answer:
Le vel 3
stubs
Test
drivers
Testing
Level N Level N Le vel N Level N Level N
sequence
Test
drivers
Level N–1 Level N–1 Level N–1
A B