Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach srs@vuse.vanderbilt.edu.

Slides:



Advertisements
Similar presentations
Slide 6.1 © The McGraw-Hill Companies, 2007 Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach.
Advertisements

Verification and Validation
Software Failure: Reasons Incorrect, missing, impossible requirements * Requirement validation. Incorrect specification * Specification verification. Faulty.
Testing Important to guarantee quality of software
Testing Xiaojun Qi.
Slide 13.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
CSC 395 – Software Engineering Lecture 9: Testing -or- How I Stopped Worrying and Learned to Love the Bug.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Slide 6.1 Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill,
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
Software Integration and Documenting
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.
CS540 Software Design Lecture 6 & 7 1 Lecture 6 & 7: Structured Analysis Anita S. Malik Adapted from Schach (2004) Chapter 11.
Software Quality Chapter Software Quality  How can you tell if software has high quality?  How can we measure the quality of software?  How.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Dillon: CSE470: QUALITY ASSURANCE1 Software Qualities Maintainer User Customer Good Documentation Readable Code Good Design Low Cost Portability Increased.
Slide 6.1 CHAPTER 6 TESTING. Slide 6.2 Overview l Quality issues l Nonexecution-based testing l Execution-based testing l What should be tested? l Testing.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach.
Chapter 12: Software Testing Omar Meqdadi SE 273 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Testing Sudipto Ghosh CS 406 Fall 99(Also used later) November 2, 1999.
Verification and Validation Overview References: Shach, Object Oriented and Classical Software Engineering Pressman, Software Engineering: a Practitioner’s.
Chapter 2: Software Process Omar Meqdadi SE 2730 Lecture 2 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Part III: Execution – Based Verification and Validation
Lecture 11 Testing and Debugging SFDV Principles of Information Systems.
Slide 6.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach
... there is no particular reason why your friend and colleague cannot also be your sternest critic. --Jerry Weinberg --Jerry Weinberg.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
6.1/80 TESTING…. 6.2/80 Overview l Motivation, l Testing glossary, l Quality issues, l Non-execution-based testing, l Execution-based testing, l What.
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.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Slide 6.1 CHAPTER 6 TESTING. Slide 6.2 Overview l Quality issues l Nonexecution-based testing l Execution-based testing l What should be tested? l Testing.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Software Quality Assurance and Testing Fazal Rehman Shamil.
Chapter 12: Software Testing Omar Meqdadi SE 273 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
References & User group Reference: Software Testing and Analysis Mauro Pezze Software Engineering Ian Sommerville Eight Edition (2007) User group:
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Principles of Programming & Software Engineering
Object-Oriented Software Engineering WCB/McGraw-Hill, 2008 Stephen R
CSC 480 Software Engineering
Software Quality Engineering
Software Testing An Introduction.
Different Types of Testing
Verification and Testing
Principles of Programming and Software Engineering
Verification and Validation Overview
Verification & Validation
Verification and Validation
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Verification and Validation
Introduction to Software Testing
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach.
Lecture 09:Software Testing
Programming Fundamentals (750113) Ch1. Problem Solving
Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach
Baisc Of Software Testing
Welcome to Corporate Training -1
Unit 1 :Basic Of Software Testing
WALKTHROUGH and INSPECTION
Assertions References: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 4/25/2019.
© Oxford University Press All rights reserved.
Presentation transcript:

Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach srs@vuse.vanderbilt.edu

CHAPTER 6 TESTING

Overview Quality issues Nonexecution-based testing What should be tested? Testing versus correctness proofs Who should perform execution-based testing? When testing stops

Testing Two types of testing Execution-based testing Nonexecution-based testing

Testing (contd) “V & V” Verification Validation Determine if the phase was completed correctly Validation Determine if the product as a whole satisfies its requirements

Testing (contd) Warning “Verify” also used for all nonexecution-based testing

Software Quality Not “excellence” Extent to which software satisfies its specifications Software Quality Assurance (SQA) Goes far beyond V & V Managerial independence development group SQA group

