E 2 ESQuaReD Software Product Line Testing Part IV : A Framework for Variability Coverage Myra CohenMatthew Dwyer Laboratory for Empirically-based Software.

Slides:



Advertisements
Similar presentations
G5BAIM Artificial Intelligence Methods
Advertisements

13-Optimization Assoc.Prof.Dr. Ahmet Zafer Şenalp Mechanical Engineering Department Gebze Technical.
Local Search Algorithms Chapter 4. Outline Hill-climbing search Simulated annealing search Local beam search Genetic algorithms Ant Colony Optimization.
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,
Neural and Evolutionary Computing - Lecture 4 1 Random Search Algorithms. Simulated Annealing Motivation Simple Random Search Algorithms Simulated Annealing.
IPOG: A General Strategy for T-Way Software Testing
Combinatorial Testing Using Covering Arrays - Going Beyond Pairwise Testing Raghu Kacker, NIST Yu Lei, UTA 5/15/06.
Gizem ALAGÖZ. Simulation optimization has received considerable attention from both simulation researchers and practitioners. Both continuous and discrete.
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) February, 9, 2009.
Spie98-1 Evolutionary Algorithms, Simulated Annealing, and Tabu Search: A Comparative Study H. Youssef, S. M. Sait, H. Adiche
Tabu Search for Model Selection in Multiple Regression Zvi Drezner California State University Fullerton.
Local search algorithms
1 Optimisation Although Constraint Logic Programming is somehow focussed in constraint satisfaction (closer to a “logical” view), constraint optimisation.
Nature’s Algorithms David C. Uhrig Tiffany Sharrard CS 477R – Fall 2007 Dr. George Bebis.
MAE 552 – Heuristic Optimization
Jan 6-10th, 2007VLSI Design A Reduced Complexity Algorithm for Minimizing N-Detect Tests Kalyana R. Kantipudi Vishwani D. Agrawal Department of Electrical.
MAE 552 – Heuristic Optimization Lecture 10 February 13, 2002.
D Nagesh Kumar, IIScOptimization Methods: M1L4 1 Introduction and Basic Concepts Classical and Advanced Techniques for Optimization.
Algorithm design techniques
Metaheuristics The idea: search the solution space directly. No math models, only a set of algorithmic steps, iterative method. Find a feasible solution.
Elements of the Heuristic Approach
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Genetic Algorithm.
Optimization in Engineering Design Georgia Institute of Technology Systems Realization Laboratory Mixed Integer Problems Most optimization algorithms deal.
E 2 ESQuaReD Software Product Line Testing Part V : SPL-Driven Test Processes Myra CohenMatthew Dwyer Laboratory for Empirically-based Software Quality.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Search Methods An Annotated Overview Edward Tsang.
Optimization Problems - Optimization: In the real world, there are many problems (e.g. Traveling Salesman Problem, Playing Chess ) that have numerous possible.
Charles J. Colbourn Computer Science and Engineering Arizona State University, Tempe, AZ Charles J. Colbourn Computer Science and Engineering Arizona State.
Simulated Annealing.
Heuristic Optimization Methods Greedy algorithms, Approximation algorithms, and GRASP.
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
Hyper-heuristics. 2 Outline Hyper-heuristics Hyper-heuristics for strip packing Hyper-heuristics for Stock forecasting Conclusion.
1 Contents 1. Statement of Timetabling Problems 2. Approaches to Timetabling Problems 3. Some Innovations in Meta-Heuristic Methods for Timetabling University.
Mathematical Models & Optimization?
Applications of Dynamic Programming and Heuristics to the Traveling Salesman Problem ERIC SALMON & JOSEPH SEWELL.
Local Search Algorithms
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko ( )
G5BAIM Artificial Intelligence Methods
Single-solution based metaheuristics. Outline Local Search Simulated annealing Tabu search …
Local Search and Optimization Presented by Collin Kanaley.
A local search algorithm with repair procedure for the Roadef 2010 challenge Lauri Ahlroth, André Schumacher, Henri Tokola
Optimization Problems
Heuristic Methods for the Single- Machine Problem Chapter 4 Elements of Sequencing and Scheduling by Kenneth R. Baker Byung-Hyun Ha R2.
Mixed Covering Arrays on Graphs Presenter: Latifa Zekaoui Joint work with Karen Meagher and Lucia Moura to appear in the Journal of Combinatorial Designs.
An Introduction to Simulated Annealing Kevin Cannons November 24, 2005.
Chapter 5. Advanced Search Fall 2011 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Lecture 6 – Local Search Dr. Muhammad Adnan Hashmi 1 24 February 2016.
CPSC 322, Lecture 16Slide 1 Stochastic Local Search Variants Computer Science cpsc322, Lecture 16 (Textbook Chpt 4.8) Oct, 11, 2013.
Optimization Problems
Heuristic Optimization Methods
Meta-heuristics Introduction - Fabien Tricoire
Local Search Algorithms
ME 521 Computer Aided Design 15-Optimization
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
General Purpose Procedures Applied to Scheduling
Optimization Problems
Metaheuristic methods and their applications. Optimization Problems Strategies for Solving NP-hard Optimization Problems What is a Metaheuristic Method?
Multi-Objective Optimization
IPOG: A General Strategy for T-Way Software Testing
School of Computer Science & Engineering
Subset of Slides from Lei Li, HongRui Liu, Roberto Lu
Algorithms for Budget-Constrained Survivable Topology Design
Chapter 5. Advanced Search
Artificial Intelligence
Automatic Test Generation for N-way Combinatorial Testing
IPOG: A general strategy for t-way software testing by Lei, Yu, IEEE /2/2019 Mehra N Borazjany.
Local Search Algorithms
Presentation transcript:

e 2 ESQuaReD Software Product Line Testing Part IV : A Framework for Variability Coverage Myra CohenMatthew Dwyer Laboratory for Empirically-based Software Quality Research Department of Computer Science University of Nebraska - Lincoln Work supported by NSF CCF through awards and , by the U.S. Army Research Office through award DAAD and by an NSF EPSCoR FIRST award.

2 Outline Software Product Lines : What and Why? Modeling Variability in Software Product Lines Validating Product Lines A Framework for Variability Coverage Toward Product Line Driven Test Processes

3 Outline A Framework for Variability Coverage 1.Adapting Covering Arrays to Real Systems 2.Building Covering Arrays 1.Overview 2.One-row-at-a-time Greedy Algorithms 3.Meta-heuristic Search

4 CA(9;2,4,3) ( also an OA(2,4,3)) ConfigBrowserOSConnectionPrinter 1NetscapeWindows XPLANLocal 2NetscapeLinuxISDNNetworked 3NetscapeOS XPPPScreen 4IEWindows XPISDNScreen 5IEOS XLANNetworked 6IELinuxPPPLocal 7MozillaWindowsPPPNetworked 8MozillaLinuxLANScreen 9MozillaOS XISDNLocal A set of product line instances that covers all pair-wise interactions.

5 Interaction Strength We can quantify the “coverage” for a particular interaction strength. Example: –4 factors –Each has 3 values –Quantify 2-way coverage Any single test case can cover at most or 6 possible pairs. The system has or 54 pair-wise interactions. The addition of one new test can contribute at most 6/54 or 11.1% pair wise coverage.

6 Adaptations for Real Systems So far we have seen a covering array with v symbols. This means each factor has the same number of values. BUT: This is usually not the case in a real system. Model : Civic, Accord Package : Sedan, Coupe, Hybrid, GX, Si Transmission : manual, auto, cvt Power : gas, hybrid, natural gas Doors : 2, 4 Cylinders : 4, 6 Nav system : Y/N

7 Mixed Level Covering Arrays MCA (N;t,k,(v 1,v 2,…,v k )) Is an N x k array on v symbols where: v = And: –For each column i where (i  i  k) –The rows of each N x t sub-array cover all t-tuples or values from the t columns at least times. Shorthand Notation: MCA (N;t,(w 1 k 1 w 2 k 2 …w s k s )) Example: MCA(12;2,4,(4, 3,3,2))  MCA(12;2,( ))

8 MCA(12;2, ) NetscapeWindows XPLANLocal MozillaOS XISDNNetworked SafariLinuxPPPNetworked MozillaLinuxLANLocal NetscapeOS XPPPLocal IEWindows XPISDNNetworked IEOS xLANNetworked SafariWindows XPISDNNetworked NetscapeLinuxISDNLocal MozillaWindows XPPPPLocal SafariOS XLANLocal IELinuxPPPNetworked

9 MCA(12;2, ) NetscapeWindows XPLANLocal MozillaOS XISDNNetworked SafariLinuxPPPNetworked MozillaLinuxLANLocal NetscapeOS XPPPLocal IEWindows XPISDNNetworked IEOS xLANNetworked SafariWindows XPISDNNetworked NetscapeLinuxISDNLocal MozillaWindows XPPPPLocal SafariOS XLANLocal IELinuxPPPNetworked

10 Limitation Mixed level covering arrays are closer to real systems; they can be used for an arbitrary software system. But they view a system flatly. They force a (perhaps arbitrary) restriction on the importance of various parts of the system.

