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.

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

Testing Relational Database
Software Testing. Quality is Hard to Pin Down Concise, clear definition is elusive Not easily quantifiable Many things to many people You'll know it when.
Test process essentials Riitta Viitamäki,
Software Failure: Reasons Incorrect, missing, impossible requirements * Requirement validation. Incorrect specification * Specification verification. Faulty.
PERTEMUAN - 2 SOFTWARE QUALITY. OBJECTIVES After completing this chapter, you will be able to: ■ Define software, software quality and software quality.
Software Quality Assurance (SQA). Recap SQA goal, attributes and metrics SQA plan Formal Technical Review (FTR) Statistical SQA – Six Sigma – Identifying.
Testing Without Executing the Code Pavlina Koleva Junior QA Engineer WinCore Telerik QA Academy Telerik QA Academy.
Overview Lesson 10,11 - Software Quality Assurance
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.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
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.
Software Quality Assurance
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,
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Software Quality Chapter Software Quality  How can you tell if software has high quality?  How can we measure the quality of software?  How.
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 Quality Assurance Lecture #8 By: Faraz Ahmed.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
University of Palestine software engineering department Testing of Software Systems Fundamentals of testing instructor: Tasneem Darwish.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 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.
Unit 8 Syllabus Quality Management : Quality concepts, Software quality assurance, Software Reviews, Formal technical reviews, Statistical Software quality.
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 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.
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.
CHAPTER 9 INSPECTIONS AS AN UP-FRONT QUALITY TECHNIQUE
Software Testing and Maintenance 1 Code Review  Introduction  How to Conduct Code Review  Practical Tips  Tool Support  Summary.
©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.
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Inspection and Review The main objective of an Inspection or a Review is to Detect Defects. (Today -there may be some other goals or broader definition.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
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 Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
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.
1 Definition Quality costs Plan Team Characteristics Implementation documentation Reviews & Audit Software Quality Assurance.
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
Software Configuration Management (SCM)
CSC 480 Software Engineering
Software Testing An Introduction.
Verification and Testing
Verification and Validation Overview
Verification & Validation
Lecture 09:Software Testing
Inspection and Review The main objective of an Inspection or a Review is to detect defects. (Not for Giving Alternative Solutions) This activity and procedure.
Welcome to Corporate Training -1
Software Quality Assurance
Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach
WALKTHROUGH and INSPECTION
© Oxford University Press All rights reserved.
Testing, Inspection, Walkthrough
Presentation transcript:

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 versus correctness proofs l Who should perform execution-based testing? l When testing stops?

Slide 6.3 Testing l Testing is an integral component of software process and an activity that must be carried out throughout the life cycle l Two types of testing –Execution-based testing –Nonexecution-based testing

Slide 6.4 Testing (contd) l “V & V” –Verification »Determine if the phase was completed correctly »Performed at the end of each phase –Validation »Determine if the product as a whole satisfies its requirements »Performed just before the product is delivered to the client l In this book, testing simply denotes V & V

Slide 6.5 Software Quality l Quality implies “excellence” of some sort l In S/W, we do not strive for “excellence” but merely getting the software to function correctly is enough l That is, does the software satisfy its specifications? l Read Just In Case You Wanted to Know on page 138 l Software Quality Assurance (SQA) –Ensures that the product is correct –Performs testing at the end of each phase as well as at the end of the product development –Managerial independence is important »Development group »SQA group

Slide 6.6 Nonexecution-Based Testing l Underlying principles –One should not review his or her own work –Why not? l Nonexecution-based testing is usually referred to as review l There are two types of reviews 1.Walkthroughs 2.Inspections

Slide 6.7 Walkthroughs l Should consist of 4-6 members l For example, a specification walkthrough should include –Specification team manager & member –Client representative –Member that will perform the next phase (design team member) –SQA team member (should chair the walkthrough) l The material to be reviewed should be distributed in advance to the participants l Each reviewer should study the material and prepare two lists: –items that the reviewer does not understand –items that the reviewer believes incorrect

Slide 6.8 Walkthroughs (contd) l Walkthrough process –Usually no more than 2 hours –Detect and record faults – DO NOT correct –Two ways of conducting walkthroughs 1.Participant driven »Participants present their lists of unclear and incorrect items »The author must respond to each query 2.Document driven –The author walks the participants through the document –The reviewers interrupt whenever unclear or incorrect items are presented –The document-driven approach is usually more thorough (i.e., finds more faults)

Slide 6.9 Inspections l More detailed than walkthrough and has five formal steps: overview, preparation, inspection, rework and follow-up l Inspection team should consist of 4 members l For example, design inspection team includes –Moderator (inspection team leader), designer, implementer, tester

Slide 6.10 Inspection Steps 1. Overview –An overview of the document to be reviewed is given by one of the authors –At the end of the overview session, the document is distributed to the participants 2. Preparation –Participants try to understand the document in detail, aided by statistics of fault types –Participants prepare the lists of unclear/incorrect items as well 3. Inspection –An author walks through the document with the inspection team –Faults are detected and recorded – DO NOT correct here –Within one day, the moderator generates a written report containing faults detected during inspection

Slide 6.11 Inspection Steps (contd) 4. Rework –The author resolves all faults and problems noted in the written report 5. Follow-up –The rework is thoroughly checked –All fixes must be checked to ensure that no new faults have been introduced

Slide 6.12 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)

