Comparison of Unit-Level Automated Test Generation Tools Shuang Wang Co-authored with Jeff Offutt April 4, 2009 1.

Slides:



Advertisements
Similar presentations
(c) Copyright 2002 Ibrahim K. El-Far. All rights reserved. Presented at Quality Week Europe Selecting an Appropriate Software Testing Method Ibrahim.
Advertisements

1 Software Unit Test Coverage And Test Adequacy Hong Zhu, Patrick A. V. Hall, John H.R. May Presented By: Arpita Gandhi.
Introduction to Software Testing Chapter 1 Model-Driven Test Design Paul Ammann & Jeff Offutt
Automated Testing and Response Analysis of Web Services
Of 17 Assessing the Influence of Multiple Test Case Selection on Mutation Experiments Marcio E. Delamaro and Jeff Offutt George Mason University & Universidade.
Of 23 Generating Automated Tests from Behavioral Models Jeff Offutt (Research with Dr. Nan Li, currently with MediData Solutions) Software Engineering.
Mutant Subsumption Graphs Mutation 2014 March 31, 2014 Bob Kurtz, Paul Ammann, Marcio Delamaro, Jeff Offutt, Lin Deng.
Unit Testing CSSE 376, Software Quality Assurance Rose-Hulman Institute of Technology March 27, 2007.
WISTPC-09 : Session A Tariq M. King PhD Candidate Florida International University Workshop on Integrating Software Testing into Programming.
PathExpander: Architectural Support for Increasing the Path Coverage of Dynamic Bug Detection S. Lu, P. Zhou, W. Liu, Y. Zhou, J. Torrellas University.
March 24, 2003Upadhyaya – IWIA A Tamper-resistant Framework for Unambiguous Detection of Attacks in User Space Using Process Monitors R. Chinchani.
Presenter: Miguel Garzon Torres CrUise Lab - SITE SQL Coverage Measurement for Testing Database Applications María José Suárez-Cabal University of Oviedo.
Expediting Programmer AWAREness of Anomalous Code Sarah E. Smith Laurie Williams Jun Xu November 11, 2005.
Automatically Generating Test Data for Web Applications Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Managing Large RDF Graphs (Infinite Graph) Vaibhav Khadilkar Department of Computer Science, The University of Texas at Dallas FEARLESS engineering.
Introduction to Software Testing Chapter 5.2 Program-based Grammars Paul Ammann & Jeff Offutt
Software Testing and Validation SWE 434
Model-Driven Test Design Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
TestIstanbul Conferences 2013 TestIstanbul 2013 Conference “Future Of Testing: New Techniques and Methodologies” A Systematic Approach for Increasing the.
© SERG Dependable Software Systems (Mutation) Dependable Software Systems Topics in Mutation Testing and Program Perturbation Material drawn from [Offutt.
Automatic Test Data Generation The Killer App for Software Testing Jeff Offutt Software Engineering George Mason University Fairfax, VA USA
1 Automatic Identification of Common and Special Object-Oriented Unit Tests Dept. of Computer Science & Engineering University of Washington, Seattle Oct.
Software Logic Mutation Testing Presented by Gary Kaminski.
WERST – Infrastructure Group Summary Notes July 2004
Introduction to Software Testing Chapter 8.1 Building Testing Tools –Instrumentation Paul Ammann & Jeff Offutt
Department of CS and Mathematics, University of Pitesti State-based Testing is Functional Testing ! Florentin Ipate, Raluca Lefticaru University of Pitesti,
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.
Test Drivers and Stubs More Unit Testing Test Drivers and Stubs CEN 5076 Class 11 – 11/14.
637 – Introduction (Ch 1) Introduction to Software Testing Chapter 1 Jeff Offutt Information & Software Engineering SWE 437 Software Testing
Software Engineering Experimentation Example Experimental Design Jeff Offutt Robert Nilsson.
Of 18 Is Bytecode Instrumentation as Good as Source Instrumentation? An Empirical Study with Industrial Tools Nan Li, Xin Meng, Jeff Offutt, and Lin Deng.
Introduction to Software Testing Chapters 1-5 Coverage Summary Paul Ammann & Jeff Offutt
Model-Driven Test Design Jeff Offutt Professor, Software Engineering George Mason University Fairfax, VA USA
Introduction to Software Testing Chapter 9.2 Program-based Grammars Paul Ammann & Jeff Offutt
New Random Test Strategies for Automated Discovery of Faults & Fault Domains Mian Asbat Ahmad
Benchmarking Effectiveness for Object-Oriented Unit Testing Anthony J H Simons and Christopher D Thomson.
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.
Review for Final – Fall 2015 Jeff Offutt SWE 637 Software Testing
Survey of Tools to Support Safe Adaptation with Validation Alain Esteva-Ramirez School of Computing and Information Sciences Florida International University.
Establishing Theoretical Minimal Sets of Mutants ICST 2014 Paul Ammann Joint work with Marcio Eduardo Delamaro Jeff Offutt April 1, 2014.
Automatic Test Data Generation : Who, When and Where? Jeff Offutt Software Engineering George Mason University Fairfax, VA USA
1 Using a Fault Hierarchy to Improve the Efficiency of DNF Logic Mutation Testing Gary Kaminski and Paul Ammann ICST 2009.
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.
Testing Web Services by XML Perturbation Joint research with Wuzhi Xu and Juan Luo Jeff Offutt Information & Software Engineering George Mason University.
Introduction to Software Testing Model-Driven Test Design and Coverage testing Paul Ammann & Jeff Offutt Update.
Mutation Testing Laraib Zahid & Mariam Arshad. What is Mutation Testing?  Fault-based Testing: directed towards “typical” faults that could occur in.
Software Testing and Quality Assurance Syntax-Based Testing (2) 1.
Introduction to Software Testing (2nd edition) Chapter 5 Criteria-Based Test Design Paul Ammann & Jeff Offutt
What is Software Test Automation?
Paul Ammann & Jeff Offutt
Generating Automated Tests from Behavior Models
Deriving Test Data for Web Applications from User Session Logs
Paul Ammann & Jeff Offutt
Introduction to Software Testing Chapter 9.2 Program-based Grammars
Chapter 8 – Software Testing
Beyond Test Automation (Why Are My Tests Dumb?)
It is great that we automate our tests, but why are they so bad?
Introduction to Software Testing Chapter 9.2 Program-based Grammars
Fabiano Ferrari Software Engineering Federal University of São Carlos
Software Engineering Experimentation
Introduction to Software Testing Chapter 5.2 Program-based Grammars
Test Case Purification for Improving Fault Localization
George Mason University
Java & Testing.
Paul Ammann & Jeff Offutt
UNIT TESTING TOOLS Workshop on Integrating Software
An Analysis of OO Mutation Operators Jingyu Hu, Nan Li, and Jeff Offutt Presented by Nan Li 03/24/2011.
Presentation transcript:

Comparison of Unit-Level Automated Test Generation Tools Shuang Wang Co-authored with Jeff Offutt April 4,

Motivation Automated test data generation tools ▫Reduce time and effort ▫Easier to maintain ▫Encapsulate knowledge of how to design and implement high quality tests We have more software, but insufficient resources We need to be more efficient Frameworks like JUnit provide empty boxes ▫Hard question: what do we put in there?

Three open source tools JCrasher TestGen4j JUB What are our criteria? Free Unit-level Automated test generation Java What’s available out there? 3 Two commercial tools AgitarOne JTest

Experiment Goals and Design Compare three unit level automatic test data generators Evaluate them based on their mutation scores ▫Subjects  Three free automated testing tools ▫- JCrasher, TestGen4j, and JUB ▫Control groups ▫- Edge Coverage and Random Test ▫Metric  Mutant score results 4

Experiment Design muJava P Mutants JCrasher TestGen4J JUB Test Set JC Test Set TG Test Set JUB JCrasher Mutation Score Manual Random Test Set Ram Test Set EC TestGen4J Mutation Score JUB Mutation Score Random Mutation Score Edge Cover Mutation Score Manual Edge Cover 5

Experiment Design muJava P Mutants JCrasher TestGen4J JUB Test Set JC Test Set TG Test Set JUB JCrasher Mutation Score Manual Random Test Set Ram Test Set EC TestGen4J Mutation Score JUB Mutation Score Random Mutation Score Edge Cover Mutation Score Manual Edge Cover 6

Java Programs Used ProgramsMutants NameLOCMethodsTraditionalClass BoundedStack Inventory Node Recipe Twelve VendingMachine Queue TrashAndTakeOut Total

Experiment Design muJava P Mutants JCrasher TestGen4J JUB Test Set JC Test Set TG Test Set JUB JCrasher Mutation Score Manual Random Test Set Ram Test Set EC TestGen4J Mutation Score JUB Mutation Score Random Mutation Score Edge Cover Mutation Score Manual Edge Cover 8

Subjects ( Automatic Test Data Generators ) Control groups Edge Coverage ▫one of the weakest and most basic test criterion Random Test ▫the “weakest effort” testing strategy 9 JCrasher try to "crash" the program TestGen exercise boundary value testing JUB use values like 0s and nulls

Experiment Design muJava P Mutants JCrasher TestGen4J JUB Test Set JC Test Set TG Test Set JUB Jcrasher Mutation Score Manual Random Test Set Ram Test Set EC TestGen4J Mutation Score JUB Mutation Score Random Mutation Score Edge Cover Mutation Score Manual Edge Cover 10

muJava Create mutants Run tests 11

Results & findings 12 Tool% Killed TraditionalClassTotal JCrasher 42%46%42% TestGen 28%37%29% JUB 24%26%24% EC 66%67%66% Random 36%34%36% Total % Killed

Results & findings 13 Tool Efficiency #Tests# KilledKilled / Tests JCrasher TestGen JUB EC Random Efficiency

Results & findings 14 TraditionalMutantsJCrasherTestGenJUBEdge CoverageRandom AORB5632%21%30%66%29% AORS1146%27%36%55%27% AOIU6646%32%17%79%36% AOIS43828%24%22%53%21% AODU1100% ROR25661%25%17%79%57% COR1233%25% 58%33% COD633% 17%50%33% COI475% 50%75% LOI12653%48%44%80%48% Total97642%28%24%66%36%

Example 15 For vendingMachine, except for edge coverage, the other four mutation scores are below 10% MuJava creates dozens of mutants on these predicates, and the mostly random values created by the three generators have a small chance of killing those mutants

Example Scores for BoundedStack were the second lowest for all the test sets except edge coverage 16 only two of the eleven methods have parameters. The three testing generators depend largely on the method signature, so fewer parameters may mean weaker tests

Example JCrasher got the highest mutation score among the three generators 17 JCrasher uses invalid values to attempt to “crash” the class

Conclusion These three tools by themselves generate tests that are very poor at detecting faults Among public-accessible tools, criteria-based testing is hardly used We need better Automated Test Generation Tools 18

Contact Shuang Wang Computer Science Department George Mason University 18