Slide 6.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach

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

Software Failure: Reasons Incorrect, missing, impossible requirements * Requirement validation. Incorrect specification * Specification verification. Faulty.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
Software Testing. Overview Definition of Software Testing Problems with Testing Benefits of Testing Effective Methods for Testing.
Testing Xiaojun Qi.
School of Computing, Dublin Institute of Technology.
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.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Slide 10.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
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.
 QUALITY ASSURANCE:  QA is defined as a procedure or set of procedures intended to ensure that a product or service under development (before work is.
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 Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
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.
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.
Part III: Execution – Based Verification and Validation
Lecture 11 Testing and Debugging SFDV Principles of Information Systems.
Slide 10.1 Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented and Classical Software Engineering Eighth Edition,
... there is no particular reason why your friend and colleague cannot also be your sternest critic. --Jerry Weinberg --Jerry Weinberg.
Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Jump to first page (C) 1998, Arun Lakhotia 1 Quality Assurance: Reviews and Walkthroughs Arun Lakhotia University of Southwestern Louisiana Po Box
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
An Object-Oriented Approach to Programming Logic and Design Fourth Edition Chapter 6 Using Methods.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development 3.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
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.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Slide 13.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
© 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.
Software Engineering Lecture 8: Quality Assurance.
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.
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill Stephen R. Schach 1.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
©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
Verification and Testing
Verification and Validation Overview
Verification & Validation
Verification and Validation
Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach
Welcome to Corporate Training -1
Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach
WALKTHROUGH and INSPECTION
© Oxford University Press All rights reserved.
CHAPTER 6 Testing and Debugging.
Presentation transcript:

Slide 6.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach

Slide 6.2 © The McGraw-Hill Companies, 2002 CHAPTER 6 TESTING

Slide 6.3 © The McGraw-Hill Companies, 2002 Overview l Quality issues l Nonexecution-based testing l Execution-based testing l What should be tested? l Testing versus correctness proofs l Who should perform execution-based testing? l When testing stops

Slide 6.4 © The McGraw-Hill Companies, 2002 Testing l Two types of testing –Execution-based testing –Nonexecution-based testing

Slide 6.5 © The McGraw-Hill Companies, 2002 Testing (contd) l “V & V” –Verification »Determine if the phase was completed correctly –Validation »Determine if the product as a whole satisfies its requirements

Slide 6.6 © The McGraw-Hill Companies, 2002 Testing (contd) l Warning –“Verify” also used for all nonexecution-based testing

Slide 6.7 © The McGraw-Hill Companies, 2002 Software Quality l Not “excellence” l The extent to which software satisfies its specifications l Software Quality Assurance (SQA) –Goes far beyond V & V –Managerial independence »Development group »SQA group

Slide 6.8 © The McGraw-Hill Companies, 2002 Nonexecution-Based Testing l Underlying principles –We should not review our own work –Group synergy

Slide 6.9 © The McGraw-Hill Companies, 2002 Walkthroughs l 4–6 members, chaired by SQA l Preparation—lists of items l Inspection –Up to 2 hours –Detect, don’t correct –Document-driven, not participant-driven –Verbalization leads to fault finding –Performance appraisal

Slide 6.10 © The McGraw-Hill Companies, 2002 Inspections l Five-stage process –Overview –Preparation, aided by statistics of fault types –Inspection –Rework –Follow-up

Slide 6.11 © The McGraw-Hill Companies, 2002 Fault Statistics l Recorded by severity and fault type l Compare with previous products l What if there are a disproportionate number of faults in a module? l Carry forward fault statistics to the next phase

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

Slide 6.13 © The McGraw-Hill Companies, 2002 Metrics for Inspections l Fault density (e.g., faults per KLOC) l Fault detection rate (e.g., faults detected per hour) l By severity (major/minor), by phase l What does a 50% increase in the fault detection rate mean?

Slide 6.14 © The McGraw-Hill Companies, 2002 Execution-Based Testing l Definitions –Failure (incorrect behavior) –Fault (NOT “bug”) –Error (mistake made by programmer) l Nonsensical statement –“Testing is a demonstration that faults are not present”

Slide 6.15 © The McGraw-Hill Companies, 2002 What Is Execution-Based Testing? l “The process of inferring certain behavioral properties of the product based, in part, on the results of executing the product in a known environment with selected inputs.” –Inference –Known environment –Selected inputs l But what should be tested? –Correctness (of course!) –What else?

Slide 6.16 © The McGraw-Hill Companies, 2002 Utility l Does it meet the user’s needs? –Ease of use –Useful functions –Cost effectiveness

Slide 6.17 © The McGraw-Hill Companies, 2002 Reliability l Frequency and criticality of failure –Mean time between failures –Mean time to repair –Mean time, cost to repair the results of a failure

Slide 6.18 © The McGraw-Hill Companies, 2002 Robustness l Range of operating conditions l Possibility of unacceptable results with valid input l Effect of invalid input

Slide 6.19 © The McGraw-Hill Companies, 2002 Performance l Extent to which space and time constraints are met l Real-time software

Slide 6.20 © The McGraw-Hill Companies, 2002 Correctness l A product is correct if it satisfies its specifications

Slide 6.21 © The McGraw-Hill Companies, 2002 Correctness of specifications l Incorrect specification for a sort: l Function trickSort which satisfies this specification:

Slide 6.22 © The McGraw-Hill Companies, 2002 Correctness of specifications (coptd) l Incorrect specification for a sort: l Corrected specification for the sort:

Slide 6.23 © The McGraw-Hill Companies, 2002 Correctness (contd) l Technically, correctness is –NOT necessary –NOT sufficient

Slide 6.24 © The McGraw-Hill Companies, 2002 Correctness Proofs l An alternative to execution-based testing

Slide 6.25 © The McGraw-Hill Companies, 2002 Example of Correctness Proof l Code segment to be proven correct

Slide 6.26 © The McGraw-Hill Companies, 2002 Example of Correctness Proof (contd) l Flowchart of code segment

Slide 6.27 © The McGraw-Hill Companies, 2002 Example of Correctness Proof

Slide 6.28 © The McGraw-Hill Companies, 2002 Correctness Proof Case Study l Never prove a program correct without testing it as well

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

Slide 6.30 © The McGraw-Hill Companies, 2002 Episode 2 l 1970 — Reviewer in Computing Reviews –The first word of the first line is preceded by a blank unless the first word is exactly maxpos characters long

Slide 6.31 © The McGraw-Hill Companies, 2002 Episode 3 l 1971 — London finds 3 more faults l Including: –The procedure does not terminate unless a word longer than maxpos characters is encountered

Slide 6.32 © The McGraw-Hill Companies, 2002 Episode 4 l 1975 — Goodenough and Gerhart find three further faults l Including: –The last word will not be output unless it is followed by a blank or newline

Slide 6.33 © The McGraw-Hill Companies, 2002 Proofs and Software Engineering l Lesson: l Even if product is proved correct, it must STILL be tested.

Slide 6.34 © The McGraw-Hill Companies, 2002 Three Myths l Software engineers do not have enough mathematics for proofs l Proving is too expensive to be practical l Proving is too hard

Slide 6.35 © The McGraw-Hill Companies, 2002 l Can we trust a theorem prover ? l How to find input–output specifications, loop invariants l What if the specifications are wrong? l Can never be sure that specifications or a verification system are correct Proofs and Software Engineering (contd) void theoremProver() { print  This product is correct  ; }

Slide 6.36 © The McGraw-Hill Companies, 2002 Proofs and Software Engineering (contd) l Correctness proofs are a vital software engineering tool, WHERE APPROPRIATE. l If –Human lives are at stake –Indicated by cost/benefit analysis –The risk of not proving is too great l Also, informal proofs can improve the quality of the product –Assert statement

Slide 6.37 © The McGraw-Hill Companies, 2002 Who Performs Execution-Based Testing? l Programming is constructive l Testing is destructive l A successful test finds a fault l Solution –1.The programmer does informal testing –2.SQA does systematic testing –3.The programmer debugs the module l All test cases must be –Planned beforehand, including the expected output –Retained afterwards

Slide 6.38 © The McGraw-Hill Companies, 2002 When Testing Can Stop l Only when the product has been irrevocably retired