Top Banner
Software Engineering COMP 201 Lecturer: Sebastian Coope Ashton Building, Room G.18 E-mail: [email protected] COMP 201 web-page: http://www.csc.liv.ac.uk/~coopes/comp201 Software Testing 1 COMP201 - Software Engineering
31

Software Engineering COMP 201

Feb 11, 2016

Download

Documents

Madison Madison

Software Engineering COMP 201. Lecturer: Sebastian Coope Ashton Building, Room G.18 E-mail: [email protected] COMP 201 web-page: http://www.csc.liv.ac.uk/~coopes/comp201 Lecture 23 – Verification and Validation. Verification and Validation. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

Defect testing

Software EngineeringCOMP 201Lecturer: Sebastian CoopeAshton Building, Room G.18E-mail: [email protected]

COMP 201 web-page:http://www.csc.liv.ac.uk/~coopes/comp201

Software Testing

1COMP201 - Software Engineering1Defect TestingDefect testing involves testing programs to establish the presence of system defects2COMP201 - Software EngineeringObjectivesTo understand testing techniques that are geared to discover program faultsTo introduce guidelines for interface testingTo understand specific approaches to object-oriented testingTo understand the principles of CASE tool support for testing3COMP201 - Software EngineeringTopics CoveredDefect testingIntegration testingObject-oriented testingTesting workbenches4COMP201 - Software EngineeringThe Testing ProcessComponent testing Testing of individual program componentsUsually the responsibility of the component developer (except sometimes for critical systems)Tests are derived from the developers experienceIntegration testingTesting of groups of components integrated to create a system or sub-systemThe responsibility of an independent testing teamTests are based on a system specification5COMP201 - Software EngineeringTesting Phases

6COMP201 - Software EngineeringDefect TestingThe goal of defect testing is to discover defects in programsA successful defect test is a test which causes a program to behave in an anomalous wayTests show the presence not the absence of defects7COMP201 - Software EngineeringTesting PrioritiesOnly exhaustive testing can show a program is free from defects. However, exhaustive testing is impossibleTests should exercise a system's capabilities rather than its componentsTesting old capabilities is more important than testing new capabilitiesTesting typical situations is more important than boundary value cases8COMP201 - Software EngineeringTest Data and Test CasesTest data Inputs which have been devised to test the systemTest cases Inputs to test the system and the predicted outputs from these inputs if the system operates according to its specification9COMP201 - Software EngineeringTest plan templateName of caseDescriptionInput dataActionExpected outputActual outputSuccess/FailLoginOKPassTests login with a good username and passwordUsername=test1Password=pass1Click loginOKLogin OKSuccessLoginBadPassTests login with good username but wrong passwordUsername=test1 Password=pass2Click loginFailed to LoginFailed to loginSuccessLoginNoPassTests login with password field emptyUsername=test1Password=Click loginFailed to loginLogin OKFailCOMP201 - Software Engineering10The Defect Testing Process

11COMP201 - Software EngineeringBlack-box TestingAn approach to testing where the program is considered as a black-boxThe program test cases are based on the system specification Test planning can begin early in the software process12COMP201 - Software EngineeringBlack-box Testing

13COMP201 - Software EngineeringEquivalence PartitioningInput data and output results often fall into different classes where all members of a class are relatedEach of these classes is an equivalence partition where the program behaves in an equivalent way for each class memberTest cases should be chosen from each partition14COMP201 - Software EngineeringEquivalence Partitioning

15COMP201 - Software EngineeringEquivalence PartitioningPartition system inputs and outputs into equivalence setsIf input is a 5-digit integer between 10,000 and 99,999, equivalence partitions are 10, 000Choose test cases at the boundary of these sets00000, 09999, 10000, 99999, 10001These are more likely to display erroneous behaviour than choosing random values16COMP201 - Software EngineeringEquivalence Partitions

17COMP201 - Software EngineeringSearch Routine Specificationprocedure Search (Key : ELEM ; T: ELEM_ARRAY; Found : in out BOOLEAN; L: in out ELEM_INDEX) ;

Pre-condition-- the array has at least one elementTFIRST = i