Lecture 10
Lecture 10
Lecture 10
Overview
- Strategic approach to software testing
- Test series for conventional software
- Test strategies for OO software
- Validation testing
- System testing
- Debugging
All
Alltests
testsby
bydeveloper
developer
Usable
Tests
Testsby
byclient
client System
Tests
Testsby
bydeveloper
developer
User’s understanding
System in
Use
Tests
Tests(?)
(?) by
byuser
user
Test Planning
¨ A test plan includes:
Test objectives
Schedule and logistics
Test strategies
Test cases
Procedure
Data
Expected result
Read(ScoreFile, Score);
7 }
/* Compute the mean and print the result */
if (NumberOfScores > 0) { 8
Mean = SumOfScores / NumberOfScores;
printf(“ The mean score is %f\n”, Mean); 9
} else
printf (“No scores found in file\n”);
}
The 4 Testing Steps
1.
1.Select
Selectwhat
whathas
hastotobe
bemeasured
measured 3.
3.Develop
Developtest testcases
cases
•• Analysis:
Analysis:Completeness
Completenessof of •• AAtest
testcase
caseisisaaset
setof
oftest
testdata
dataor or
requirements
requirements situations
situationsthat
thatwill
willbebeused
usedto to
•• Design:
Design:tested
testedfor
forcohesion
cohesion exercise
exercisethetheunit
unit(code,
(code,module,
module,
•• Implementation: system)
system)being
beingtested
testedororabout
aboutthethe
Implementation:CodeCodetests
tests attribute
attributebeing
beingmeasured
measured
2.
2.Decide
Decidehowhowthethetesting
testingisisdone
done 4.
4.Create
Createthethetest
testoracle
oracle
•• Code
Codeinspection
inspection •• An
Anoracle
oraclecontains
containsthethepredicted
predicted
•• Proofs
Proofs(Design
(Designby byContract)
Contract) results
resultsfor
foraaset
setof
oftest
testcases
cases
•• Black-box,
Black-box,white
whitebox,
box, •• The
Thetest
testoracle
oraclehas
hastotobe
bewritten
written
•• Select
Selectintegration
integrationtesting
testingstrategy
strategy down
downbefore
beforethe
theactual
actualtesting
testingtakes
takes
(big
(bigbang,
bang,bottom
bottomup,up,top
topdown,
down, place
place
sandwich)
sandwich)
Quality activities and OO SW
Actual Needs and Delivered
Constraints User Acceptance (alpha, beta test)
Package
Review