Slide 6.13 Metrics for Inspections l Fault density (e.g., faults per KLOC) l Fault detection rate (e.g., faults detected per hour) l Fault detection efficiency (e.g., the number of major and minor faults detected per person-hour)

Slide 6.14 Execution-Based Testing l Definitions –Fault is the IEEE Standard terminology for “bug” –Failure is the observed incorrect behavior of the product as a consequence of the fault –Error is the mistake made by programmer l “Programming testing can be a very effective way to show the presence of bugs, but it is hopelessly inadequate for showing their absence [Dijkstra, 1972]

Slide 6.15 What is execution-based testing? l “Execution-based testing is a process of inferring certain behavioral properties of a product based, in part, on the results of executing the product in known environment with selected inputs.” [Goodenough, 1979] –Inference (i.e., deriving logical conclusion) –Known environment –Selected inputs l What must be tested? => Behavioral properties must be tested –Correctness, utility, reliability, robustness, and performance

Slide 6.16 Utility l Utility is the extent to which a user’s needs are met when a correct product is used under conditions permitted by its specifications l That is, does it meet user’s needs? –Ease of use –Useful functions –Cost-effectiveness

Slide 6.17 Reliability l Reliability is a measure of the frequency and criticality of product failure –How often the product fails? (Mean time between failures, MTBF) –How long it takes to restore? (Mean time to restore, MTTR) –But often more important is how long it takes to repair the results of the failure?

Slide 6.18 Robustness l Robustness is a function of a number of factors such as –Range of operating conditions –Possibility of unacceptable results with valid input –Effect of invalid input

Slide 6.19 Performance l Extent to which space and time constraints are met l Real-time systems have hard time constraints

Slide 6.20 Correctness l A product is correct if it satisfies its output specifications l But what if the specifications themselves are incorrect?

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

Slide 6.22 Correctness of specifications (contd) l Incorrect specification for a sort: l Corrected specification for the sort:

Slide 6.23 Correctness l NOT necessary l NOT sufficient

Slide 6.24 Correctness Proofs l Alternative to execution-based testing

Slide 6.25 Example of Correctness Proof l Code segment to be proven correct

Slide 6.26 Example of Correctness Proof (contd) l Flowchart of code segment

Slide 6.27 Example of Correctness Proof

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

Slide 6.29 Episode 1 l 1969 — Naur Paper l “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 l Naur constructed a procedure (25 lines of Algol 60), and informally proved its correctness

Slide 6.30 Episode 2 l 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

Slide 6.31 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 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 blank or nl

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

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

Slide 6.35 Proofs and Software Engineering (contd) 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

Slide 6.36 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 –Risk of not proving is too great l Also, informal proofs can improve the quality of the product –Assert statement

Slide 6.37 Who Performs Execution-Based Testing? l Testing is destructive –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 expected output –Retained afterwards

Slide 6.38 When Testing Can Stop? l Only when the product has been irrevocably retired