1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.

Slides:



Advertisements
Similar presentations
Verification & Validation
Advertisements

Software Engineering COMP 201
Software Testing and Analysis. Ultimate goal for software testing Quality Assurance.
Verification and Validation
Verification and Validation
Software Engineering-II Sir zubair sajid. What’s the difference? Verification – Are you building the product right? – Software must conform to its specification.
©Ian Sommerville 2000Software Engineering. Chapter 22Slide 1 Chapter 22 Verification and Validation.
Software Engineering COMP 201
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
1 / 28 CS 425/625 Software Engineering Verification and Validation Based on Chapter 19 of the textbook [SE-6] Ian Sommerville, Software Engineering, 6.
Verification and Validation
1 Software Testing and Quality Assurance Lecture 1 Software Verification & Validation.
Session VII: Verification and Validation / Testing
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Verification and Validation CIS 376 Bruce R. Maxim UM-Dearborn.
Verification and Validation
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Adaptive Processes © Adaptive Processes Simpler, Faster, Better Verification and Validation Assuring that a software system meets a user's needs.
Dr. Tom WayCSC Code Reviews & Inspections CSC 4700 Software Engineering.
Verification and Validation Chapter 22 of Ian Sommerville’s Software Engineering.
Verification and Validation Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation Slightly adapted by Anders Børjesson.
Chapter 8 – Software Testing Lecture 1 1Chapter 8 Software testing The bearing of a child takes nine months, no matter how many women are assigned. Many.
Software testing techniques 2.Verification and validation From I. Sommerville textbook Kaunas University of Technology.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Software Testing Testing types Testing strategy Testing principles.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
CS.436 Software Engineering By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 13 Verification and validation Slide 1 1 Chapter 13 Verification and Validation.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
SoftwareVerification and Validation
This chapter is extracted from Sommerville’s slides. Textbook chapter
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
Verification and Validation
Ch 22 Verification and Validation
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Bzupages.com Verification and Validation.
CHAPTER 9: VERIFICATION AND VALIDATION 1. Objectives  To introduce software verification and validation and to discuss the distinction between them 
Verification and Validation Assuring that a software system meets a user's needs.
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Engineering, 8th edition Chapter 22 1 Courtesy: ©Ian Somerville 2006 April 27 th, 2009 Lecture # 19 Verification and Validation.
Verification and Validation Assuring that a software system meets a user's needs.
©Ian Sommerville Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation with edits by Dan Fleck Coming up: Objectives.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation with edits by Dan Fleck.
This chapter is extracted from Sommerville’s slides. Textbook chapter 22 1 Chapter 8 Validation and Verification 1.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Software inspections l Involve people examining the source representation with.
References & User group Reference: Software Testing and Analysis Mauro Pezze Software Engineering Ian Sommerville Eight Edition (2007) User group:
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS M.Sc. and B.Sc. of Information Technology Engineering, Lecturer in University of Somalia and Mogadishu.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Pradeep Konduri Niranjan Rao Julapelly.  Introduction and Overview  Verification Vs Validation  Process  Goals  Confidence  Role of V&V in different.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVII. Verification and Validation.
Verification and Validation. Topics covered l Verification and validation planning l Program Testing l Software inspections.
Verification and Validation
Verification and Validation
CSC 480 Software Engineering
Verification and Validation
Chapter 8 – Software Testing
Verification & Validation
Verification and Validation
Verification and Validation
Verification and Validation
Verification and Validation Unit Testing
Verification & Validation
Verification and Validation
Chapter 7 Software Testing.
Presentation transcript:

1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19

2CMSC 345, Version 4/04 Objectives l To introduce software verification and validation and to discuss the distinction between them l To describe the difference between static and dynamic V & V l To describe the program inspection process and its role in V & V l To explain static analysis as a verification technique

3CMSC 345, Version 4/04 l Verification: "Are we building the product right?" The software should conform to its specification. l Validation: "Are we building the right product?" The software should do what the user really requires. Verification vs. Validation

4CMSC 345, Version 4/04 l Is a whole life-cycle process - V & V must be applied at each stage in the software process. Example: Peer document reviews l Has two principal objectives The discovery of defects in a system The assessment of whether or not the system is usable in an operational situation The V & V Process

5CMSC 345, Version 4/04 V & V Goals l Verification and validation should establish confidence that the software is fit for its purpose. This does NOT mean completely free of defects. Rather, it must be good enough for its intended use. The type of use will determine the degree of confidence that is needed.

6CMSC 345, Version 4/04 V & V Confidence l Depends on the system’s purpose, user expectations, and marketing environment System purpose »The level of confidence depends on how critical the software is to an organization (e.g., safety critical). 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 defects in the program