Nonexecution-Based Testing Underlying principles We should not review our own work Group synergy

Walkthroughs 4–6 members, chaired by SQA Preparation—lists of items Inspection Up to 2 hours Detect, don’t correct Document-driven, not participant-driven Verbalization leads to fault finding Performance appraisal

Inspections Five-stage process Overview Preparation, aided by statistics of fault types Inspection Rework Follow-up

Fault statistics Recorded by severity and fault type Compare with previous products What if there are a disproportionate number of faults in a module? Carry forward fault statistics to the next phase

Statistics on Inspections 82% of all detected faults (IBM, 1976) 70% of all detected faults (IBM, 1978) 93% of all detected faults (IBM, 1986) 90% decrease in cost of detecting fault (Switching system, 1986) 4 major faults, 14 minor faults per 2 hours (JPL, 1990). Savings of $25,000 per inspection Number of faults decreased exponentially by phase (JPL, 1992) Warning Fault statistics and performance appraisal

Metrics for Inspections Fault density (e.g., faults per KLOC) Fault detection rate (e.g., faults detected per hour) By severity (major/minor), by phase What does a 50% increase in the fault detection rate mean?

Execution-Based Testing Definitions Failure (incorrect behavior) Fault (NOT “bug”) Error (mistake made by programmer) Nonsensical statement “Testing is demonstration that faults are not present”

What is execution-based tested? “The process of inferring certain behavioral properties of product based, in part, on results of executing product in known environment with selected inputs.” Inference Known environment Selected inputs But what should be tested?

Utility Does it meet user’s needs? Ease of use Useful functions Cost-effectiveness

Reliability Frequency and criticality of failure Mean time between failures Mean time to repair Mean time, cost to repair results of failure

Robustness Range of operating conditions Possibility of unacceptable results with valid input Effect of invalid input

Performance Extent to which space and time constraints are met Real-time software

Correctness of specifications Incorrect specification for a sort Function trickSort which satisfies this specification:

Correctness of specifications (coptd) Incorrect specification for a sort: Corrected specification for the sort:

Correctness NOT necessary NOT sufficient

Correctness Proofs Alternative to execution-based testing

Example of Correctness Proof Code segment to be proven correct

Example of Correctness Proof (contd) Flowchart of code segment

Example of Correctness Proof

Correctness Proof Case Study Never prove a program correct without testing it as well

Episode 1 1969 — Naur Paper “Naur text-processing problem” Given a text consisting of words separated by blank or by nl (new line) characters, convert it to line-by-line form in accordance with following rules: (1) line breaks must be made only where given text has blank or nl ; (2) each line is filled as far as possible, as long as (3) no line will contain more than maxpos characters Naur constructed a procedure (25 lines of Algol 60), and informally proved its correctness

Episode 2 1970 — Reviewer in Computing Reviews The first word of the first line is preceded by blank unless the first word is exactly maxpos characters long

Episode 3 1971 — London finds 3 more faults Including: The procedure does not terminate unless a word longer than maxpos characters is encountered

Episode 4 1975 — Goodenough and Gerhart find three further faults Including: The last word will not be output unless it is followed by blank or nl

Proofs and Software Engineering Lesson: Even if product is proved correct, it must STILL be tested.

Three Myths Software engineers do not have enough math for proofs Proving is too expensive to be practical Proving is too hard

Proofs and Software Engineering (contd) Can we trust a theorem prover ? How to find input–output specifications, loop invariants What if the specifications are wrong? Can never be sure that specifications or a verification system are correct

Proofs and Software Engineering (contd) Correctness proofs are a vital software engineering tool, WHERE APPROPRIATE. If Human lives are at stake Indicated by cost/benefit analysis Risk of not proving is too great Also, informal proofs can improve the quality of the product Assert statement

Who Performs Execution-Based Testing? Testing is destructive A successful test finds a fault Solution 1. The programmer does informal testing 2. SQA does systematic testing 3. The programmer debugs the module All test cases must be Planned beforehand, including expected output Retained afterwards

When Testing Can Stop Only when the product has been irrevocably retired