





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















cmsc435 - 1
l To introduce software verification and validation and to discuss the distinction between them
l To describe the program inspection process and its role in V & V
l To explain static analysis as a verification technique
l To describe the Cleanroom software development process
cmsc435 - 3
Testing of individual program components; Usually the responsibility of the component developer (except sometimes for critical systems); Tests are derived from the developer’s experience.
Testing of groups of components integrated to create a system or sub-system; The responsibility of an independent testing team; Tests are based on a system specification.
cmsc435 - 7
A calling component calls another component and makes an error in its use of its interface e.g. parameters in the wrong order.
A calling component embeds assumptions about the behaviour of the called component which are incorrect.
The called and the calling component operate at different speeds and out-of-date information is accessed.
l Validation testing
To demonstrate to the developer and the system customer that the software meets its requirements; A successful test shows that the system operates as intended.
l Defect testing
To discover faults or defects in the software where its behavior is incorrect or not in conformance with its specification; A successful test is a test that makes the system perform incorrectly and so exposes a defect in the system. Tests show the presence not the absence of defects
cmsc435 - 9
The software should conform to its specification. Usually a priori process
The software should do what the user really requires. Usually testing after being built
cmsc435 - 13
cmsc435 - 15
cmsc435 - 19
l A precise specification must be available. l Team members must be familiar with the organization standards. l Syntactically correct code or other system representations must be available. l An error checklist should be prepared. l Management must accept that inspection will increase costs early in the software process. l Management should not use inspections for staff appraisal e.g., finding out who makes mistakes.
All of the following techniques are an improvement over simply testing a program; however, some are more effective than others. Several related concepts: Walkthroughs: The developer of the artifact describes its structure at a meeting. Attendees look for flaws in the structure. Weakness – reviewers do not understand deep structure so error finding is weak. Code reviews: An individual who is not the developer of the artifact reads the text of the artifact looking for errors and defects in structure. Quite effective since reader does not have the same preconceived notion of what the artifact does. Review: A meeting to discuss an artifact – less formal than an inspection. A traditional checkpoint in software development
cmsc435 - 21
cmsc435 - 25
Defects Opinions of attendees
Violation of specification Author Defends position Observer of proceedings Error fixing Discussions at meeting
Later process
Results List of errors to author
Formal defect list for QA and author
Measurement None required Data collected that can be used to develop baseline
cmsc435 - 27
cmsc435 - 31
l Checklist of common errors should be used to drive the inspection.
l Error checklists are programming language dependent and reflect the characteristic errors that are likely to arise in the language.
l In general, the 'weaker' the type checking, the larger the checklist.
l Examples: Initialization, Constant naming, loop termination, array bounds, etc.
Data faults Are all pro gram var iables initialised before their va lues are used? Hav e all constan ts been named? Should the upper bound of arrays be equal to the size of the array or S ize -1? If cha racter strings are used, is a de limiter explicitly assi gned? Is there a ny possi bility of b uffer overflow? Control faults For each co nditional state ment, is the condition correct? Is eac h loop cer tain t o terminate? Are co mp ound s tatements correctly brack eted? In case state ments, are a ll possi ble ca ses acc ounted f or? If a break is req uired after ea ch case in case state ments, has it b een included? Input/output fau lts Are all input variables u sed? Are all output variab les assi gned a value before they are output? Can unexpecte d i nputs cause c orruption?
cmsc435 - 33
Interface faults Do all function and method calls have the correct number of parameters? Do formal and actual parameter ty pes match? Are the parameters i n the right order? If comp onen ts access shared memo ry, do they have the same mo del of the shared m emo ry s tructure?
Storage manage me nt faults
If a linked structure is modified, have all links bee n correc tly r ea ssigned? If dynami c storage is used , has space been alloc ated correc tly? Is space explicitly de-alloca ted after it is no longer req uired?
Excep tion manage me nt faults
Have all poss ible error conditions been taken into acco unt?
cmsc435 - 37
Develop tests as if you are in the role of the individual who will use the given artifact.
l Use scenarios – scripts of sequences of actions the interact with the given artifact being tested.
l Is there any information that prevents you from writing this scenario?
l Are all the necessary functions necessary to write this scenario specified in the requirements, e.g., all the capabilities listed in the general description?
l Are the effects of this scenario specified under all possible circumstances?
l Are the initial conditions for starting up this scenario clear and correct?
l Might some portion of the scenario give different answers depending on how a functional requirement is interpreted?
l Are the interfaces well defined and compatible?
l Do the requirements make sense from what I know about the application or what is specified by the general description?
l Can you get into an improper state, e.g., security or safety problems?
cmsc435 - 39
Develop tests as if you are in the role of the individual who will design the given artifact: l Are all the necessary objects (e.g., data, types, functions) well defined? l Are all the interfaces defined and consistent? l Are all the data types compatible? l Is all the necessary information available to do the design? Are all the conditions involving all objects specified? l Are there any points that are not clear about what you should do, either because the requirement is not clear or not consistent? l Is there anything in the requirements that you cannot implement in the design? l Do the requirements make sense from what I know about the application or what is specified by the general description?
A Study of PBR [“The empirical investigation of perspective based reading” by Basili et al. In Empirical Software Engineering vol. 1 (1996) 133-164] shows that:
l 3 readers find more errors than an unstructured reading of a document.
l Two classes of documents read – a “typical” document and a “precise” document. Results more significant in the “formal” document. In the “typical” document, perspectives found fewer unique errors – Why?
Problem with a study like this – Would like to review 2 documents A and B switching technologies. But not possible to do PBR on A and not do PBR on B second. So PBR always second document to read and learning effects cannot be discounted.