Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide1
Objectives
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide2
Topics covered
System testing
Component testing
Test case design
Test automation
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide3
Component testing
System testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide4
Testing phases
Component
testing
System
testing
Software developer
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide5
Defect testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide6
Validation testing
Defect testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide7
Test
cases
Design test
cases
IanSommerville2004
Test
data
Prepare test
data
Test
results
Run program
with test da
ta
Test
reports
Compar
e results
to test cases
SoftwareEngineering,7thedition.Chapter23Slide8
Testing policies
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide9
System testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide10
Integration testing
Bottom-up integration
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide11
T1
T1
T2
T2
T2
B
T3
B
T3
T3
T4
C
T4
D
Test sequence 1
IanSommerville2004
T1
Test sequence 2
T5
Test sequence 3
SoftwareEngineering,7thedition.Chapter23Slide12
Testing approaches
Architectural validation
System demonstration
Test implementation
Test observation
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide13
Release testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide14
Black-box testing
Input test da
ta
Ie
Inputs causing
anomalous
behaviour
Oe
System
Output testesults
r
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide15
Testing guidelines
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide16
Testing scenario
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 facilit y to discover if she can access 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 librarys server
and printed for her. She receives a message from LIBSYS telling her that she will receive
an e-mail message when the printed document is available for collection.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide17
System tests
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide18
Use cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide19
:WeatherStation
:WeatherData
request (repor
t)
acknowledge ()
report ()
summarise ()
send (report)
reply (report)
acknowledge ()
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide20
Performance testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide21
Stress testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide22
Component testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide23
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide24
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide25
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide26
Interface testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide27
Interface testing
Test
cases
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide28
Interface types
Parameter interfaces
Procedural interfaces
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide29
Interface errors
Interface misuse
Interface misunderstanding
Timing errors
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide30
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide31
Requirements-based testing;
Partition testing;
Structural testing.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide32
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide33
LIBSYS requirements
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide34
LIBSYS tests
Initiate user search for searches for items that are known to
be present and known not to be present, where the set of
databases includes 1 database.
Initiate user searches for items that are known to be present
and known not to be present, where the set of databases
includes 2 databases
Initiate user searches for items that are known to be present
and known not to be present where the set of databases
includes more than 2 databases.
Select one database from the set of databases and initiate
user searches for items that are known to be present and
known not to be present.
Select more than one database from the set of databases
and initiate searches for items that are known to be present
and known not to be present.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide35
Partition testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide36
Equivalence partitioning
Invalid inputs
Valid inputs
System
Outputs
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide37
Equivalence partitions
3
4
Less than 4
11
10
Between 4 and 0
1
More than 1
0
Less than 1
0000
50000
100000
99999
Input values
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide38
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide39
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide40
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide41
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide42
Structural testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide43
Structural testing
Test data
Tests
Derives
Component
code
IanSommerville2004
Test
outputs
SoftwareEngineering,7thedition.Chapter23Slide44
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide45
Mid-point
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide46
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide47
Path testing
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide48
7
elemArray
[mid] = key
12
11
elemArray [mid] < key
13
14
IanSommerville2004
10
SoftwareEngineering,7thedition.Chapter23Slide49
Independent paths
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14
1, 2, 3, 4, 5, 14
1, 2, 3, 4, 5, 6, 7, 11, 12, 5,
1, 2, 3, 4, 6, 7, 2, 11, 13, 5,
Test cases should be derived so that all of
these paths are executed
A dynamic program analyser may be used to
check that paths have been executed
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide50
Test automation
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide51
A testing workbench
Test data
generator
Specifi ca
tion
Source
code
Test
manager
Test data
Oracle
Dynamic
analy ser
Program
being tested
Test results
Test
predictions
Execution
report
Simulator
File
comparator
Report
generator
IanSommerville2004
Test results
report
SoftwareEngineering,7thedition.Chapter23Slide52
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide53
Key points
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide54
Key points
IanSommerville2004
SoftwareEngineering,7thedition.Chapter23Slide55