7CMSC 345, Version 4/04 l Code and document inspections - Concerned with the analysis of the static system representation to discover problems (static v & v) May be supplement by tool-based document and code analysis l Software testing - Concerned with exercising and observing product behavior (dynamic v & v) The system is executed with test data and its operational behavior is observed Static vs. Dynamic V & V

8CMSC 345, Version 4/04 Code Inspections (Static V & V) l Involves examining the source code with the aim of discovering anomalies and defects l Defects may be logical errors, anomalies in the code that might indicate an erroneous condition (e.g., an uninitialized variable), or non- compliance with coding standards. l Intended for defect detection, not correction l Very effective technique for discovering errors l Saves time and money – the earlier in the development process an error is found, the better

9CMSC 345, Version 4/04 Inspection Success l Many different defects may be discovered in a single inspection, whereas with testing one defect may mask another so that several executions/tests are required. l Inspections reuse domain and programming knowledge so reviewers are likely to have seen the types of errors that commonly arise.

10CMSC 345, Version 4/04 Inspections and Testing l Inspections and testing are complementary and not opposing verification techniques. l Inspections can check conformance with a specification, but not conformance with the customer’s real requirements. l Inspections cannot check non-functional characteristics such as performance, usability, etc.

11CMSC 345, Version 4/04 Inspection Preparation l A precise specification must be available. l Team members must be familiar with the organization’s standards. l Syntactically correct code must be available. l An error checklist should be prepared. l Management must accept that inspection will increase costs early in the software process.

12CMSC 345, Version 4/04 Ethics Question A manager decides to use the reports of program inspections as an input to the staff appraisal process. These reports show who made and who discovered program errors. Is this ethical management behavior? Would it be ethical if the staff were informed in advance that this would happen? What difference might it make in the inspection process?

13CMSC 345, Version 4/04 Inspection Procedure l The inspection procedure is planned. l A system overview is presented to the inspection team. l Code and associated documents are distributed to inspection team in advance. l Inspection takes place and discovered errors are noted. l Modifications are made to repair discovered errors. l Re-inspection may or may not be required.

14CMSC 345, Version 4/04 Inspection Teams l Made up of: Author of the code being inspected Inspector who finds errors, omissions, and inconsistencies Reader who reads the code to the team Moderator who chairs the meeting Scribe who makes detailed notes regarding errors l Roles may vary from these (e.g., Reader). l Multiple roles may be taken on by the same member.

15CMSC 345, Version 4/04 Inspection Checklist l Checklist of common errors should be used to drive the inspection l Error checklist is programming language dependent l The “weaker” the language type checking, the larger the checklist (e.g., C vs. Java) l Examples: variable initializations, constant naming, loop termination, array bounds, etc.

Inspection checks

17CMSC 345, Version 4/04 Inspection Rate Measurements at IBM by M. E. Fagan: l 500 statements/hour during overview l 125 source statements/hour during individual preparation l statements/hour can be inspected l Inspection is, therefore, an expensive process l Inspecting 500 lines costs about 40 person- hours effort

18CMSC 345, Version 4/04 Automated Static Analysis l Static analyzers are software tools for source text processing. l They parse the program text and try to discover potentially erroneous conditions. l Very effective as an aid to inspections. A supplement to, but not a replacement for, inspections.

19CMSC 345, Version 4/04 Static Analysis Checks

20CMSC 345, Version 4/04 Stages of Static Analysis l Control flow analysis. Checks for loops with multiple exit or entry points, finds unreachable code, etc. l Data use analysis. Detects uninitialized variables, variables assigned twice without an intervening use, variables that are declared but never used, etc. l Interface analysis. Checks the consistency of procedure declarations and their use

21CMSC 345, Version 4/04 Stages of Static Analysis (con’t) l Information flow analysis. Identifies the dependencies of output variables. Does not detect anomalies itself but highlights information for code inspection or review l Path analysis. Identifies paths through the program and sets out the statements executed in that path. Potentially useful in the inspection and testing processes. l Both of these stages generate vast amounts of information. Must be used with care.

LINT static analysis 138% more lint_ex.c #include printarray (Anarray) int Anarray; { printf(“%d”,Anarray); } main () { int Anarray[5]; int i; char c; printarray (Anarray, i, c); printarray (Anarray) ; } 139% cc lint_ex.c 140% lint lint_ex.c lint_ex.c(10): warning: c may be used before set lint_ex.c(10): warning: i may be used before set printarray: variable # of args. lint_ex.c(4) :: lint_ex.c(10) printarray, arg. 1 used inconsistently lint_ex.c(4) :: lint_ex.c(10) printarray, arg. 1 used inconsistently lint_ex.c(4) :: lint_ex.c(11) printf returns value which is always ignored