1 Automatic Identification of Common and Special Object-Oriented Unit Tests Dept. of Computer Science & Engineering University of Washington, Seattle Oct.

Slides:



Advertisements
Similar presentations
Black Box Testing Sources: Code Complete, 2 nd Ed., Steve McConnell Software Engineering, 5 th Ed., Roger Pressman Testing Computer Software, 2 nd Ed.,
Advertisements

Automated Testing and Response Analysis of Web Services
Templates in C++. Generic Programming Programming/developing algorithms with the abstraction of types The uses of the abstract type define the necessary.
Parallel Symbolic Execution for Structural Test Generation Matt Staats Corina Pasareanu ISSTA 2010.
Formal Modelling of Reactive Agents as an aggregation of Simple Behaviours P.Kefalas Dept. of Computer Science 13 Tsimiski Str Thessaloniki Greece.
1 Evaluation of the E3 Process modelling language and tool Letizia Jaccheri and Tor Stålhane Department of Computer and Information Science Norwegian University.
Data Abstraction II SWE 619 Software Construction Last Modified, Spring 2009 Paul Ammann.
Computer Science Automated Test Data Generation for Aspect-Oriented Programs Mark Harman (King’s College London, UK) Fayezin Islam (T-Zero Processing Services,
A survey of techniques for precise program slicing Komondoor V. Raghavan Indian Institute of Science, Bangalore.
1 of 24 Automatic Extraction of Object-Oriented Observer Abstractions from Unit-Test Executions Dept. of Computer Science & Engineering University of Washington,
Kai Pan, Xintao Wu University of North Carolina at Charlotte Generating Program Inputs for Database Application Testing Tao Xie North Carolina State University.
Comparison of Unit-Level Automated Test Generation Tools Shuang Wang Co-authored with Jeff Offutt April 4,
1 Software Testing and Quality Assurance Lecture 9 - Software Testing Techniques.
Foundations for the Study of Software Architecture by Dewayne Perry & Alexander Wolf ACM SIGSOFT, Oct Presented by Charles Reid 2/7/2005.
Lecture #4 Agenda Cell phones off & name signs out Review Questions? Objects The birds-and-the-bees talk.
Copyright © 2006 Software Quality Research Laboratory DANSE Software Quality Assurance Tom Swain Software Quality Research Laboratory University of Tennessee.
Empirically Assessing End User Software Engineering Techniques Gregg Rothermel Department of Computer Science and Engineering University of Nebraska --
Engineering Data Analysis & Modeling Practical Solutions to Practical Problems Dr. James McNames Biomedical Signal Processing Laboratory Electrical & Computer.
1 Software Architecture: a Roadmap David Garlen Roshanak Roshandel Yulong Liu.
Dynamically Discovering Likely Program Invariants to Support Program Evolution Michael Ernst, Jake Cockrell, William Griswold, David Notkin Presented by.
Fall 2005CSE 115/503 Introduction to Computer Science I1 Lecture #4 Agenda Announcements Review Questions? Classes and objects UML class diagrams Creating.
Automatically Extracting and Verifying Design Patterns in Java Code James Norris Ruchika Agrawal Computer Science Department Stanford University {jcn,
Michael Ernst, page 1 Improving Test Suites via Operational Abstraction Michael Ernst MIT Lab for Computer Science Joint.
Comp 587 Parker Li Bobby Kolski. Automated testing tools assist software engineers to gauge the quality of software by automating the mechanical aspects.
Expediting Programmer AWAREness of Anomalous Code Sarah E. Smith Laurie Williams Jun Xu November 11, 2005.
CS527: (Advanced) Topics in Software Engineering Overview of Software Quality Assurance Tao Xie ©D. Marinov, T. Xie.
Feed Back Directed Random Test Generation Carlos Pacheco1, Shuvendu K. Lahiri2, Michael D. Ernst1, and Thomas Ball2 1MIT CSAIL, 2Microsoft Research Presented.
Eclipse – making OOP Easy
Tao Xie North Carolina State University Supported by CACC/NSA Related projects supported in part by ARO, NSF, SOSI.
Tao Xie (North Carolina State University) Nikolai Tillmann, Jonathan de Halleux, Wolfram Schulte (Microsoft Research, Redmond WA, USA)
Tao Xie Automated Software Engineering Group Department of Computer Science North Carolina State University
Assessing the Suitability of UML for Modeling Software Architectures Nenad Medvidovic Computer Science Department University of Southern California Los.
Tao Xie ( ) Advisor: David Notkin Department of Computer Science & Engineering, University of Washington, Seattle Syntactically.
Key Challenges for Modeling Language Creation by Demonstration Hyun Cho, Jeff Gray Department of Computer Science University of Alabama Jules White Bradley.
3 A’s of Computational Thinking. Computational Thinking.
Experimentation in Computer Science (Part 1). Outline  Empirical Strategies  Measurement  Experiment Process.
Business Integration Technologies © 2006 IBM Corporation Zurich Research Laboratory - BIT Validation.
Generic API Test tool By Moshe Sapir Almog Masika.
Code Contracts Parameterized Unit Tests Tao Xie. Example Unit Test Case = ? Outputs Expected Outputs Program + Test inputs Test Oracles 2 void addTest()
Presented by: Ashgan Fararooy Referenced Papers and Related Work on:
Hong Zhu Dept of Computing and Communication Technologies Oxford Brookes University Oxford, OX33 1HX, UK TOWARDS.
Computer Science Automated Software Engineering Research ( Mining Exception-Handling Rules as Conditional Association.
Alattin: Mining Alternative Patterns for Detecting Neglected Conditions Suresh Thummalapenta and Tao Xie Department of Computer Science North Carolina.
1 Test Selection for Result Inspection via Mining Predicate Rules Wujie Zheng
Application of AI techniques for Computer Games BSc Computer Games Programming, 2006 Julien Delezenne GAMES ARTIFICIAL INTELLIGENCE.
Exploiting Code Search Engines to Improve Programmer Productivity and Quality Suresh Thummalapenta Advisor: Dr. Tao Xie Department of Computer Science.
Computer Science 1 Mining Likely Properties of Access Control Policies via Association Rule Mining JeeHyun Hwang 1, Tao Xie 1, Vincent Hu 2 and Mine Altunay.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Cooperative Developer Testing: Tao Xie North Carolina State University In collaboration with Xusheng ASE and Nikolai Tillmann, Peli de
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
Methodology First and Language Second -A Way to Teach Object-Oriented Programming Haibin Zhu, PhD Department of Computer Science and Mathematics Nipissing.
Parameterized Unit Testing in the Open Source Wild Wing Lam (U. Illinois) In collaboration with Siwakorn Srisakaokul, Blake Bassett, Peyman Mahdian and.
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.
Of An Expert System.  Introduction  What is AI?  Intelligent in Human & Machine? What is Expert System? How are Expert System used? Elements of ES.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
A UML-Based Pattern Specification Technique Presented by Chin-Yi Tsai IEEE TRANSACTION ON SOFTWARE ENGINEERING, VOL. 30, NO. 3, MARCH 2004 Robert B. France,
Symstra: A Framework for Generating Object-Oriented Unit Tests using Symbolic Execution Tao Xie, Darko Marinov, Wolfram Schulte, and David Notkin University.
UC Marco Vieira University of Coimbra
Jeremy Nimmer, page 1 Automatic Generation of Program Specifications Jeremy Nimmer MIT Lab for Computer Science Joint work with.
Experience Report: System Log Analysis for Anomaly Detection
Paul Ammann & Jeff Offutt
Checking Inside the Black Box: Regression Fault Exposure and Localization Based on Value Spectra Differences Tao Xie Advisor: David Notkin Dept.
ATTRACT TWD Symposium, Barcelona, Spain, 1st July 2016
Specification-Based Unit Test Data Selection: Integrating Daikon and Jtest Tao Xie and David Notkin Computer Science & Engineering, University of.
Marcelo d’Amorim (UIUC)
Eclat: Automatic Generation and Classification of Test Inputs
The Future of Software Engineering: Tools
Model Checking for an Executable Subset of UML
Expandable Group Identification in Spreadsheets
Algebraic Specification Software Specification Lecture 34
Presentation transcript:

1 Automatic Identification of Common and Special Object-Oriented Unit Tests Dept. of Computer Science & Engineering University of Washington, Seattle Oct Tao Xie Advisor: David Notkin Sabicu

2 Motivation Human loves writing unit tests! Human capability is limited Machine comes to rescue! Automated tools generate many test inputs Commercial: [Parasoft Jtest, Agitar Agitator, …] Academic: …]

3 Problem Automated tools generate many test inputs Infeasible to inspect all (6777 tests for LinkedList) Select test inputs that throw exceptions or achieve new structural coverage [Parasoft Jtest, Agitar Agitator, JCrasher, …] Any “gold” left in the generated tests? Need new gold mining devices

4 Sabicu: Automatic Identification of Common and Special Tests Intuition: common tests exercise common cases special tests exercise special cases Key: ways to characterize common and special cases Device: observe runtime behavior and infer universal properties: true all the time common properties: true most of the time Gold: common tests: satisfy universal/common properties special tests: violate common properties Statistical properties

5 Examples of Inferred Statistical Properties Syntactically identical to algebraic specs Universal property: size(clear(S).state).retval == 0 Satisfying count: 121 Violating count: 0 Common property: remove(removeLast(S).state, m0_2).state ==removeLast(remove(S, m0_2).state).state Satisfying count: 318 Violating count: 42

6 Inferring Statistical Properties During development of Sabicu Looked into human-written algebraic specs Predefined 25 abstraction templates [UW-CSE ] size(clear(S).state).retval == 0 g(f(S, args1).state, args2).retval == const remove(removeLast(S).state, m0_2).state ==removeLast(remove(S, m0_2).state).state g(f(S, args1).state, args2).state == f(g(S, args1).state, args2).state At runtime Instantiate templates with instances (tests) Obtain statistical properties

7 Approach Overview Test generation Common or universal properties Class bytecode Method-call composition Statistical inference Abstraction templates Test identification Special tests Common tests Rostra [Xie et al. ASE 04]

8 Subjects and Quantitative Results

9 More to be Done More applications: Focused testing on universal properties Applied in software evolution Testing different implementations of the same interface More evaluations Measure the fault detection capability and structural coverage of identified tests Case studies on programmers

10 Conclusion Statistical properties are useful too Daikon: axiomatic spec inference [Ernst et al. TOSE 01] Algebraic spec inference [Henkel&Diwan ECOOP 03] Gold mining is just starting: making the most out of generated tests! Test selection based on operational violations [Xie&Notkin ASE 03] Relating to industry: Agitar Agitator, Parasoft Jtest [Xie et al. ASE 04]

11 Examples of Common and Special Tests removeLast(addFirst(S, m0_1).state).state == addFirst(removeLast(S).state, m0_1).state Satisfying count: 117 (common test) LinkedList m = new LinkedList( ); m.add(0, new Integer(-1)); m.addFirst(new Integer(0)); m.removeLast ( );

12 Examples of Common and Special Tests removeLast(addFirst(S, m0_1).state).state == addFirst(removeLast(S).state, m0_1).state Satisfying count: 3 (special test) LinkedList m = new LinkedList( ); m.addFirst(new Integer(0)); m.removeLast ( );

13 Examples of Common and Special Tests remove(removeLast(S).state, m0_2).state ==removeLast(remove(S, m0_2).state).state Satisfying count: 318 (common test) LinkedList m = new LinkedList( ); m.add (0, new Integer(-1)); m.removeLast( ); m.remove(new Integer(-1));

14 Examples of Common and Special Tests remove(removeLast(S).state, m0_2).state ==removeLast(remove(S, m0_2).state).state Violating count: 42 (special test) LinkedList m = new LinkedList( ); m.add (0, new Integer(-1)); m.add (0, new Integer(0)); m.removeLast( ); m.remove(new Integer(-1)); 0

15 Examples of Common and Special Tests lastIndexOf(addFirst(S, m0_1).state, m0_2).retval == (lastIndexOf(S, m0_2).retval + 1) [where (m0_1==m0_2)] Satisfying count: 120 (special test) LinkedList m = new LinkedList( ); m.addFirst(new Integer(-1)); m.lastIndexOf(new Integer(-1));