Testing Techniques  Equivalence class analysis  Cause effect graphs  All pair testing.

Slides:



Advertisements
Similar presentations
Overview Functional Testing Boundary Value Testing (BVT)
Advertisements

Pairwise Testing. A case study (from Lee Copeland’ book) A web-based application has been written to work with eight different browsers – IE 5.0, 5.5,
Equivalence Class Testing
1 ECE 453 – CS 447 – SE 465 Software Testing & Quality Assurance Instructor Kostas Kontogiannis.
TRIANGLES AND TYPES OF TRIANGLES
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
Software Testing and Quality Assurance
Path testing Path testing is a “design structural testing” in that it is based on detailed design & the source code of the program to be tested. The methodology.
Equivalence Class Testing
1 Functional Testing Motivation Example Basic Methods Timing: 30 minutes.
January 27, 2002 ECEN5033 University of Colorado -- Class Testing 1 Specifying interactions Remainder of slides assume Operations defined by a class are.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Com1040 Systems Design and Testing Part II – Testing (Based on A.J. Cowling’s lecture notes) LN-Test3: Equivalence classes and boundary conditions Marian.
1 740f02frankl25 Evaluating Testing Methods by Delivered Reliability Frankl, Hamlet, Littlewood, Strigini IEEE TOSE Aug98.
Software Testing (Part 2)
CMSC 345 Fall 2000 Unit Testing. The testing process.
Black-Box Testing Techniques I Software Testing Lecture 4.
Requirements-based Test Generation for Functional Testing (© 2012 Professor W. Eric Wong, The University of Texas at Dallas) 1 W. Eric Wong Department.
Black-Box Testing Techniques I
Cause & Effect Graph Comparison Testing. Cause & Effect Graph This is basically a hardware testing technique adapted to software testing. It considers.
Sample Problems for Testing
1 Equivalence Class Testing Chapter 6. 2 Introduction Boundary Value Testing derives test cases with Massive redundancy Serious gaps Equivalence Class.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
Summarizing “Structural” Testing Now that we have learned to create test cases through both: – a) Functional (blackbox)and – b) Structural (whitebox) testing.
Testing Interactions Among Software Components Alan Williams School of Information Technology and Engineering, University of Ottawa
841f07frankl12oct21 Evaluating Testing Methods by Delivered Reliability Frankl, Hamlet, Littlewood, Strigini IEEE TOSE Aug98.
Software Testing Input Space Partition Testing. 2 Input Space Coverage Four Structures for Modeling Software Graphs Logic Input Space Syntax Use cases.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
Software testing techniques Spring 2009 Csci565: Theory and Practice of Software Testing1.
Triangle A polygon with three sides and three angles. A triangle can be names by its’ side lengths and angles. – Side lengths: isosceles, equilateral,
Equivalence Class Testing In chapter 5, we saw that all four variations of boundary value testing are vulnerable to –gaps of untested functionality, and.
CS451 Lecture 10: Software Testing Yugi Lee STB #555 (816)
Introduction to Software Testing Chapter 4 Input Space Partition Testing Paul Ammann & Jeff Offutt
1 Software Testing & Quality Assurance Lecture 5 Created by: Paulo Alencar Modified by: Frank Xu.
Path selection criteria Tor Stålhane & Wande Daramola.
1 © 2011 Professor W. Eric Wong, The University of Texas at Dallas Requirements-based Test Generation for Functional Testing W. Eric Wong Department of.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
1 Software Testing. 2 Equivalence Class Testing 3 The use of equivalence class testing has two motivations: –Sense of complete testing –Avoid redundancy.
Equivalence Class Testing Use the mathematical concept of partitioning into equivalence classes to generate test cases for Functional (Black-box) testing.
1 Test Coverage Coverage can be based on: –source code –object code –model –control flow graph –(extended) finite state machines –data flow graph –requirements.
Black Box Unit Testing What is black-box testing? Unit (code, module) seen as a black box No access to the internal or logical structure Determine.
Classifying Triangles. Two Ways to Classify Triangles  By Their Sides  By Their Angles.
Learning Objective Identify triangles using their sides.
A PRELIMINARY EMPIRICAL ASSESSMENT OF SIMILARITY FOR COMBINATORIAL INTERACTION TESTING OF SOFTWARE PRODUCT LINES Stefan Fischer Roberto E. Lopez-Herrejon.
Defect testing Testing programs to establish the presence of system defects.
Introduction to Software Testing. Introduction 2 Four Structures for Modeling Software Graphs Logic Input Space Syntax Use cases Specs Design Source Applied.
Cause & Effect Graph Comparison Testing
Chapter 3: Equivalence Class Testing :EC Software Testing
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Input Space Partition Testing CS 4501 / 6501 Software Testing
Paul Ammann & Jeff Offutt
CS5123 Software Validation and Quality Assurance
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Overview Functional Testing Boundary Value Testing (BVT)
Paul Ammann & Jeff Offutt
Paul Ammann & Jeff Offutt
Equivalence Class Testing
CSCE 747 Software Testing and Quality Assurance
CSCE 747 Software Testing and Quality Assurance
ISP Coverage Criteria CS 4501 / 6501 Software Testing
Overview Functional Testing Boundary Value Testing (BVT)
Types of Triangles Thursday, 11 April 2019.
Types of Triangles Thursday, 11 April 2019.
Evaluating Testing Methods by Delivered Reliability
CSE 1020:Software Development
Classifying Triangles
Area and Perimeter Triangles.
Presentation transcript:

Testing Techniques  Equivalence class analysis  Cause effect graphs  All pair testing

Equivalence classes

Triangle Problem Read 3 integer values in range [1..200]. These 3 values represent the length of the sides of a triangle. The programme displays a message which establishes that the triangle is isosceles, equilateral or scalene.

