1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

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.
Lecture 8: Testing, Verification and Validation
Overview Functional Testing Boundary Value Testing (BVT)
Overview Discrete Mathematics for Testers Set Theory Functions
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
(c) 2007 Mauro Pezzè & Michal Young Ch 9, slide 1 Test Case Selection and Adequacy Criteria.
Software Testing and QA Theory and Practice (Chapter 2: Theory of Program Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and.
Safety and Liveness. Defining Programs Variables with respective domain –State space of the program Program actions –Guarded commands Program computation.
Software Testing and Quality Assurance
Software Testing and Quality Assurance
Validating and Improving Test-Case Effectiveness Author: Yuri Chernak Presenter: Lam, Man Tat.
Testing an individual module
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Describing Syntax and Semantics
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 5 Data Flow Testing
Software Testing and QA Theory and Practice (Chapter 6: Domain Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Overview Software Quality Assurance Reliability and Availability
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
System/Software Testing
TESTING.
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
CMSC 345 Fall 2000 Unit Testing. The testing process.
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.
1 Software testing. 2 Testing Objectives Testing is a process of executing a program with the intent of finding an error. A good test case is in that.
Ch6: Software Verification. 1 Decision table based testing  Applicability:  Spec. is described by a decision table.  Tables describe:  How combinations.
1 Software Testing. 2 Path Testing 3 Structural Testing Also known as glass box, structural, clear box and white box testing. A software testing technique.
Dr. Tom WayCSC Testing and Test-Driven Development CSC 4700 Software Engineering Based on Sommerville slides.
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.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
Test Coverage CS-300 Fall 2005 Supreeth Venkataraman.
INTRUDUCTION TO SOFTWARE TESTING TECHNIQUES BY PRADEEP I.
CPIS 357 Software Quality & Testing I.Rehab Bahaaddin Ashary Faculty of Computing and Information Technology Information Systems Department Fall 2010.
RE - SEARCH ---- CAREFUL SEARCH OR ENQUIRY INTO SUBJECT TO DISCOVER FACTS OR INVESTIGATE.
Software Engineering 2004 Jyrki Nummenmaa 1 BACKGROUND There is no way to generally test programs exhaustively (that is, going through all execution.
Integration testing Integrate two or more module.i.e. communicate between the modules. Follow a white box testing (Testing the code)
Theory and Practice of Software Testing
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
1. Black Box Testing  Black box testing is also called functional testing  Black box testing ignores the internal mechanism of a system or component.
1 Software Testing and Quality Assurance Theory and Practice Chapter 6 Domain Testing.
Dynamic Testing.
HNDIT23082 Lecture 09:Software Testing. Validations and Verification Validation and verification ( V & V ) is the name given to the checking and analysis.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
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.
Software Testing and QA Theory and Practice (Chapter 5: Data Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Chapter 2 Sets and Functions.
Overview Theory of Program Testing Goodenough and Gerhart’s Theory
CS223: Software Engineering
Software Testing.
CompSci 230 Software Construction
Input Space Partition Testing CS 4501 / 6501 Software Testing
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 2 Theory of Program Testing
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 6 Domain Testing
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Lecture 09:Software Testing
Testing and Test-Driven Development CSC 4700 Software Engineering
Software testing.
Testing Overview References:
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Overview Functional Testing Boundary Value Testing (BVT)
Software Testing “If you can’t test it, you can’t design it”
UNIT-4 BLACKBOX AND WHITEBOX 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:

1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis

2 Overview  Theory of Program Testing  Goodenough and Gerhart’s Theory  Weyuker and Ostrand’s Theory  Gourlay’s Theory

3 Goodenough and Gerhart The theory provides: –A fundamental testing concept –Identification of few types of program errors –A framework for test data selection Proposed in 1975 and published in an IEEE TSE paper

4 Initial Comments In Goodenough’s theory, to find test data that reliably reveal errors, one must do the following: –Identify all conditions relevant to the correct operation of a program –Select test data to exercise all possible combinations of these conditions The above idea of selecting test data leads to the following terms: –Test data: Test data are actual values from a program’s input domain that collectively satisfy some selection criterion –Test predicate: A test predicate is a description of conditions and combinations of conditions relevant to the program’s correct operation Test predicates describe what aspects of a program are to be tested. Test data cause these aspects to be tested. Test predicates are the motivating force for test data selection Components of test predicates arise first and primarily from the specification of a program As implementations are considered, further conditions and predicates may be added

5 Fundamental Concepts T Program P P(d) d Input Domain D T is a subset of the domain D The result of executing P with input d is denoted as P(d)

6 Terminology - 1 OK(d): A predicate that is true if and only if P(d) is an acceptable outcome for the given input d. SUCCESSFUL(T): For a given T that is a subset of D, T is a successful test set if and only if for every t in T, OK(t). A test set T constitutes an ideal test if OK(t) for every t in T implies that OK(d) for every d in D. An ideal test is interpreted as a test set that is a sample of the input domain and can be used to conclude on the outcome of the whole domain.

7 Terminology - 2 Selection criterion C: A collection of predicates and properties that allow to select a particular test set data T form the domain D. –Reliable criterion C: Every test selected using a predicate in C is either successful, or no test selected by a predicate in C is successful. Reliability refers to consistency. –Valid criterion C: A selection criterion C is valid if and only if whenever program P is incorrect, then we can select through C a test set T that is not successful for P. –Theorem: If C is a reliable and valid criterion then any test case selected using C is an ideal test. –In practice it is difficult to find, if it exists, a reliable and valid criterion

8 Conditions for Reliable Criteria Selection The minimal conditions that need be satisfied for a test criterion to be considered reliable are: –Every individual branching condition in the program graph must be represented by an equivalent condition in C –Every potential termination condition in the program (i.e. an overflow) must be represented by a condition in C –Every condition relevant to the correct operation of the program that is implied by the specification and knowledge of the program’s structure, must be represented as a condition in C –Test predicates must be independentt

9 Comments The reasons that it is difficult (if not impossible) to find always a valid and reliable test include: –Faults are unknown apriori, so it is impossible to prove the reliability ans validity of a criterion. A criterion is guaranteed to be both reliable and valid is the one that selects the entire input domain. –Neither reliability nor validity is preserved during the debugging process, where faults keep disappearing (or new ones appear). –If the program P is correct (fault free), then any test will be successful and every selection criterion is reliable and valid –If the program P is not correct, there is in general n way of knowing whether a criterion is ideal without knowing the errors in P.

10 Terminology – 3 Let D be the input domain for program P. Let C denote s set of selection predicates such that if d D and d satisfies the predicate c C then we say c(d) is true. We can then define COMPLETE(C, T) as being a predicate such that: COMPLETE(C,T) = However, the definitions of an ideal test and thoroughness of a test do not reveal a relationship between them. The theory attempts to establish this relationship.

11 Program Error Classification in Goodenough’s Theory Logic Fault: Problems with program not the resources –Requirements fault –Design faults –Construction fault Missing control-flow paths Inappropriate path selection Inappropriate or missing action Performance fault

12 A Process towards Testing in Goodenough – Gerhart Theory Let B a set of faults in a program P, which are revealed by an ideal test T I. Also let the software tester to define a set of test predicates C 1, and design a set of test cases T 1, such that COMPLETE(C 1, T 1 ), and that these test cases T 1, reveal a set of faults B 1 that may be a subset of B. Incrementally, the tester may identify a larger set of predicates C 2 such that C 1 is a subset of C 2, and design a new set of test cases T 2, such that T 1 is a subset of T 2, and COMPLETE(C 2, T 2 ), revealing faults B 2 such that B 1 is a subset of B 2. Continuing incrementally the process the objective is to identify a set of predicates C k, a set of test cases T k, that satisfy COMPLETE(C k, T k ) and reveal B k in a way that T k approximates the ideal set T I

13 Failure Intensity Reduction Concept v0v0 Basic Log.  Mean failures exp.  failure intensity Initial failure intensity, 0 λ: Failure intensity λ 0 : Initial failure intensity at start of execution μ: Average total number of failures at a given point in time v0: Total number of failures over infinite time

14 Gourlay’s Theory The theory assumes that the program specifications are correct, and the specification is the sole arbiter of the correctness of a program. The program is said to be correct if it satisfies its specification. Gourlay’s theory aims to establish a relationship between three sets of entities namely specifications S, programs P, and Tests T. We can then extend the OK predicate as follows: –OK(p, t, s) : The predicate is true if the result of testing p with t is judged to be successful with respect to specification s. We aim to make the predicate OK(p, t, s) true for every t in T, where T is a subset of T In this context a program is correct with respect to its specifications denoted by CORR(p,s), iff OK(p, s, t) for every t in T.

15 Testing Systems - 1 A testing system is defined as a collection of for which for every p, s, t in P, S, T (where P, S, T are subsets of P, S, T ) CORR(p, s) implies OK(p, s, t). Given a testing system, we can define a new system, where T’ ` is the set of all subsets of T’, and where OK’(p, s, t) if and only if We call this system set construction system. The set construction corresponds to a test that consists of a set of trials, and success of the test as a whole depends on the success of all trials. Failure of any one run is enough to invalidate the test.

16 Testing Systems - 2 An another type of testing system is the choice construction. In particular, given a testing system, we can define a new system, where T’ ` is the set of all subsets of T’, and where OK’(p, s, t) if and only if The choice construction models the situation in which a test engineer is given a number of alternative ways of testing the program, all of which is assumed to be equivalent.

17 Test Methods A test method can be considered as a function M: P X S  T That is, in the general case, a test method takes a program P, and a specification S, and produces test cases T (where P, S, T are subsets of P, S, T respectively). Test methods can be: –Program Dependent T = M(P)  (white box testing) –Specification Dependent T = M(S)  (black box testing) –Expectation Dependent T = M(S’), where S’ are the expectations of the customers, or the view the customers have on the specifications  (Acceptance testing)

18 Power of Test Methods - 1 A fundamental problem in testing is to assess whether one test method is better than another (in recovering faults). Let M. N be two testing methods, and let F M, F N be the faults that can be discovered by M, N respectively. For M to be at least as good as N, we must have the situation that whenever N finds a fault, so does M. In other words F N is a subset of F M

19 Power of Test Methods - 2 Let T N, T M, be the test cases produced by methods N, M respectively. The “investigative” power of methods N, M can be classified in two cases: –Case 1: T N T M.. In this case, method M is at least as good as method N –Case 2: TN, TM overlap, but TN TM. This case suggests that TM does not totally contain TN and in order to compare their fault detection ability we execute program P under both test sets TN, TM. Let FN, FM be the sets of faults discovered by TN, TM. If FN FM then we say that method M is at least as good as N. These two cases are depicted in the following figures.

20 Power of Test Methods - 3 S P N M TMTM TNTN Case 1 S P N M TMTM TNTN P FMFM FNFN Case 2 P FMFM FNFN