2014-07-29 1 JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템 연광흠, 김문주 Software Testing & Verification Group (SWTV) CS Dept., KAIST.

Slides:



Advertisements
Similar presentations
Applications of Synchronization Coverage A.Bron,E.Farchi, Y.Magid,Y.Nir,S.Ur Tehila Mayzels 1.
Advertisements

Verification and Validation
Software Verification
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.
Automated Documentation Inference to Explain Failed Tests Sai Zhang University of Washington Joint work with: Cheng Zhang, Michael D. Ernst.
FIT FIT1002 Computer Programming Unit 19 Testing and Debugging.
1 Testing the OPN Language: Rule Coverage and Fuzz Testing Wujie Zheng.
1 Software Testing and Quality Assurance Lecture 9 - Software Testing Techniques.
Background on Testing and Maintenance CISC 879 Fall 2008.
Fall, 2006SW Eng Standalone Progs, Univ of Colorado Boulder 1 Wk 11 Glass Box Testing, Flow Graphs, Test Coverage SW Engineering of Standalone Programs.
Writing a Unit test Using JUnit At the top of the file include: import junit.framework.TestCase; The main class of the file must be: public Must extend.
Java Review 2 – Errors, Exceptions, Debugging Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
AP Computer Science.  Not necessary but good programming practice in Java  When you override a super class method notation.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Automated Diagnosis of Software Configuration Errors
Software faults & reliability Presented by: Presented by: Pooja Jain Pooja Jain.
Fruitful functions. Return values The built-in functions we have used, such as abs, pow, int, max, and range, have produced results. Calling each of these.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Software Testing and Validation SWE 434
Objectives Understand the basic concepts and definitions relating to testing, like error, fault, failure, test case, test suite, test harness. Explore.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
Introduction to Software Testing
Introduction to Software Testing Chapter 8.1 Building Testing Tools –Instrumentation Paul Ammann & Jeff Offutt
Implement Unit Test Framework for Application running on a Pocket PC 2003 device Durga Kulkarni Cyberonics Inc August 28, 2009.
DEBUGGING. BUG A software bug is an error, flaw, failure, or fault in a computer program or system that causes it to produce an incorrect or unexpected.
637 – Introduction (Ch 1) Introduction to Software Testing Chapter 1 Jeff Offutt Information & Software Engineering SWE 437 Software Testing
Cs2220: Engineering Software Class 6: Defensive Programming Fall 2010 University of Virginia David Evans.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
1 Program Testing (Lecture 14) Prof. R. Mall Dept. of CSE, IIT, Kharagpur.
Xusheng Xiao North Carolina State University CSC 720 Project Presentation 1.
Introduction to Software Testing. OUTLINE Introduction to Software Testing (Ch 1) 2 1.Spectacular Software Failures 2.Why Test? 3.What Do We Do When We.
Sheet 3 HANDLING EXCEPTIONS Advanced Programming using Java By Nora Alaqeel.
1 One Last Book, One Last Topic Code reviews / software inspections.
CPSC 873 John D. McGregor Session 9 Testing Vocabulary.
2.1 Functions. Functions in Mathematics f x y z f (x, y, z) Domain Range.
CPSC 871 John D. McGregor Module 8 Session 1 Testing.
CSC 213 – Large Scale Programming. Today’s Goal  Understand why testing code is important  Result of poor or no testing & embarrassment caused  Learn.
Testing the Programs CS4311 – Spring 2008 Software engineering, theory and practice, S. Pfleeger, Prentice Hall ed. Object-oriented and classical software.
Improving Structural Testing of Object-Oriented Programs via Integrating Evolutionary Testing and Symbolic Execution Kobi Inkumsah Tao Xie Dept. of Computer.
Workshop on Integrating Software Testing into Programming Courses (WISTPC14:2) Friday July 18, 2014 Introduction to Software Testing.
Java & C++ Comparisons How important are classes and objects?? What mechanisms exist for input and output?? Are references and pointers the same thing??
Mutation Testing Breaking the application to test it.
HW7: Due Dec 5th 23:59 1.Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw.
Random Test Generation of Unit Tests: Randoop Experience
Defensive Programming. Good programming practices that protect you from your own programming mistakes, as well as those of others – Assertions – Parameter.
Bugs CS100 how to prevent them, how to find them and how to terminate them.
Mutation Testing Laraib Zahid & Mariam Arshad. What is Mutation Testing?  Fault-based Testing: directed towards “typical” faults that could occur in.
Test Case Purification for Improving Fault Localization presented by Taehoon Kwak SoftWare Testing & Verification Group Jifeng Xuan, Martin Monperrus [FSE’14]
CPSC 372 John D. McGregor Module 8 Session 1 Testing.
Debugging and Testing Hussein Suleman March 2007 UCT Department of Computer Science Computer Science 1015F.
Verification and Validation
Testing Tutorial 7.
Software Testing.
John D. McGregor Session 9 Testing Vocabulary
CompSci 230 Software Construction
Verification and Testing
Faults, Errors, Failures CS 4501 / 6501 Software Testing
Types of Testing Visit to more Learning Resources.
John D. McGregor Session 9 Testing Vocabulary
Ask the Mutants: Mutating Faulty Programs for Fault Localization
John D. McGregor Session 9 Testing Vocabulary
Improving Test Suites for Efficient Fault Localization
Software Testing (Lecture 11-a)
Test Case Purification for Improving Fault Localization
George Mason University
Precise Condition Synthesis for Program Repair
CSE 1020:Software Development
HW#7 Describe test cases to reach full path coverage of the triangle program by completing the path condition table below. Also, draw the complete execution.
Defensive Programming
Presentation transcript:

JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템 연광흠, 김문주 Software Testing & Verification Group (SWTV) CS Dept., KAIST

0 Motivation: Finding Cause of SW Error is Difficult Developers have spent a large amount of time in debugging. One of the most laborious task of debugging activities is to locate the cause of failures (i.e., fault), which is called fault localization. Research Goal: To develop automated fault location techniques that assist developers effectively locate the cause of program failures (i.e., fault) Test case #1 : assertEquals(3, Example. setMax(3,1)) Test result: pass Inspecting line by line public class Example { public int SetMax(int x, int y) { 1: int max ‐= x; // should be ‘max=x;’ 2: if(max<y){ 3: max = y; 4: return max; 6: } 7: return max; 8: } Test result: fail == Laborious task /5 JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템

0 Key Idea of jMUSE Utilize differences between testing result changes of mutating – correct statements – faulty statements Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 : Failed test : Passed test What is the mutation? single syntactic code change Ex.: if(a)  if(!a) a+b  a–b What is the mutation? single syntactic code change Ex.: if(a)  if(!a) a+b  a–b Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 Test 1 Test 2 Test 3 Test 4 Test 5 Test 6 Conjecture 1 Conjecture /5 JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템

0 jMUSE Overall Calc. Susp. Test suite T Source code of program P Byte code of Program P Processing PITES T Execution Coverage analysis Mutation m1m1 Exec. mnmn Stmts. Covered by tests Test result 1 Test result n Test result Exec. 1.Testing the program and analyzing the coverage 2.Generating and testing the mutants 3.Processing data and calculating suspiciousness using the MUSE metric Step1 Step2 Step3 Susp. & Rank /5 JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템

0 결과가 좋은 경우 public static final Object[] sortAttributes (…) { … result[i + namespaces.length -1] //should be result[i + namespaces.length] = (Attr) nonNamespaces[i]; … } 95: … 137: 141: C14nHelper: failing test cases out of 94 test cases (35 array index out of bounds exceptions and 6 null pointer exceptions)  Faulty statement Test cases 를 the golden mutation 에 대해 수행하면 정상적인 프로그램에서 실행 했던 것과 같은 test case results 를 얻게 된다. 따라서, 모든 failing test cases 가 passing test cases 로 변하기 때문에 높은 suspiciousness 를 얻게 된다.  jMUSE result: jMUSE generates a golden mutation ‘ result[i+namespaces.length] ’  The generated mutation 은 the faulty program 이 정상적인 동작을 수행하도록 만든다 /5 JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템

0 결과가 좋지 않은 경우 /5 Object[] handleAttributes (…) … { … return resultAsArray; //should be return sortedResultAsArray; } 563: … 1079: 1080: Canonicalizer Excl: failing test cases out of 94 test cases (2 assert failed errors)  Faulty statement  jMUSE result: jMUSE generates a mutation ‘ return null ’ Test cases 를 the generated mutation 에 대해 수행하면 null pointer exception 이 발 생하면서 기존 failing test cases 를 포함한 더 많은 test cases 들이 fail 하게 된다.  The generated mutation 은 the faulty program 이 더 많은 error 를 발생하도록 만든다. JMUSE: Java 프로그램을 위한 돌연변이 기반 오류 추적 시스템