Alex Groce, Josie Holmes, Darko Marinov, August Shi, Lingming Zhang

Slides:



Advertisements
Similar presentations
MUTATION TESTING. Mutation testing is a technique that focuses on measuring the adequacy (quality) of test data (or test cases). Modify a program by introducing.
Advertisements

An Analysis and Survey of the Development of Mutation Testing by Yue Jia and Mark Harmon A Quick Summary For SWE6673.
Paraμ A Partial and Higher-Order Mutation Tool with Concurrency Operators Pratyusha Madiraju AdVanced Empirical Software Testing and Analysis (AVESTA)
Semantic Mutation Testing John A. Clark, Haitao Dan, Robert M Hierons.
Mutation Testing Presented by Sharath Kumar Garlapati Vinesh Thummala.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introduction to Software Testing Chapter 9.1 Syntax-based Testing Paul Ammann & Jeff Offutt
2007 Adobe Systems Incorporated. All Rights Reserved. 1 Joe Berkovitz VP Engineering Allurent, Inc. Continuous Integration with Flex, FlexUnit, and Ant.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Universal Linear Algebra API based on M4 Michael Fiero Isaac Asiamah.
Software Testing and Validation SWE 434
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
© SERG Dependable Software Systems (Mutation) Dependable Software Systems Topics in Mutation Testing and Program Perturbation Material drawn from [Offutt.
Software testing techniques Software testing techniques Mutation testing Presentation on the seminar Kaunas University of Technology.
Yue Jia, Mark Harman King’s College London CREST Constructing Subtle Faults Using Higher Order Mutation Testing Higher Order Mutation Testing.
Introduction to Software Testing Chapter 5.1 Syntax-based Testing Paul Ammann & Jeff Offutt
BOĞAZİÇİ UNIVERSITY DEPARTMENT OF MANAGEMENT INFORMATION SYSTEMS MATLAB AS A DATA MINING ENVIRONMENT.
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.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Computer Science 1 Systematic Structural Testing of Firewall Policies JeeHyun Hwang 1, Tao Xie 1, Fei Chen 2, and Alex Liu 2 North Carolina State University.
Cross Language Clone Analysis Team 2 February 3, 2011.
Mutation Testing Breaking the application to test it.
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Detecting Assumptions on Deterministic Implementations of Non-deterministic Specifications August Shi, Alex Gyori, Owolabi Legunsen, Darko Marinov 4/12/2016.
Mutation Testing Laraib Zahid & Mariam Arshad. What is Mutation Testing?  Fault-based Testing: directed towards “typical” faults that could occur in.
OPERATORS IN C CHAPTER 3. Expressions can be built up from literals, variables and operators. The operators define how the variables and literals in the.
Reports ForNAV NAVUG, May 9-10, 2016 Stuttgart, Germany.
Business rules.
Data Collection and Analysis
Programming Languages Dan Grossman 2013
Operating System Interface between a user and the computer hardware
Recent trends in estimation methodologies
Introduction to .NET Core
Brian Leonard ブライアン レオナルド
System Design.
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Mutation testing Julius Purvinis IFM-0/2.
课程名 编译原理 Compiling Techniques
Evaluating a Real-time Anomaly-based IDS
Introduction to computing
Syntax-based Testing CS 4501 / 6501 Software Testing
Jeliot 3 Spring 2004 Andrés Moreno García Niko Myller
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
CS416 Compiler Design lec00-outline September 19, 2018
Automated Code Coverage Analysis
Developing an Android application for
Mutation Testing Meets Approximate Computing
TRANSLATORS AND IDEs Key Revision Points.
Balancing Trade-Offs in Test-Suite Reduction
Program Design Introduction to Computer Programming By:
August Shi, Tifany Yung, Alex Gyori, and Darko Marinov
Use of Mathematics using Technology (Maltlab)
Test Case Purification for Improving Fault Localization
Types, Truth, and Expressions (Part 2)
LING 408/508: Computational Techniques for Linguists
Design Patterns for Recursive Descent Parsing
CS416 Compiler Design lec00-outline February 23, 2019
Mutation Testing The Mutants are Coming! Copyright © 2017 – Curt Hill.
Introduction to Software Testing Chapter 5.1 Syntax-based Testing
Lec00-outline May 18, 2019 Compiler Design CS416 Compiler Design.
By Hyunsook Do, Sebastian Elbaum, Gregg Rothermel
1.3.7 High- and low-level languages and their translators
MAPO: Mining and Recommending API Usage Patterns
An Analysis of OO Mutation Operators Jingyu Hu, Nan Li, and Jeff Offutt Presented by Nan Li 03/24/2011.
Evaluating Rust Ethan Larkham & Todd Gaunt Department of Computer Science, University of New Hampshire, Durham, NH Abstract Objectives Results Compare.
Web Application Development Using PHP
From Use Cases to Implementation
Faculty of Computer Science and Information System
Mitigating the Effects of Flaky Tests on Mutation Testing
Mutation Testing Faults are introduced into the program by creating many versions of the program called mutants. Each mutant contains a single fault. Test.
Presentation transcript:

An Extensible, Regular-Expression-Based Tool for Multi-Language Mutant Generation Alex Groce, Josie Holmes, Darko Marinov, August Shi, Lingming Zhang ICSE Demo 2018 Gothenburg, Sweden May 30, 2018 CCF-1409423 CCF-1421503 CCF-1566589

Mutation Testing Goal: Evaluate the quality of test suites Use mutation operators to make small syntactic changes to code under test, creating mutants Example: x = x + 1 Run test suite on each mutant and see if test suite behavior changed (killed mutant) Compute mutation score, percent of mutants killed

Current Tooling Mutation testing tools for various languages (Java, C, Python, and more) PIT, Major, MuJava, Milu, Proteum, MutPy, and more Similar mutation operators defined per language Replace arithmetic operators, logical operators, relational operators, constants Requires separate engineering for same operator across different tools/languages Difficult to add new operators for each tool Tool for new language takes significant engineering

universalmutator Simple, regular-expression based mutation tool Mutation operators are regexes, operate on source code Applies to multiple programming languages and easily extensible Principles: Operators can be applied without parsing the code Easily extensible to include new operators Separate “small tools” for mutant generation, mutant filtering, and mutant execution https://github.com/agroce/universalmutator We aim to address these difficulties with the reengineering efforts across multiple languages/tools with… Emphasize that it is simple, but easily applicable…

Example Usage Install using pip Generate mutants with mutate pip install universalmutator Generate mutants with mutate mutate <sourcefile> Perform mutation analysis to determine killed mutants and mutation score using analyze_mutants analyze_mutants <sourcefile> <testing command>

Demonstration

Sample Regexes (Universal Rules) \+ ==> - \+ ==> * \+ ==> / \+ ==> % Change arithmetic “+” to other operator == ==> != == ==> <= == ==> >= == ==> > == ==> < Change relational “==” to other operator (\D)(\d+)(\D) ==> \g0\3 (\D)(\d+)(\D) ==> \g1\3 (\D)(\d+)(\D) ==> \g-1\3 (\D)(\d+)(\D) ==> \1(\2+1)\3 (\D)(\d+)(\D) ==> \1(\2-1)\3 Change constants

Extending the Mutator New operators can be added as new regexes Create new .rules file and add the regexes Example, modify ++ \+\+ ==> += 2 \+\+ ==> --

Demonstration

Preliminary Evaluation Compared universalmutator against PIT and Major for mutating Java code universalmutator generates many more mutants than PIT, more similar with Major The mutation scores are very similar between tools Subject PIT Major universalmutator Gen Kill Score Triangle 45 44 97.7% 139 130 93.5% 188 184 97.8% FizzBuzz 111 92 82.8% 244 202 82.7% 203 176 86.7% PIT operators are default operators, and PIT naturally does covered mutants only

Future Work Integration with build systems Comparison with other mutation testing tools, across different languages Making rules for many different languages, particularly the ones that do not have existing mutation testing tools We currently support C, C++, Java, Python, Swift, Rust, Go, Solidity

Conclusions universalmutator is a regex-based mutation testing tool universalmutator supports mutation testing for multiple languages universalmutator allows for easy extending for new mutation operators https://github.com/agroce/universalmutator Table 2 outside awshi2@illinois.edu

BACKUP

Incorporating TCE Trivial Compiler Equivalence (TCE) can help remove equivalent/duplicated mutants1 Modify *_hander.py files for relevant source code 1 Papadakis, M., Jia, Y., Harman, M., Le Traon, Y. “Trivial compiler equivalence: a large scale empirical study of a simple, fast and effective equivalent mutant detection technique”. ICSE 2015.