Software Testing: ©ian Sommerville 2004
Software Testing: ©ian Sommerville 2004
Component System
testing testing
A T1
T1
A
T1 T2
A B
T2
T2 B T3
T3
B C
T3 T4
C
T4
D T5
System
A student in Scotland is studying American History and has been asked to write a paper
on ŌFrontier mentality in the American West from 1840 to 1880Õ.To do this, she needs to
find sources from a range of libraries. She logs on to the LIBSYS system and uses the
search facility to discover if she can acce ss original documents from that time. She
discovers sources in various US university libraries and downloads copies of some of
these. However, for one document, she needs to have confirmation from her university
that she is a genuine student and that use is for non-commercial purposes. The student
then uses the facility in LIBSYS that can request such permission and registers her
request. If granted, the document will be downloaded to the registered libraryÕs server
and printed for her. She receives a message from LIBSYS telling her that she will receive
an e-mail message when th e printed document is available for collection.
request (repor t)
acknowledge ()
repor t ()
summarise ()
send (repor t)
reply (repor t)
acknowledge ()
WeatherStation
identifier
repor tWeather ()
calibrate (instruments)
test ()
star tup (instruments)
shutdown (instruments)
A B
System
Outputs
9999 100000
10000 50000 99999
Less than 1 0000 Betw een 1 0000 and 99999 More than 99999
Input v alues
Pre-condition
-- the sequence 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 ))
the array.
Inputs where the key element is not a
member of the array.
Test da ta
Tests Derives
Component Test
code outputs
Mid-point
8
12 13
14 10
Sour ce Test
Test da ta Oracle
code mana ger
Execution File
Simula tor
repor t comparator