Verification and Validation
Verification and Validation
Verification and Validation
Verification and
Validation
Based on Software Engineering, 7th Edition by Ian Sommerville
Stan Kurkovsky
Objectives
To introduce software verification and validation and to discuss the
distinction between them
To describe the program inspection process and its role in V & V
To explain static analysis as a verification technique
To describe the Cleanroom software development process
Stan Kurkovsky
Stan Kurkovsky
V & V confidence
Depends on system
systems purpose, user expectations and marketing
environment
Software function
The level of confidence depends on how critical the software is to an
organisation.
User expectations
Users may have low expectations of certain kinds of software.
Marketing environment
Getting a product to market early may be more important than finding
finding defects
in the program.
Stan Kurkovsky
Requirements
specification
Prototype
High-level
design
Formal
specification
Detailed
design
Program
Program
testing
Stan Kurkovsky
Program testing
Can reveal the presence of errors NOT their absence.
The only validation technique for nonnon-functional requirements as the
software has to be executed to see how it behaves.
Should be used in conjunction with static verification to provide
provide full V&V
coverage.
Defect testing
Tests designed to discover system defects.
A successful defect test is one which reveals the presence of defects
defects in a
system.
Validation testing
Intended to show that the software meets its requirements.
A successful test is one that shows that a requirements has been properly
implemented.
Stan Kurkovsky
Test
results
Specification
Locate
error
Design
error repair
Test
cases
Repair
error
Retest
program
Stan Kurkovsky
V & V planning
Careful planning is required to get the most out of testing and inspection
processes.
Planning should start early in the development process.
The plan should identify the balance between static verification and
testing.
Test planning is about defining standards for the testing process
process rather
than describing product tests.
The VV-model of development
Requirements
specification
System
specification
System
integration
test plan
Acceptance
test plan
Service
System
design
Acceptance
test
Detailed
design
Sub-system
integration
test plan
System
integration test
Module and
unit code
and test
Sub-system
integration test
Stan Kurkovsky
Requirements traceability
Users are most interested in the system meeting its requirements and testing should be
planned so that all requirements are individually tested.
Tested items
Testing schedule
Constraints
This section should set out software tools required and estimated
estimated hardware utilisation.
Constraints affecting the testing process such as staff shortages
shortages should be anticipated
in this section.
Stan Kurkovsky
Software inspections
These involve people examining the source representation with the
the aim of
discovering anomalies and defects.
Inspections not require execution of a system so may be used before
before
implementation.
They may be applied to any representation of the system (requirements,
(requirements,
design, configuration data, test data, etc.).
They have been shown to be an effective technique for discovering
discovering
program errors.
Stan Kurkovsky
Stan Kurkovsky
Inspection prepre-conditions
A precise specification must be available.
Team members must be familiar with the organisation standards.
Syntactically correct code or other system representations must be
available.
An error checklist should be prepared.
Management must accept that inspection will increase costs early in the
software process.
Management should not use inspections for staff appraisal i.e. finding
finding out
who makes mistakes.
Stan Kurkovsky
Inspection procedure
System overview presented to inspection team.
Code and associated documents are distributed to inspection team in
advance.
Inspection takes place and discovered errors are noted.
Modifications are made to repair discovered errors.
ReRe-inspection may or may not be required.
Stan Kurkovsky
Inspection checks
Data faults
Control faults
Interface faults
Input/output faults
Data faults
Variables used before initialisation
Variables declared but never used
Variables assigned twice but never
used between assignments
Possible array bound violations
Undeclared variables
Control faults
Unreachable code
Unconditional branches into loops
Interface faults
Input/output faults
Variables output twice with no
intervening assignment
Stan Kurkovsky
Stan Kurkovsky
Cons
Require specialized notations that
cannot be understood by domain
experts.
Very expensive to develop a
specification and even more
expensive to show that a
program meets that specification.
It may be possible to reach the
same level of confidence in a
program more cheaply using
other V & V techniques.
Stan Kurkovsky
Incremental development;
Formal specification;
Static verification using correctness arguments;
Statistical testing to determine program reliability.
For mally
specify
system
Error rewor k
Define
software
increments
Develop
oper ational
profile
Construct
structured
program
For mally
verify
code
Design
statistical
tests
Integrate
increment
Test
integrated
system
Stan Kurkovsky
Stan Kurkovsky
Stan Kurkovsky
Key points
Verification and validation are not the same thing. Verification shows
conformance with specification; validation shows that the program
program meets
the customer
customers needs.
Test plans should be drawn up to guide the testing process.
Static verification techniques involve examination and analysis of the
program for error detection.
Program inspections are very effective in discovering errors.
Program code in inspections is systematically checked by a small team to
locate software faults.
Static analysis tools can discover program anomalies which may be
be an
indication of faults in the code.
The Cleanroom development process depends on incremental
development, static verification and statistical testing.
Stan Kurkovsky