Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise Testing Comes of Age George B. Sherwood, Ph.D. Thursday May 8, 1:30 p.m.

Slides:



Advertisements
Similar presentations
Formal Methods and Testing Goal: software reliability Use software engineering methodologies to develop the code. Use formal methods during code development.
Advertisements

Orthogonal Arrays Testing Strategy (OATS) Mohamed Fathy QA Engineer Arx ICT September 4, 2009.
CSE 1302 Lecture 23 Hashing and Hash Tables Richard Gesick.
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,
1 An Adaptive GA for Multi Objective Flexible Manufacturing Systems A. Younes, H. Ghenniwa, S. Areibi uoguelph.ca.
Generating Random Numbers
Inpainting Assigment – Tips and Hints Outline how to design a good test plan selection of dimensions to test along selection of values for each dimension.
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory 123 “True” Constrained Minimization.
CSCI 347 / CS 4206: Data Mining Module 07: Implementations Topic 03: Linear Models.
IPOG: A General Strategy for T-Way Software Testing
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
©GoldSim Technology Group LLC., 2012 Optimization in GoldSim Jason Lillywhite and Ryan Roper June 2012 Webinar.
Artificial Intelligence in Game Design Introduction to Learning.
Today’s Agenda  HW #1 Due  Quick Review  Finish Input Space Partitioning  Combinatorial Testing Software Testing and Maintenance 1.
Ashish Gupta Under Guidance of Prof. B.N. Jain Department of Computer Science and Engineering Advanced Networking Laboratory.
Optimizing General Compiler Optimization M. Haneda, P.M.W. Knijnenburg, and H.A.G. Wijshoff.
Implicit Hitting Set Problems Richard M. Karp Harvard University August 29, 2011.
CSE 830: Design and Theory of Algorithms
Rick Kuhn Computer Security Division
A General approach to MPLS Path Protection using Segments Ashish Gupta Ashish Gupta.
Solving the Protein Threading Problem in Parallel Nocola Yanev, Rumen Andonov Indrajit Bhattacharya CMSC 838T Presentation.
Testing an individual module
Introducing Hashing Chapter 21 Copyright ©2012 by Pearson Education, Inc. All rights reserved.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
A General approach to MPLS Path Protection using Segments Ashish Gupta Ashish Gupta.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 2 Ryan Kinworthy CSCE Advanced Constraint Processing.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Data Structures and Programming.  John Edgar2.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 9 Functional Testing
Testcover.com Copyright © 2005 Testcover.com, LLC. All rights reserved. The Bug Stops Here Improving Test Design with a Novel Test Case Generator Technical.
1 Joe Meehean. 2 Testing is the process of executing a program with the intent of finding errors. -Glenford Myers.
Metaheuristics The idea: search the solution space directly. No math models, only a set of algorithmic steps, iterative method. Find a feasible solution.
January 27, 2002 ECEN5033 University of Colorado -- Class Testing 1 Specifying interactions Remainder of slides assume Operations defined by a class are.
System/Software Testing
The Design Discipline.
1 Solid State Storage (SSS) System Error Recovery LHO 08 For NASA Langley Research Center.
An Introduction to MBT  what, why and when 张 坚
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2011 See online syllabus (also available through BlueLine): Course goals:
Object-Oriented Software Engineering, Ch. 9
CMSC 345 Fall 2000 Unit Testing. The testing process.
Software Engineering Chapter 23 Software Testing Ku-Yaw Chang Assistant Professor Department of Computer Science and Information.
Black-Box Testing Techniques I
Testcover.com 1 Embedded Functions in Combinatorial Test Designs George B. Sherwood Copyright © 2015 Testcover.com, LLC. All rights reserved.
Testing Testing Techniques to Design Tests. Testing:Example Problem: Find a mode and its frequency given an ordered list (array) of with one or more integer.
Decision Trees. MS Algorithms Decision Trees The basic idea –creating a series of splits, also called nodes, in the tree. The algorithm adds a node to.
Boolean Minimizer FC-Min: Coverage Finding Process Petr Fišer, Hana Kubátová Czech Technical University Department of Computer Science and Engineering.
Today’s Agenda  Reminder: HW #1 Due next class  Quick Review  Input Space Partitioning Software Testing and Maintenance 1.
Testcover.com 1 Functional Dependence and Equivalence Class Factors in Combinatorial Test Designs George B. Sherwood Copyright © 2014 Testcover.com, LLC.
CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko ( )
Robust System Design Session #11 MIT Plan for the Session Quiz on Constructing Orthogonal Arrays (10 minutes) Complete some advanced topics on OAs Lecture.
Schreiber, Yevgeny. Value-Ordering Heuristics: Search Performance vs. Solution Diversity. In: D. Cohen (Ed.) CP 2010, LNCS 6308, pp Springer-
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Test Case Designing UNIT - 2. Topics Test Requirement Analysis (example) Test Case Designing (sample discussion) Test Data Preparation (example) Test.
Mixed Covering Arrays on Graphs Presenter: Latifa Zekaoui Joint work with Karen Meagher and Lucia Moura to appear in the Journal of Combinatorial Designs.
Computer Sciences Department1.  Property 1: each node can have up to two successor nodes (children)  The predecessor node of a node is called its.
CPSC 871 John D. McGregor Module 6 Session 2 Validation and Verification.
A Brief Maximum Entropy Tutorial Presenter: Davidson Date: 2009/02/04 Original Author: Adam Berger, 1996/07/05
ECE450 - Software Engineering II1 ECE450 – Software Engineering II Today: Key Principles of Software Architecture and Design (II) adapted from Dave Penny’s.
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.
Types for Programs and Proofs
Ryan Lekivetz JMP Division of SAS Abstract Covering Arrays
Effective Test Design Using Covering Arrays
ECE 445 – Computer Organization
IPOG: A General Strategy for T-Way Software Testing
Chapter 10 – Software Testing
Software metrics.
Presentation transcript:

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise Testing Comes of Age George B. Sherwood, Ph.D. Thursday May 8, 1:30 p.m. T14 Pairwise Testing

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise Testing Comes of Age

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Évariste Galois French mathematician, studied abstract algebra & group theory Radical Republican during the reign of Louis Philippe Short life with tragic ending: 1829 Father committed suicide Failed entry to École Polytechnique 1830 Expelled from École Normale for criticizing director 1831 Imprisoned for wearing illegal uniform 1832 Rejected by Stéphanie- Felice du Motel Shot in duel at age 20

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. 21 st Century Testing Increasing dependency on software, networks and distributed applications Increasing expectation and need for quality Facts of life: More features and complexity Shorter development cycles More reuse of components

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Why Pairwise Testing? Statistical coverage to find faults ̶ Improved quality Small number of test cases ̶ Reduced cost

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise Testing Example Test 3 new applications on a networked computer 4 test configuration factors with 3 values 3 4 =81 configurations in total – too many 3 configurations cover all values individually – but only a few interactions

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise Testing Includes all pairs of interactions between test factors Provides a small set of test cases – a practical alternative to testing all combinations Started almost 20 years ago Increasingly popular way to improve quality and reduce cost

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Galois Field Example Modulo 3 arithmetic – GF(3) Usual + or x, divide by 3 & take remainder Use GF(3) tables to make orthogonal array

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Orthogonal Array OA(9;3 3 ) Replace each element in the x table with the corresponding column from the + table

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Orthogonal Array OA(9;3 4 ) Add one column which pairs a different value with every 3 rows

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Networked Computer Example 4 test configuration factors with 3 values Replace numbers in OA(9;3 4 ) template with test factor values

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Networked Computer Example Only 9 configurations are needed to cover all 54 pairs of values using OA(9;3 4 )

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Design of Experiments Ronald A. Fisher analyzed data from crop yield experiments Developed new statistical methods to study experimental data Pioneered the mathematical principles of experimental design

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Orthogonal Arrays Orthogonal Array designs are used in agricultural & manufacturing experiments, clinical trials, market research… Results can show effects of factors and how they interact Calyampudi Radhakrishna Rao introduced Orthogonal Arrays

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. OAs for Manufacturing Genichi Taguchi adapted Fisher’s experimental design to improve quality of manufactured goods Used OAs to select test parameters in creative ways Worldwide influence in improving manufactured quality

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. OAs for Software Test Keizo Tatsumi, Robert Mandl & others applied these ideas to software testing Taguchi visited Bell Labs and collaborated with Madhav Phadke Orthogonal Array Test System (OATS) offered statistical coverage where exhaustive testing was not possible

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. StarLAN and StarGROUP Client installation test 101 combinations of PCs and OS versions 15 network cards Tried to use OATS to reduce number of test configurations OATS could not handle our complex configuration constraints correctly Generated impossible tests, as in previous example

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Networked Computer Example Two of the 9 configurations from OA(9;3 4 ) are invalid

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. What to do? Skip the bad cases? Then for each case there is no coverage for 5 good pairs, along with the invalid one Replace values ‘Linux’, ‘OS X’ or ‘Int Explorer’ to avoid bad pairs? Still miss good pairs Solution: Computer search for small number of cases to cover all allowed pairs.

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Networked Computer Example 11 configurations cover 52 allowed pairs

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Constrained Array Test System Search among allowed test cases to handle constraints Find next “best” test case to minimize uncovered pairs Secondary result: fewer test cases than OATS

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Types of Arrays

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Early Tools

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise Selection of Input Data Identify equivalence classes Analyze functional requirements, use cases Partition factor value combinations for equivalent processing and expected results Generate test cases for different classes separately All pairs from each class go to same resulting state Example: Don’t mix error combinations with normal combinations

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Uncle Katzendogg’s Guaranteed Long-term Weather Forecasts

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Weather Forecast Example 4 test factors: Month, Day, Year, Zip code 3 sets of test cases leading to different states: 1.Valid dates with valid zip codes ̶ Forecast returned 2.Invalid dates with valid zip codes ̶ Date error returned 3.Valid dates with invalid zip codes ̶ Zip code error returned

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Weather Forecast Valid Input Factor Values

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Weather Forecast Valid Input Test Cases

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Weather Forecast Invalid Date Factor Values

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Weather Forecast Invalid Date Test Cases

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Weather Forecast Invalid Zip Code Test cases Factor values

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise Testing Today Test demands continue to grow Pairwise testing is a popular response for effective coverage with a limited number of test cases Improved training is needed, e.g. to handle constraints, equivalence classes Careless use has led to controversy

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise.org Tools List – part 1

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise.org Tools List – part 2

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Bach & Schroeder “Pairwise Testing: A Best Practice that Isn’t” Useful criticism of careless pairwise testing MS Word options example –

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Pairwise Testing Efficiency Pairwise generators are more efficient than random test case selection Significant improvements in pairwise efficiency are possible Practitioners need pairwise testing to meet modern testing challenges

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. How do Searches Work? Uncovered pairs Factor values ? Test cases Go to the space of all possible test cases Look for small number of test cases (short path) to minimize the uncovered pairs

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Search Variations Several algorithms for different tradeoffs Test practitioner goals: Few test cases Quick responses Practicality – mixed values, constraints Researcher goals: Fewer test cases More factors New methods, better solutions

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Finding the Minimal Set of Test Cases is Hard ? Mixed covering array constructions can complement searches using less processing Typically searches are CPU bound Improvement diminishes with processing time

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Change Mixed CA Values Without Searching Example: Change OA(9;3 4 ) to CA(12; ) Reduce the number of values in two of the factors Increase the number of values in one factor

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. OA(9;3 4 ) to CA(9; ) Replace all the 2s in any 2 factors with unassigned (*) values

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. CA(9; ) to CA(12; ) Add 3 rows with 3s to one of the factors with 3 values For each of the other factors, pair its values with the 3s in the new rows

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. More CA Factors from Products and Searches Product sequence: OA(9;3 4 ), CA(15;3 15 ), CA(21;3 57 ), … Nurmela’s tabu search: CA(15;3 20 ) Products using tabu search result: CA(15;3 20 ), CA(21;3 74 ), CA(27;3 282 ), … Combined methods give better results

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Optimal Mixed CAs & More Factors Add n test cases to OA(25;5 6 ) to get optimal array Each factor of 5 values can be replaced by the indicated factors without additional test cases Example: Replace 3 factors in CA(35; ) to get CA(35; )

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Mixed Covering Arrays Compared with OA templates More choices for numbers of values Fewer test cases typically Compared with greedy search Faster responses (less processing) Fewer test cases when CAs are optimal Search needed for constraints

Testcover.com Copyright © 2008 Testcover.com, LLC. All rights reserved. Future Pairwise Trends Platforms: Faster, distributed processing Tool Software: Smarter searches, less processing Fewer test cases Improved test efficiency Faster responses What-if test designs, test changes Use with agile, incremental cycles