Time-Aware Test Suite Prioritization Kristen R. Walcott, Mary Lou Soffa University of Virginia International Symposium on Software Testing and Analysis.

Slides:



Advertisements
Similar presentations
Adaptive Methods Research Methods Fall 2010 Tamás Bőhm.
Advertisements

Set Based Search Modeling Examples II
1 An Adaptive GA for Multi Objective Flexible Manufacturing Systems A. Younes, H. Ghenniwa, S. Areibi uoguelph.ca.
Exact and heuristics algorithms
CS527: Advanced Topics in Software Engineering (Software Testing and Analysis) Darko Marinov September 18, 2008.
Prioritizing Test Cases for Regression Testing Sebastian Elbaum University of Nebraska, Lincoln Alexey Malishevsky Oregon State University Gregg Rothermel.
November 5, 2007 ACM WEASEL Tech Efficient Time-Aware Prioritization with Knapsack Solvers Sara Alspaugh Kristen R. Walcott Mary Lou Soffa University of.
Test Case Filtering and Prioritization Based on Coverage of Combinations of Program Elements Wes Masri and Marwa El-Ghali American Univ. of Beirut ECE.
Heuristic Search and Information Visualization Methods for School Redistricting University of Maryland Baltimore County Marie desJardins, Blazej Bulka,
Prioritizing User-session-based Test Cases for Web Applications Testing Sreedevi Sampath, Renne C. Bryce, Gokulanand Viswanath, Vani Kandimalla, A.Gunes.
NATW 2008 Using Implications for Online Error Detection Nuno Alves, Jennifer Dworak, R. Iris Bahar Division of Engineering Brown University Providence,
1 Wendy Williams Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Genetic Algorithms are good at taking large, potentially huge search spaces and.
Date:2011/06/08 吳昕澧 BOA: The Bayesian Optimization Algorithm.
Evolutionary Computational Intelligence Lecture 10a: Surrogate Assisted Ferrante Neri University of Jyväskylä.
CS107 Introduction to Computer Science
A new crossover technique in Genetic Programming Janet Clegg Intelligent Systems Group Electronics Department.
Genetic Algorithm for Variable Selection
Michael Ernst, page 1 Improving Test Suites via Operational Abstraction Michael Ernst MIT Lab for Computer Science Joint.
Testing Metrics Software Reliability
Genetic Algorithm What is a genetic algorithm? “Genetic Algorithms are defined as global optimization procedures that use an analogy of genetic evolution.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithms: A Tutorial
Genetic Algorithm.
AMOST Experimental Comparison of Code-Based and Model-Based Test Prioritization Bogdan Korel Computer Science Department Illinois Institute of Technology.
CPIS 357 Software Quality & Testing
Soft Computing Lecture 18 Foundations of genetic algorithms (GA). Using of GA.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Test Suite Reduction for Regression Testing of Simple Interactions between Two Software Modules Dmitry Kichigin.
An Iterative Heuristic for State Justification in Sequential Automatic Test Pattern Generation Aiman H. El-MalehSadiq M. SaitSyed Z. Shazli Department.
Probabilistic Reasoning for Robust Plan Execution Steve Schaffer, Brad Clement, Steve Chien Artificial Intelligence.
Optimization Problems - Optimization: In the real world, there are many problems (e.g. Traveling Salesman Problem, Playing Chess ) that have numerous possible.
More on Heuristics Genetic Algorithms (GA) Terminology Chromosome –candidate solution - {x 1, x 2,...., x n } Gene –variable - x j Allele –numerical.
The Generational Control Model This is the control model that is traditionally used by GP systems. There are a distinct number of generations performed.
Applying Genetic Algorithm to the Knapsack Problem Qi Su ECE 539 Spring 2001 Course Project.
1 “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions.
DYNAMIC FACILITY LAYOUT : GENETIC ALGORITHM BASED MODEL
REPRESENTATIONS AND OPERATORS FOR IMPROVING EVOLUTIONARY SOFTWARE REPAIR Claire Le Goues Westley Weimer Stephanie Forrest
Genetic Algorithms Czech Technical University in Prague, Faculty of Electrical Engineering Ondřej Vaněk, Agent Technology Center ZUI 2011.
Prioritizing Test Cases for Regression Testing Article By: Rothermel, et al. Presentation by: Martin, Otto, and Prashanth.
Chapter 9 Genetic Algorithms.  Based upon biological evolution  Generate successor hypothesis based upon repeated mutations  Acts as a randomized parallel.
 Genetic Algorithms  A class of evolutionary algorithms  Efficiently solves optimization tasks  Potential Applications in many fields  Challenges.
