Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and.

Slides:



Advertisements
Similar presentations
Lecture 8: Testing, Verification and Validation
Advertisements

Software Testing and QA Theory and Practice (Chapter 6: Domain Testing) © Naik & Tripathy 1 Domain Testing Some examples.
Grey Box testing Tor Stålhane. What is Grey Box testing Grey Box testing is testing done with limited knowledge of the internal of the system. Grey Box.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 16, 1999.
Software Testing and Quality Assurance
1 Software Testing and Quality Assurance Lecture 30 - Introduction to Software Testing.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
Software Testing and QA Theory and Practice (Chapter 15: Software Reliability) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 1 Basic Concepts and Preliminaries
Software Testing and QA Theory and Practice (Chapter 6: Domain Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Software Testing and QA Theory and Practice (Chapter 10: Test Generation from FSM Models) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
State coverage: an empirical analysis based on a user study Dries Vanoverberghe, Emma Eyckmans, and Frank Piessens.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 9 Functional Testing
Test coverage Tor Stålhane. What is test coverage Let c denote the unit type that is considered – e.g. requirements or statements. We then have C c =
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 15 Software Reliability
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.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
CPIS 357 Software Quality & Testing
Presented By Dr. Shazzad Hosain Asst. Prof., EECS, NSU
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
Testing Theory cont. Introduction Categories of Metrics Review of several OO metrics Format of Presentation CEN 5076 Class 6 – 10/10.
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
Coverage – “Systematic” Testing Chapter 20. Dividing the input space for failure search Testing requires selecting inputs to try on the program, but how.
Chapter 13: Regression Testing Omar Meqdadi SE 3860 Lecture 13 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Grey Box testing Tor Stålhane. What is Grey Box testing Grey Box testing is testing done with limited knowledge of the internal of the system. Grey Box.
INF 111 / CSE 121: Software Tools and Methods Lecture Notes for Fall Quarter, 2007 Michele Rousseau Set 12 (Some slides adapted from Sommerville 2000 &
Test Drivers and Stubs More Unit Testing Test Drivers and Stubs CEN 5076 Class 11 – 11/14.
Test Coverage CS-300 Fall 2005 Supreeth Venkataraman.
CPIS 357 Software Quality & Testing I.Rehab Bahaaddin Ashary Faculty of Computing and Information Technology Information Systems Department Fall 2010.
Today’s Agenda  HW #1  Finish Introduction  Input Space Partitioning Software Testing and Maintenance 1.
Software Construction Lecture 18 Software Testing.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
An introduction to Fault Detection in Logic Circuits By Dr. Amin Danial Asham.
1 Software Testing and Quality Assurance Theory and Practice Chapter 6 Domain Testing.
 Software Testing Software Testing  Characteristics of Testable Software Characteristics of Testable Software  A Testing Life Cycle A Testing Life.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 1 Basic Concepts and Preliminaries
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Software Testing Sudipto Ghosh CS 406 Fall 99 November 23, 1999.
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 7 System Integration Testing
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Software Testing. SE, Testing, Hans van Vliet, © Nasty question  Suppose you are being asked to lead the team to test the software that controls.
SOFTWARE TESTING AND QUALITY ASSURANCE. Software Testing.
1 Software Testing. 2 What is Software Testing ? Testing is a verification and validation activity that is performed by executing program code.
CS223: Software Engineering Lecture 25: Software Testing.
Testing Integral part of the software development process.
Cs498dm Software Testing Darko Marinov January 24, 2012.
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Module A Fundamentals of Testing
Overview Theory of Program Testing Goodenough and Gerhart’s Theory
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 1 Basic Concepts and Preliminaries
CS223: Software Engineering
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Software Testing An Introduction.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 2 Theory of Program Testing
Verification and Testing
About the Presentations
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 6 Domain Testing
Testing Approaches.
Random Testing.
Test coverage Tor Stålhane.
Sudipto Ghosh CS 406 Fall 99 November 16, 1999
Software Testing “If you can’t test it, you can’t design it”
Chapter 7 Software Testing.
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Presentation transcript:

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice Chapter 2 Theory of Program Testing

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 2 Outline of the Chapter Basic Concepts in Testing Theory Theory of Goodenough and Gerhart Theory of Weyuker and Ostrand Theory of Gourlay Adequacy of Testing Limitations of Testing Summary

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 3 Basic Concepts in Testing Theory Testing theory puts emphasis on –Detecting defects through program execution –Designing test cases from different sources: requirement specification, source code, and input and output domains of programs –Selecting a subset of tests cases from the entire input domain –Effectiveness of test selection strategies –Test oracles used during testing –Prioritizing the execution of test cases –Adequacy analysis of test cases

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 4 Theory of Goodenough and Gerhart Fundamental Concepts –Let P be a program, and D be its input domain. Let T  D. P(d) is the result of executing P with input d. Figure 2.1: Executing a program with a subset of the input domain. –OK(d): Represents the acceptability of P(d). OK(d) = true iff P(d) is acceptable. –SUCCESSFUL(T): T is a successful test iff  t  T, OK(t). –Ideal Test: T is an ideal test if OK(t),  t  T => OK(d),  d  D.

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 5 Theory of Goodenough and Gerhart Fundamental Concepts (Contd.) –Reliable Criterion: A test selection criterion C is reliable iff either every test selected by C is successful, or no test selected is successful. –Valid Criterion: A test selection criterion C is valid iff whenever P is incorrect, C selects at least one test set T which is not successful for P. –Let C denote a set of test predicates. If d  D satisfies test predicate c  C, then c(d) is said to be true. –COMPLETE(T, C) ≡ (  c  C)(  t  T) c(t)  (  t  T)(  c  C) c(t) Fundamental Theorem –(  T  D) (COMPLETE(T,C)  RELIABLE(C)  VALID(C)  SUCCESSFUL(T)) => (  d  D) OK(d)

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 6 Theory of Goodenough and Gerhart Program faults occur due to our –inadequate understanding of all conditions that a program must deal with. –failure to realize that certain combinations of conditions require special care. Kinds of program faults –Logic fault Requirement fault Design fault Construction fault –Performance fault –Missing control-flow paths –Inappropriate path selection –Inappropriate or missing action Test predicate: It is a description of conditions and combinations of conditions relevant to correct operation of the program.

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 7 Theory of Goodenough and Gerhart Conditions for Reliability of a set of test predicates C –Every branching condition must be represented by a condition in C. –Every potential termination condition must be represented in C. –Every condition relevant to the correct operation of the program must be represented in C. Drawbacks of the Theory –Difficulty in assessing the reliability and validity of a criterion. –The concepts of reliability and validity are defined w.r.t. to a program. The goodness of a test should be independent of individual programs. –Neither reliability nor validity is preserved throughout the debugging process.

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 8 Theory of Weyuker and Ostrand d  D, the input domain of program P and T  D. OK(P, d) = true iff P(d) is acceptable. SUCC(P, T): T is a successful test for P iff forall  t  T, OK(P, t). Uniformly valid criterion: Criterion C is uniformly valid iff –(  P) [ (  d  D)(  OK(P,d)) => (  T  D) (C(T)   SUCC(P, T)) ]. Uniformly reliable criterion: Criterion C is uniformly reliable iff (  P) (  T1,  T2  D) [ (C(T 1 )  C(T 2 )) => (SUCC(P, T 1 ) SUCC(P,T 2 )) ]. Uniformly Ideal Test Selection – A uniformly ideal test selection criterion for a given specification is both uniformly valid and uniformly reliable. A subdomain S is a subset of D. –Criterion C is revealing for a subdomain S if whenever S contains an input which is processed incorrectly, then every test set which satisfies C is unsuccessful. REVEALING(C, S) iff (  d  S) (  OK(d)) => (  T  S)(C(T) =>  SUCC(T)).

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 9 Theory of Gourlay The theory establishes a relationship between three sets of entities – specifications, programs and tests. Notation –P: The set of all programs (p  P  P) –S: The set of all specifications (s  S  S) –T: The set of all tests (t  T  T) –“p ok(t) s” means the result of testing p with t is judged to be acceptable by s. –“p ok(T) s” means “p ok(t) s,”  t  T. –“p corr s” means p is correct w.r.t. s. A testing system is a collection, where corr  P x S and ok  T x P x S, and  p  s  t(p corr s => p ok(t) s). A test method is a function M: P x S  T –Program dependent: T = M (P) –Specification dependent : T = M (S) –Expectation dependent

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 10 Theory of Gourlay Power of test methods: Let M and N be two test methods. –For M to be at least as good as N, we want the following to occur: Whenever N finds an error, so does M. (F M and F N are sets of faults discovered by test sets produced by test methods M and N, respectively.) (T M and T N are test sets produced by test methods M and N, respectively.) –Two cases: (a) T N  T M and (b) T M and T N overlap Figure 2.3: Different ways of comparing the power of test methods.

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 11 Adequacy of Testing Reality: New test cases, in addition to the planned test cases, are designed while performing testing. Let the test set be T. If a test set T does not reveal any more faults, we face a dilemma: –P is fault-free. OR –T is not good enough to reveal (more) faults.  Need for evaluating the adequacy (i.e. goodness) of T. Some ad hoc stopping criteria –Allocated time for testing is over. –It is time to release the product. –Test cases no more reveal faults.

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 12 Adequacy of Testing Figure 2.4: Context of applying test adequacy.

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 13 Adequacy of Testing Two practical methods for evaluating test adequacy –Fault seeding –Program mutation Fault seeding –Implant a certain number (say, X) of known faults in P, and test P with T. –If k% of the X faults are revealed, T has revealed k% of the unknown faults. –(More in Chapter 13) Program mutation –A mutation of P is obtained by making a small change to P. –Some mutations are faulty, whereas the others are equivalent to P. –T is said to be adequate if it causes every faulty mutations to produce unexpected results. –(More in Chapter 3)

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 14 Limitations of Testing Dijkstra’s famous observation –Testing can reveal the presence of faults, but not their absence. Faults are detected by running P with a small test set T, where |T| << |D|, where |.| denotes the “size-of” function and “<<“ denoted “much smaller.” –Testing with a small test set raises the concern of testing efficacy. –Testing with a small test set is less expensive. The result of each test must be verified with a test oracle. –Verifying a program output is not a trivial task. –There are non-testable programs. A program is non-testable if There is no test oracle for the program. It is too difficult to determine the correct output.

Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 15 Summary Theory of Goodenough and Gerhart Ideal test, Test selection criteria, Program faults, Test predicates Theory of Weyuker and Ostrand Uniformly ideal test selection Revealing subdomain Theory of Gourlay Testing system Power of test methods (“at least as good as” relation) Adequacy of Testing Need for evaluating adequacy Methods for evaluating adequacy: fault seeding and program mutation Limitations of Testing Testing is performed with a test set T, s.t. |T| << |D|. Dijkstra’s observation Test oracle problem