11 Scenarios 1.When testing a software system certain components may be closely interrelated. This may be determined by static analysis. 2.Operational profiles give us information that certain areas of the system are used more often than others. 3.In modifying a system only certain regions are changed therefore we want to test more strongly in this area. 4.Failures in certain parts of a system are more costlier than in others.

12 Possible Models t=2 t=3 t=4

13 Some Possible Models t=2 t=3 t=2 t=3 t=4 t=3 t=4

14 An Initial Model strength 2 array A (Browser) Netscape IE Mozilla C(Connection) LAN PPP B (OS) Windows XP OS X Linux D (Printer) Local Networked Strength 3 array

15 Variable Strength Covering Arrays MCA(9;2, ) B D A C 0,1,2 3,4,5 6,7 8,9 ABCD t=2 t=3 A 3-way array would have 18 rows

16 Variable Strength Covering Arrays MCA(9;2, ) Additional rows to guarantee subset of 3- way coverage B D A C 0,1,2 3,4,5 6,7 8,9 ABCD *378 2*469 1*568 t=2 t=3

17 Variable Strength Covering Array A VCA(N;t,k,(v 1,v 2,…v k ), C) is a t-way mixed level covering array on v symbols with a vector, C, of covering arrays each with strength > t and defined on a subset of the k columns of the VCA.

18 V VP Intrusion Detection VP Door Locks Camera Surveillance Motion Sensors Cullet Detection Basic Advanced Keypad Fingerprint Scanner Security Package VP VVVVVV requires_v_v Adding Constraints

19 Intrusion Detection AIntrusion Detection B Security Package Door Locks Camera SurveillanceNoneAdvancedFingerprint Scanner Motion SensorsCullet DetectionAdvancedFingerprint Scanner Camera SurveillanceCullet DetectionAdvancedKeypad Motion SensorsNoneBasicKeypad Camera SurveillanceCullet DetectionBasicFingerprint Scanner Constrained Set of Product Instances “Basic requires Motion Sensors and Keypad” “Basic excludes Cullet Detection” Adding Constraints

20 Intrusion Detection AIntrusion Detection B Security Package Door Locks Camera SurveillanceNoneAdvancedFingerprint Scanner Motion SensorsCullet DetectionAdvancedFingerprint Scanner Camera SurveillanceCullet DetectionAdvancedKeypad Motion SensorsNoneBasicKeypad Camera SurveillanceCullet DetectionBasicFingerprint Scanner Constrained Set of Product Instances “Basic requires Motion Sensors and Keypad” “Basic excludes Cullet Detection” Adding Constraints

21 Intrusion Detection AIntrusion Detection B Security Package Door Locks Camera SurveillanceNoneAdvancedFingerprint Scanner Motion SensorsCullet DetectionAdvancedFingerprint Scanner Camera SurveillanceCullet DetectionAdvancedKeypad Motion SensorsNoneBasicKeypad Camera SurveillanceCullet DetectionBasicFingerprint Scanner Constrained Set of Product Instances “Camera Surveillance requires Fingerprint Scanner” Another set of Constraints

22 Intrusion Detection AIntrusion Detection B Security Package Door Locks Camera SurveillanceNoneAdvancedFingerprint Scanner Motion SensorsCullet DetectionAdvancedFingerprint Scanner Camera SurveillanceCullet DetectionAdvancedKeypad Motion SensorsNoneBasicKeypad Camera SurveillanceCullet DetectionBasicFingerprint Scanner Motion SensorsCullet DetectionAdvancedKeypad Constrained Set of Product Instances “Camera Surveillance requires Fingerprint Scanner” Another set of Constraints

23 Constraints in our Original Example “Mozilla does not run on Linux” “Linux does not support print to the screen” Test CaseBrowserOSConnectionPrinter 1NetscapeWindows XPLANLocal 2NetscapeLinuxISDNNetworked 3NetscapeOS XPPPScreen 4IEWindows XPISDNScreen 5IEOS XLANNetworked 6IELinuxPPPLocal 7MozillaWindows XPPPPNetworked 8MozillaLinuxLANScreen 9MozillaOS XISDNLocal

24 Constraints in our Original Example “Mozilla does not run on Linux” “Linux does not support print to the screen” Test CaseBrowserOSConnectionPrinter 1NetscapeWindows XPLANLocal 2NetscapeLinuxISDNNetworked 3NetscapeOS XPPPScreen 4IEWindows XPISDNScreen 5IEOS XLANNetworked 6IELinuxPPPLocal 7MozillaWindows XPPPPNetworked 8MozillaLinuxLANScreen 8MozillaOS XISDNLocal 9IELinuxLANLocal 10NetscapeWindows XPLANScreen