Coevolutionary Automated Software Correction Josh Wilkerson PhD Candidate in Computer Science Missouri S&T.
CS 8625 High Performance Computing Dr. Hoganson Copyright © 2003, Dr. Ken Hoganson CS8625 Class Will Start Momentarily… CS8625 High Performance.
ApproxHadoop Bringing Approximations to MapReduce Frameworks
Improving Support Vector Machine through Parameter Optimized Rujiang Bai, Junhua Liao Shandong University of Technology Library Zibo , China { brj,
Authors: Soamsiri Chantaraskul, Klaus Moessner Source: IET Commun., Vol.4, No.5, 2010, pp Presenter: Ya-Ping Hu Date: 2011/12/23 Implementation.
A Fast Genetic Algorithm Based Static Heuristic For Scheduling Independent Tasks on Heterogeneous Systems Gaurav Menghani Department of Computer Engineering,
GAIA (Genetic Algorithm Interface Architecture) Requirements Analysis Document (RAD) Version 1.0 Created By: Charles Hall Héctor Aybar William Grim Simone.
Whole Test Suite Generation. Abstract Not all bugs lead to program crashes, and not always is there a formal specification to check the correctness of.
Week 6 MondayTuesdayWednesdayThursdayFriday Testing III Reading due Group meetings Testing IVSection ZFR due ZFR demos Progress report due Readings out.
Class Scheduling Using Constraint Satisfaction Victoria Donelson Garrett Grimsley.
Genetic Algorithms. Solution Search in Problem Space.
Breeding Swarms: A GA/PSO Hybrid 簡明昌 Author and Source Author: Matthew Settles and Terence Soule Source: GECCO 2005, p How to get: (\\nclab.csie.nctu.edu.tw\Repository\Journals-
Genetic Algorithm(GA)
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Evolutionary Computation Evolving Neural Network Topologies.
The Impact of Concurrent Coverage Metrics on Testing Effectiveness
Regression Testing with its types
USING MICROBIAL GENETIC ALGORITHM TO SOLVE CARD SPLITTING PROBLEM.
MultiRefactor: Automated Refactoring To Improve Software Quality
Subject Name: Operation Research Subject Code: 10CS661 Prepared By:Mrs
Comparing Genetic Algorithm and Guided Local Search Methods
Some Important Techniques For Regression Testing That You Must Know.
Genetic Algorithms: A Tutorial
Aiman H. El-Maleh Sadiq M. Sait Syed Z. Shazli
Exploring Genetic Algorithms Through the Iterative Prisoner's Dilemma
Regression Testing.
M. Kezunovic (P.I.) S. S. Luo D. Ristanovic Texas A&M University
Traveling Salesman Problem by Genetic Algorithm
Genetic Algorithms: A Tutorial
Presentation transcript:

Time-Aware Test Suite Prioritization Kristen R. Walcott, Mary Lou Soffa University of Virginia International Symposium on Software Testing and Analysis Portland, Maine July 17-20, 2006 Gregory M. Kapfhammer, Robert S. Roos Allegheny College

Regression Testing  Software is constantly modified Bug fixes Addition of functionality  After making changes, test using regression test suite Provides confidence in correct modifications Detects new faults  High cost of regression testing More modifications → larger test suite May execute for days, weeks, or months Testing costs are very high

Reducing the Cost  Cost-saving techniques Selection: Use a subset of the test cases Prioritization: Reorder the test cases  Prioritization methods Initial ordering Reverse ordering Random ordering Based on fault detection ability

Ordering Tests with Fault Detection  Idea: First run the test cases that will find faults first  Complications: Different tests may find the same fault Do not know which tests will find faults  Use coverage to estimate fault finding ability

Prioritization Example Prioritized Test Suite (with some fault information) T1 7 faults 9 min. T2 1 fault 1 min. T3 2 faults 3 min. T4 3 faults 4 min. T5 3 faults 4 min. T6 3 faults 4 min. Faults found / minute Retesting generally has a time budget Is this prioritization best when the time budget is considered? Contribution: A test prioritization technique that intelligently incorporates a time budget

Fault Aware Prioritization FAULTS/ TEST CASE f1f1 f2f2 f3f3 f4f4 f5f5 f6f6 f7f7 f8f8 T1 XXXXXXX T2 X T3 XX T4 XXX T5 XXX T6 XXX TESTING GOAL: Find as many faults as soon as possible

Time Budget: 12 minutes Fault-based Prioritization T1 7 faults 9 min. T2 1 fault 1 min. T3 2 faults 3 min. T4 3 faults 4 min. T5 3 faults 4 min. T6 3 faults 4 min. Finds 7 unique faults in 9 minutes T1f1f1 f2f2 f4f4 f5f5 f6f6 f7f7 f8f8 T2f1f1 T3f1f1 f5f5 T4f2f2 f3f3 f7f7 T5f4f4 f6f6 f8f8 T6f2f2 f4f4 f6f6

Finds 8 unique faults in 12 minutes T1 7 faults 9 min. T6 3 faults 4 min. T5 3 faults 4 min. T4 3 faults 4 min. T3 2 faults 3 min. Naïve Time-based Prioritization Time Budget: 12 minutes T2 1 fault 1 min. T1f1f1 f2f2 f4f4 f5f5 f6f6 f7f7 f8f8 T2f1f1 T3f1f1 f5f5 T4f2f2 f3f3 f7f7 T5f4f4 f6f6 f8f8 T6f2f2 f4f4 f6f6

Finds 7 unique faults in 10 minutes T3 2 faults 3 min. T6 3 faults 4 min. T5 3 faults 4 min. T4 3 faults 4 min. T1 7 faults 9 min. Average-based Prioritization Time Budget: 12 minutes T2 1 fault 1 min. T1f1f1 f2f2 f4f4 f5f5 f6f6 f7f7 f8f8 T2f1f1 T3f1f1 f5f5 T4f2f2 f3f3 f7f7 T5f4f4 f6f6 f8f8 T6f2f2 f4f4 f6f6

Finds 8 unique faults in 11 minutes T6 3 faults 4 min. T2 1 fault 1 min. T1 7 faults 9 min. T3 2 faults 3 min. T4 3 faults 4 min. Intelligent Time-Aware Prioritization Time Budget: 12 minutes T5 3 faults 4 min. T1f1f1 f2f2 f4f4 f5f5 f6f6 f7f7 f8f8 T2f1f1 T3f1f1 f5f5 T4f2f2 f3f3 f7f7 T5f4f4 f6f6 f8f8 T6f2f2 f4f4 f6f6

Time-Aware Prioritization  Time-aware prioritization (TAP) combines: Fault finding ability (overlapping coverage) Test execution time  Time constrained test suite prioritization problem ≤ 0/1 knapsack problem Use genetic algorithm heuristic search technique Genetic algorithm  Fitness ideally calculated based on faults  A fault cannot be found if code is not covered  Fitness function based on test suite and test case code coverage and execution time

Genetic algorithm Prioritization Infrastructure Program Test suite Number tuples/iteration Maximum # of iterations Percent of test suite execution time Crossover probability Mutation probability Addition probability Deletion probability Test adequacy criteria Program coverage weight Tuple 1Tuple 2 Selection Crossover Mutation AdditionDeletion Add new tuples Next generation Create initial population Select Best Calculate fitnesses Final test tuple

Fitness Function  Use coverage information to estimate “goodness” of test case Block coverage Method coverage  Fitness function components 1. Overall coverage 2. Cumulative coverage of test tuple 3. Time required by test tuple  If over time budget, receives very low fitness Preferred! Primary Fitness T1: 40%T2: 80% T1: 40%T2: 80% Secondary Fitness Test Suite 2: 40% coverage Test Suite 1: 70% coverage

Creation of New Test Tuples Crossover Vary test tuples using recombination If recombination causes duplicate test case execution, replace duplicate test case with one that is unused

Creation of New Test Tuples  Mutation For each test case in tuple  Select random number, R  If R < mutation probability, replace test case  Addition- Append random unused test case  Deletion- Remove random test case

Experimentation Goals  Analyze trends in average percent of faults detected (APFD)  Determine if time-aware prioritizations outperform selected set of other prioritizations  Identify time and space overheads

Experiment Design  GNU/Linux workstations 1.8 GHz Intel Pentium 4 1 GB main memory  JUnit test cases used for prioritization  Case study applications Gradebook JDepend  Faults seeded into applications 25, 50, and 75 percent of 40 errors

Evaluation Metrics  Average percent of faults detected (APFD) T = test tuple g = number of faults in program under test n = number of test cases reveal(i, T) = position of the first test in T that exposes fault i  Peak memory usage  User and system time

TAP APFD Values Block coverage preferred: 11% better in Gradebook 13% better in JDepend

TAP Time Overheads More generations with smaller populations: Took less time Same quality results

Gradebook: Intelligent vs Random

JDepend: Intelligent vs. Random

Other Prioritizations  Random prioritizations redistribute fault-revealing test cases  Other prioritizations Initial ordering Reverse ordering Fault-aware  Impossible to implement  Good watermark for comparison

Gradebook: Alternative Prioritizations % total time # FaultsInitialReverseTAP Fault aware Time-aware prioritization up to 120% better than other prioritizations

Conclusions and Future Work  Analyzes a test prioritization technique that accounts for a testing time budget  Time intelligent prioritization had up to 120% APFD improvement over other techniques  Future Work Make fitness calculation faster Distribute fitness function calculation Exploit test execution histories Create termination condition based on prior prioritizations Analyze other search heuristics

Thank you! Time-Aware Prioritization (TAP) Research: 