Triangle Problem we are interested in 4 questions: – Is it a triangle? – Is it an isosceles? – Is it a scalene? – Is it an equilateral? We may define the input test data by defining the equivalence class through “viewing” the 4 output groups: – input sides do not form a triangle – input sides form an isosceles triangle – input sides form a scalene triangle – input sides form an equilateral triangle

Valid Classes

Non Valid Classes

Could you find other non valid classes ?

Cause effect graph

Methodology

Triangle example

Triangle Problem

Cause Effect Graph

Decision Table

Test cases

All pairs testing Based on orthogonal Array Drastically reduces number of test cases A combination of worst cases and equivalence class testing Well supported in the agile methods community Supported by commercial and non- commercial products

What Does All Pairs Do? Input is a set of equivalence classes for each variable. Sometimes the equivalence classes are those used in Boundary Value testing (min, min+, nominal, max-, max) Output is a set of (partial) test cases that approximate an orthogonal array, plus some pairing information. Why partial? No expected outputs are provided. natural enough, but a tester still needs to do this step.

All Pairs Assumptions Variables have clear equivalence classes. Variables are independent. Failures are the result of the interaction of a pair of variable values.

Example Suppose that we have three parameters. For each parameter, there are two possible values. – Values are : A, B for parameter 1. J, K for parameter 2. Y, Z for parameter 3. Degree of interaction coverage is 2. – We want to cover all potential 2-way interactions among parameter values.

Set of all possible test configurations AJY AKZ AKY AJZ KYB BZJ BYJ KZB There are 2 3 = 8 possible test configurations. Three parameters, two values for each.

Set of all possible degree 2 interaction elements Coverage measure: – Percentage of interaction elements covered. There are ( )  2 2 = 12 possible interaction elements. 3 2 AJ BK BJ AK AY AZ BZ BY JY KZ KY JZ

Test configurations as sets of interactions AJY AJ AY JY One test configuration... … covers 3 possible interaction elements.

…using a subset of all test configurations. Interaction test coverage goal Goal: cover all interaction elements… AJY KYB AKZ AKY AJZ BZJ BYJ KZB AJ BK BJ AK AY AZ BZ BY JY KZ KY JZ

AJY KYB AKZ AKY AJZ BZJ BYJ KZB AJ BK BJ AK AY AZ BZ BY JY KZ KY JZ Selection of test configurations for coverage of interaction elements Interaction elementsTest configurations AJAYJY AJY Degree 2 coverage: 3 / 12 = 25% Degree 3 coverage: 1 / 8 = 12.5%

AK AK AJY KYB AKZ AKY AJZ BZJ BYJ KZB AJ BK BJ AY AZ BZ BY JY KZ KY JZ Selection of test configurations for coverage of interaction elements Interaction elementsTest configurations AKZ AZKZ Degree 2 coverage: 6 / 12 = 50% Degree 3 coverage: 2 / 8 = 25%

AJY KYB AKZ AKY AJZ BZJ BYJ KZB AJY AKZ AJ BK BJ AK AY AZ BZ BY JY KZ KY JZ Selection of test configurations for coverage of interaction elements Interaction elementsTest configurations BZJ BJBZJZ Degree 2 coverage: 9 / 12 = 75% Degree 3 coverage: 3 / 8 = 37.5%

AJY KYB AKZ AKY AJZ BZJ BYJ KZB AJY AKZ BZJ AJ BK BJ AK AY AZ BZ BY JY KZ KY JZ Selection of test configurations for coverage of interaction elements Interaction elementsTest configurations BKBYKY KYB Degree 2 coverage: 12 / 12 = 100% Degree 3 coverage: 4 / 8 = 50%

Choosing the degree of coverage In one experiment, covering 2 way interactions resulted in the following average code coverage: – 93% block coverage. – 83% decision coverage. – 76% c-use coverage. – 73% p-use coverage. – Source: Cohen, et al, “The combinatorial design approach to automatic test generation”, IEEE Software, Sept Another experience report investigating interactions among 2-4 components: – Dunietz, et al, “Applying design of experiments to software testing”, Proc. Of ICSE ‘97.

Online Mortgage Application (Thanks, Bernie Berger, STAREast) Region tier Property Credit Residence LTVNIVNAV Refinance Closing Cost Intro Rate Bank Emp

Twelve variables, with varying numbers of values, have 7 x 6 x 6 x 5 x 3 x 3 x 2 x 2 x 2 x 2 x 2 x 2 = 725,760 combinations of values. “All Pairs does it in 50.” (Bernie Berger, STAREast2003) Total number of combinations

NY NJ NY Other L M L M H+1 H H+2 H+1 1 fam 2 fam 1 fam ~Coop 2 fam 3 fam Condo A+ A A- B B ~B ~A- <B Pri Vac Inv Pri ~Inv ~Vac ~Pri ~Vac 80% 90% 100% 90% ~80% ~100% ~80% ~90% Yes No Yes No ~No ~Yes ~No Yes No Yes ~No Yes No Yes No ~Yes ~No ~Yes Cust Bank Cust ~Cust Yes No Yes No ~Yes ~No Yes No Yes ~Yes ~No Selected All Pairs Test Cases (note fault resolution!)

Mortgage Application Observations The example uses values, not equivalence classes. Values are independent, System level testing (apparently). The efficiency comes at the expense of fault isolation. There are 2 C 12 = 12!/(2! x (12 - 2)!) = 66 pairs in the first row of the table. If that test case fails, which of the 66 pairs caused the failure? NB: excellent candidate for regression testing

What if the fault involves more than just a pair of variables? pCn 1 12   2^  1  4095 pCn  n! p!(n  p)! Number of combinations of n things taken p at a time is Worst case (for first test case):