Chap 6 Verification and Validation
Chap 6 Verification and Validation
1
Introduction
Verification
It is a process of checking documents, design, code, and
program in order to check if the software has been built
according to the requirements or not.
•The main goal of verification process is to ensure
quality of software application, design, architecture etc.
•The verification process involves activities like reviews,
walk-throughs and inspection.
2
Introduction cont..
Validation
•It is a dynamic mechanism of testing and validating
if the software product actually meets the exact
needs of the customer or not.
•The process helps to ensure that the software fulfills
the desired use in an appropriate environment.
•The validation process involves activities like unit
testing, integration testing, system testing and user
acceptance testing.
3
Verification and Validation Process
• Must applied at each stage of the software
development process to be effective
• Objectives
• Discovery of system defects
• Assessment of system usability in an operational
situation
4
Static and Dynamic Verification
5
Program Testing
6
Goal of Verification and Validation
7
Testing and Debugging
8
Planning
9
The V-model of development
Coding
System Sub-system Module and
Acceptance
integration integration unit code
test plan
test plan test plan and tess
10
Software Inspections
12
Program Inspections
13
Inspection Procedure
14
Classes of Inspection Fault
Data faults
• Are all program variables initialized before their values are used?
• Have all constants been named?
• Should the upper bound of arrays be equal to the size of the array or
Size -1?
• Is there any possibility of buffer overflow?
•Control faults
• For each conditional statement, is the condition correct?
• Is each loop certain to terminate?
• Are compound statements correctly bracketed?
• In case statements, are all possible cases accounted for?
• If a break is required after each case in case statements, has it been
included?
15
Classes of Inspection Faults cont.…
• Input/output faults
• Are all input variables used?
• Are all output variables assigned a value before they are
output?
• Can unexpected inputs cause corruption?
• Interface faults
• Do all function and method calls have the correct number of
parameters?
• Do formal and actual parameter types match?
• Are the parameters in the right order?
• If components access shared memory, do they have the same
model of the shared memory structure?
16
Classes of Inspection Faults cont.…
17
Automated Static Analysis
18
Stage of Static Analysis
• Control flow analysis
• Checks loops for multiple entry points or exits
• Find unreachable code
• Data use analysis
• Detects uninitialized variables, variables written twice
without an intervening assignment, variables which are
declared but never used, etc
• Interface analysis
• Checks the consistency of routine and procedure
declarations and their use
19
Stage of Static Analysis cont..
• Information flow analysis
• Identifies the dependencies of output variables.
• Does not detect anomalies itself but highlights
information for code inspection or review
• Path analysis
• Identifies paths through the program and sets out the
statements executed in that path.
20
Defect Testing
• Component Testing
• Usually responsibility of component developer
• Test derived from developer’s experiences
• Integration Testing
• Responsibility of independent test team
• Tests based on system specification
21
The defect testing process
22
Testing Approaches
• Functional testing
• black box techniques
• Structural testing
• white box techniques
• Integration testing
• Incremental black box techniques
• Object-oriented testing
• cluster or thread testing techniques
23
Black Box Testing
24
Cont…
25
How to do BlackBox Testing
• Here are the generic steps followed to carry out any
type of Black Box Testing.
• Initially, the requirements and specifications of the
system are examined.
• Tester chooses valid inputs (positive test scenario) to
check whether system under test(SUT) processes
them correctly.
• Also, some invalid inputs (negative test scenario) are
chosen to verify that the SUT is able to detect them.
26
How to do BlackBox Testing cont…
• Tester determines expected outputs for all those
inputs.
• Software tester constructs test cases with the
selected inputs.
• The test cases are executed.
• Software tester compares the actual outputs with
the expected outputs.
27
Types of Black Box Testing
• Functional testing - This black box testing type is
related to the functional requirements of a system; it
is done by software testers.
• Non-functional testing - This type of black box testing
is related non-functional requirements such as
performance, scalability, usability.
• Regression testing - Regression Testing is done after
code fixes, upgrades or any other system maintenance
to check the new code has not affected the existing
code.
28
Tools used for Black Box Testing:
29
White Box Testing
31
Interface Types
• Parameter interfaces
• Data passed normally between components
• Shared memory interfaces
• block of memory shared between components
• Procedural interfaces
• Set of procedures encapsulated in a package or sub-
system
• Message passing interfaces
• Sub-systems request services from each other
32
Interface Errors
• Interface misuse
• Parameter order, number, or types incorrect
• Interface misunderstanding
• Call component makes incorrect assumptions about
component being called
• Timing errors
• Race conditions and data synchronization errors
33