Test Case Purification for Improving Fault Localization

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Analyzing Regression Test Selection Techniques
Modular and Verified Automatic Program Repair Francesco Logozzo, Thomas Ball RiSE - Microsoft Research Redmond.
Programming Types of Testing.
Automated Fitness Guided Fault Localization Josh Wilkerson, Ph.D. candidate Natural Computation Laboratory.
Michael Ernst, page 1 Improving Test Suites via Operational Abstraction Michael Ernst MIT Lab for Computer Science Joint.
Domain Testing Based on Character String Predicate Ruilian Zhao Computer Science Dept. Beijing University of Chemical Technology Michael R. Lyu Computer.
Learning From Mistakes—A Comprehensive Study on Real World Concurrency Bug Characteristics Shan Lu, Soyeon Park, Eunsoo Seo and Yuanyuan Zhou Appeared.
State coverage: an empirical analysis based on a user study Dries Vanoverberghe, Emma Eyckmans, and Frank Piessens.
Automated Diagnosis of Software Configuration Errors
HMM-BASED PSEUDO-CLEAN SPEECH SYNTHESIS FOR SPLICE ALGORITHM Jun Du, Yu Hu, Li-Rong Dai, Ren-Hua Wang Wen-Yi Chu Department of Computer Science & Information.
Dr Andy Brooks1 FOR0383 Software Quality Assurance Lecture 1 Introduction Forkröfur/prerequisite: FOR0283 Programming II Website:
Software Testing and Validation SWE 434
An Automated Approach to Predict Effectiveness of Fault Localization Tools Tien-Duy B. Le, and David Lo School of Information Systems Singapore Management.
© SERG Dependable Software Systems (Mutation) Dependable Software Systems Topics in Mutation Testing and Program Perturbation Material drawn from [Offutt.
Regression Testing. 2  So far  Unit testing  System testing  Test coverage  All of these are about the first round of testing  Testing is performed.
Bug Localization with Machine Learning Techniques Wujie Zheng
Introduction to Software Testing. Types of Software Testing Unit Testing Strategies – Equivalence Class Testing – Boundary Value Testing – Output Testing.
Intro: “BASIC” STATS CPSY 501 Advanced stats requires successful completion of a first course in psych stats (a grade of C+ or above) as a prerequisite.
Chin-Yu Huang Department of Computer Science National Tsing Hua University Hsinchu, Taiwan Optimal Allocation of Testing-Resource Considering Cost, Reliability,
1 Nonparametric Statistical Techniques Chapter 17.
1 Test Selection for Result Inspection via Mining Predicate Rules Wujie Zheng
Loop Analysis and Repair Nafi Diallo Computer Science NJIT Advisor: Dr. Ali Mili.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Mutation Testing G. Rothermel. Fault-Based Testing White-box and black-box testing techniques use coverage of code or requirements as a “proxy” for designing.
Bug Localization with Association Rule Mining Wujie Zheng
Computer Science 1 Test Selection and Augmentation of Regression System Tests for Security Policy Evolution JeeHyun Hwang, Tao Xie, and collaborators at.
David Streader Computer Science Victoria University of Wellington Copyright: David Streader, Victoria University of Wellington Debugging COMP T1.
Benchmarking Effectiveness for Object-Oriented Unit Testing Anthony J H Simons and Christopher D Thomson.
Chapter 5 Methods 1. Motivations Method : groups statements that perform a function.  Level of abstraction (black box)  Code Reuse – no need to reinvent.
Error Explanation with Distance Metrics Authors: Alex Groce, Sagar Chaki, Daniel Kroening, and Ofer Strichman International Journal on Software Tools for.
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.
Mutation Testing Breaking the application to test it.
Test Case Purification for Improving Fault Localization presented by Taehoon Kwak SoftWare Testing & Verification Group Jifeng Xuan, Martin Monperrus [FSE’14]
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVIII. Software Testing.
Jeremy Nimmer, page 1 Automatic Generation of Program Specifications Jeremy Nimmer MIT Lab for Computer Science Joint work with.
Dr.V.Jaiganesh Professor
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Unit Testing.
Regression Testing with its types
White-Box Testing Techniques IV
Testing Tutorial 7.
Generating Automated Tests from Behavior Models
Introduction to programming
White-Box Testing Techniques IV
Tirgul 13 Exceptions 1.
Soft-Error Detection through Software Fault-Tolerance Techniques
Chapter 8 – Software Testing
Analyzing the Validity of Selective Mutation with Dominator Mutants
Learning Software Behavior for Automated Diagnosis
idempotent (ī-dəm-pō-tənt) adj
Testing & Testing Tools
Mid-term Exam Account for 20% of the grade 100 points in total
Ask the Mutants: Mutating Faulty Programs for Fault Localization
Coverage-Directed Differential Testing of JVM Implementations
Chapter 10 Verification and Validation of Simulation Models
Improving Test Suites for Efficient Fault Localization
Lecture 09:Software Testing
Software Engineering Experimentation
Mock Object Creation for Test Factoring
Software Engineering Experimentation
Automated Fitness Guided Fault Localization
An Empirical Evaluation of the MuJava Mutation Operators
[jws13] Evaluation of instance matching tools: The experience of OAEI
Chapter 8 Software Evolution.
Psych 231: Research Methods in Psychology
George Mason University
Precise Condition Synthesis for Program Repair
Using Automated Program Repair for Evaluating the Effectiveness of
Mitigating the Effects of Flaky Tests on Mutation Testing
Presentation transcript:

Test Case Purification for Improving Fault Localization Jifeng Xuan Martin monperrus Source: aCM FSE G201892008 처그

Context Abstract Introduction Motivation Test Case Atomization Test Case Slicing Rank Refinement Experimental Result Conclusion

Abstract Failing test cases and their assertions form test oracles for the failing behavior of the system under analysis. Test case purification is to separate existing test cases in to small fractions (purified test cases) and to enhance the oracles to further localize faults. Combining with an original fault localization technique (e.g., Tarantula). Test case purification results in better ranking the program statements.

Introduction The test oracle in a test case is implemented as a set of executable assertions for verifying the correctness of the program behavior. Each test case includes 5.8 assertions on average. If an assertion in a test case is violated, the unit test framework aborts the execution of this test case and report the test result (i.e., the test case is failed) Our key intuition is that recovering the execution of those omitted assertions can lead to more test cases and further enhance the ability of fault localiztion.

Introduction The goal of test case purification is to generate purified versions of failing test cases. Which include only one assertion per test and excludes unrelated statements of this assertion.

Introduction Test case purification for fault localization is consists of three major phases: Test case atomization Test case slicing Rank refinement Test case atozimation generates a set of single assertion test cases for each failed test case. Test case slicing removes the unrelated statements in all the failing single assertion test cases Rank refinement combines the spectra of purified test cases with an existing fault localization technique (e.g., Tarantula) and sorts the statements as the final result.

Introduction We evaluate our work on six real world open source Java projects with 1800 seeded bugs. We compare our results with six mature fault localization technique. Test case purification can effectively improve the results of existing techniques. Test case purification on Tarantula obtains the best result among all the techniques we have considered.

Motivation

Test Case Atomization Given failing test case which has k assertions, create k copies for this test case. Transform k-1 assertions into regular test case statements for each copy.

Test Case Atomization To transform an assertion into regular test case statement, we surround this assertion with try-catch structure

Test Case Atomization After that, compile and execute all generated test cases. Records failing test cases and broken statement that is either an assertion or a statement which throws an unexpected error.

Test Case Slicing The goal of test case slicing is to generate purified test cases before collecting their spectra. Spectra mean the execution trace for each purified test case. Dynamic slicing A slicing criterion is defined as a pair <b, V>, where b is broken statement in the target program and V is set of variables to be observed at b. Compared static slicing , dynamic slicing may lead to more removal statements.

Test Case Slicing After that, compile and execute all purified test cases. Finally, collect execution trace for each purified test case.

Rank Refinement The goal of rank refinement is to re-rank the statement by an existing fault localization technique with the spectra in the phase of test case slicing. The statements covered by failing test case is re-ranked. Let S be a set of the statements. For statement s ∈ S, get a ratio of executions by purified test cases. Where βef(s) and βnf(s) is the number of test cases covering and non covering s.

Rank Refinement For statement s ∈ S, normalize suspiciousness of statements calculated by existing fault localizing techniques (e.g., Tarantula). Where susp(s) is the suspiciousness value, min(S) and max(S) denotes the minimum susp/value and maximum susp/value of all the statements in S.

Rank Refinement Refine the ranking of a statement s ∈ S by combining ratio(s) and norm(s). where norm(s) is the normalized suspiciousness value, ratio(s) is the ratio of execution by purified test cases.

Framework of Test Case Purification

Subject Programs Six open source programs for our experiments We compute the size metric (Source Line of Code - SLoC) with CLOC. The subject programs in our selection are provided with large test suites written in JUnit

Subject Programs We use existing work [14],[31] and use mutation testing tools to create faulty version A mutant of a program is a copy of the original program with a single change. Mutant may contain one change of negating a conditional statement.

Experimental Result The number changes of the suspiciousness score of the faulty statement in faults after applying the approach. Better fault localization on 18 to 43% of faults. Worse on only 1.3 to 2.4%of faults Tarantula-Purification performs better than Tarantula on 43.28% of the faults with an average fault-localization improvement of 36.44 statements.

Experimental Result Presents the wasted efforts with or without applying test case purification on 1800 faults The wasted effort measured with the absolute number of statements to be examined before finding the faulty one. Purification test case improves the wasted effort from statements (Tarantula) to 35.62 statements (Tarantula-purification).

Experimental Result Computation time. The paper claims that the computation time of test case purification is acceptable since the whole process can be executed automatically.

Conclusion The paper proposed a test case purification approach for improving existing fault localizing techniques. In the experimental result, the authors have shown that the fault localization applying the test case purification performs better on 18-43% of faults while performing worse on only 1.3-2.4% of faults.