25 Other Practical Issues Seeded or default instances. Aggregate factors. Cost of testing specific instances. –May consider order of validating instances and set- up costs.

26 Outline : Interaction Testing in Practice A Framework for Variability Coverage 1.Adapting Covering Arrays to Real Systems 2.Building Covering Arrays 1.Overview 2.One-row-at-a-time Greedy Algorithms 3.Meta-heuristic Search

27 Combinatorial Results How do we know the covering array number (CAN)? How can we find the a subset of product instances that satisfies the properties of a covering array?

28 Results on Covering Arrays There are two types of results: 1. Probabilistic: We can prove a bound exists but can’t necessarily create the subset. Only useful for finding the CAN.

29 Results on Covering Arrays There are two types of results: 2. Constructive: prove a new bound by giving a direct or algebraic construction. –Often recursive in nature. –Requires extensive mathematical knowledge. –Only works for certain values of t, k, v.

30 Constructive Results Although direct or algebraic constructions often give us the smallest subset for a covering array, they are not general. There are less constructions for mixed level covering arrays and none yet for variable strength arrays.

31 Computational Search These are constructive techniques. Pros: –They are general. –They extend easily to mixed level and can be adapted for variable strength, and seeds. Cons: –May not always give us the optimal CAN size. –May take a long computational time to find a CA.

32 Computational Search The problem of finding whether a minimal covering array exists for a given size is a difficult problem. Variants of this problem have been formulated and shown to be NP Hard problems. We cannot exhaustively search for a solution!

33 Algorithmic Techniques Greedy algorithms: AETG - Automatic Efficient Test Case Generator TCG - Test Case Generator DDA -Deterministic Density Algorithm IPO - In Parameter Order Heuristic/Meta-heuristic Search: Hill Climbing Simulated Annealing Genetic Algorithms Tabu Search

34 Some Available Tools AETG - Telcordia, Inc.: Commercial product WHITCH - Alan Hartman: Eclipse plugin. It includes a tool called CTS (uses algebraic constructions) and a tool called tofu. You can plug in your own algorithms as well. TestCover - George Sherwood: Commercial tool: uses algebraic constructions. Has a student use license available. TConfig - Alan Williams: Uses algebraic constructions. Also includes an implementation of IPO.

35 Outline : Interaction Testing in Practice A Framework for Variability Coverage 1.Adapting Covering Arrays to Real Systems 2.Building Covering Arrays 1.Overview 2.One-row-at-a-time Greedy Algorithms 3.Meta-heuristic Search

36 Greedy Algorithms One class of greedy algorithms add one- row at a time until the covering array is complete. The algorithms included in this brief overview include: AETG, TCG, DDA

37 One Row at a Time Greedy Algorithms... M Candidates y z... x 1…………………………….k use factor ordering to select values … … N add rows until all t-sets covered select best instance to add

38 AETG The commercial AETG tool is patented. It uses some algebraic constructions, handles constraints and includes some post-processing steps. The original algorithm is presented next, but it does not include these improvements.

39 AETG Summary For each test case create M (50) new test cases. For each of the M test cases –Permute the order of the factors so that the first column has a symbol with the largest number of uncovered pairs. We fix this symbol and column. Randomly permute the rest. –Fill in the values for factors in the permutation order For each factor choose the symbol that creates the most new pairs with the other columns already filled. Select the product instance (from M) which covers the most new pairs.

40 AETG Pairs Covered: 3,60,5 3,70,8 3,100,11 6,75,8 6,105,11 7,108,11 Factor Ordering: 3,2,4,1

41 AETG Pairs Covered: 3,60,5 3,70,8 3,100,11 6,75,8 6,105,11 7,108,11 Factor Ordering: 3,2,4,1 SELECT Value 10

42 Other Members of the Framework TCG - Test Case Generator (Tung and Aldiwan) DDA - Deterministic Density Algorithm (Colbourn, Cohen, Bryce)

43 TCG Sorts factors in decreasing order of number of values. Always fills in the values in this order. When there is a tie between two values the one that has been used least often is selected.

44 TCG

45 TCG SELECT value 5

46 Outline : Interaction Testing in Practice A Framework for Variability Coverage 1.Adapting Covering Arrays to Real Systems 2.Building Covering Arrays 1.Overview 2.One-row-at-a-time Greedy Algorithms 3.Meta-heuristic Search

47 Heuristic Search Heuristic techniques: methods that seek a good (close to optimal) solution using a reasonable amount of computational cost. These techniques cannot guarantee optimality and may not guarantee feasibility.

48 Heuristic Search Combinatorial Optimization algorithms 1)Define a Set of Feasible solution 2)Each solution assigned a cost 3)Perform a series of transitions to new solutions chosen at random 4)If the new solution has the same or better cost – commit the change. 5)Otherwise don’t commit. 6)We continue until we have an optimal cost or we are frozen

49 Hill Climbing ∑ -Set of feasible solutions cost(S) : number of uncovered t-sets in S When cost=0 we have a covering array S1S1 S2S2 S3S3 …..SiSi Start with a random feasible solution Randomly choose/change one symbol to form a new feasible solution

50 Random instance Random factor Cost # uncovered t-sets Change value Example 1…………………………..k 1....N1....N

51 Example of Hill Climb Rows CA(N;3,3,2) t-sets Cost = 2 Change?

52 Example of Hill Climb Rows CA(N;3,3,2) t-sets Cost = 1 Improves the Cost - keep this change

53 Example of Hill Climb Rows CA(N;3,3,2) t-sets Cost = 2 Change?

54 Example of Hill Climb Rows CA(N;3,3,2) t-sets Cost = 3 Makes the solution worse! Do not keep

55 Lower bound L Binary search for “best” solution Upper bound U (L+U)/2 Finding “N”

56 Problems with Hill Climbing May get stuck in local optimums.

57 Meta-heuristic Algorithms Provide mechanisms to escape local optimums. Sometimes we make accept a worse choice in the hope we will find a better route to a good solution. We want to control the probability of making a bad choice.

58 Some Examples Genetic Algorithms Simulated Annealing Tabu Search Ant Colony Algorithm

59 Simulated Annealing Based on the physical annealing process that is used to cool metal. Idea is to start at a high temperature. At each temperature the molecules stabilize and then the metal is cooled to the next temperature.

60 S t(S) N(S) Select t(S) such that cost(t(S)) ≤ cost(S) or cost(t(S)) > cost(S) subject to controlled probability Search space  Simulated Annealing

61 Metropolis condition: Accept bad move with probability e -  /T Design decisions (cooling schedule): (1) Value of T 0 (2) Generating T k from T k-1 (3) Length of Markov chain L k (4) Stopping condition Simulated Annealing

62 Other Meta-heuristic Search Genetic algorithms: population based search. (J. Stardom 2000) Tabu Search: steepest descent. Maintain a tabu list to prevent getting stuck in a cycle. (K. Nurmela 2004)

63 References D. M. Cohen, S. R. Dalal, M. L. Fredman, and G. C. Patton, The AETG system: an approach to testing based on combinatorial design, IEEE Transactions on Software Engineering, vol. 23, no.7, pp , M. B. Cohen, C.J. Colbourn, J.Collofello, P.B. Gibbons, and W. B. Mugridge,Variable strength interaction testing of components in 'Proc. of 27th Intl. Computer Software and Applications Conference (COMPSAC), November 2003, pp M.B. Cohen, C.J. Colbourn, P.B. Gibbons, and W.B. Mugridge, Constructing test suites for interaction testing, in Proc. of the Intl. Conf. On Software Engineering (ICSE), May 2003, pp M. B. Cohen, C. J. Colbourn, and A. C. H. Ling, Constructing strength three covering arrays with augmented annealing, Discrete Mathematics, to appear. M..B. Cohen, Designing test suites for software interaction testing, PhD Dissertation, University of Auckland, Department of Computer Science, 2004.

64 References C.J. Colbourn, M. B. Cohen, and R..C. Turban, A deterministic density algorithm for pairwise interaction coverage, in IASTED Proc. of the Intl. Conference on Software Engineering, February 2004, pp A.Hartman and L.Raskin, Problems and algorithms for covering arrays, Discrete Math, vol. 284, pp , K.J. Nurmela, Upper bounds for covering arrays by tabu search, Discrete Applied Mathematics, vol. 138, no. 1-2, pp , J. Stardom, Metaheuristics and the search for covering and packing arrays, Master's thesis, Simon Fraser University, 2001 K..C. Tai and Y. Lei, A test generation strategy for pairwise testing, IEEE Transactions on Software Engineering, vol.28, no.1, pp , 2002.

65 References Y.-W. Tung and W. S. Aldiwan, Automating test case generation for the new generation mission software system,'' in Proc. IEEE Aerospace Conf., 2000, pp A. W. Williams, Determination of test configurations for pair-wise interaction coverage, in Thirteenth Intl. Conf. Testing Communication Systems, 2000, pp