SlideShare une entreprise Scribd logo
1  sur  33
An Analysis and Survey
  of the Development of Mutation Testing[JH09]
                                               About 30 minutes                              Tao He
                                                                                    elfinhe@gmail.com
                                                                       Software Engineering Laboratory
                                                 Department of Computer Science, Sun Yat-Sen University


                                  With thanks to Yue Jia and Mark Harman
                      These slides are mainly extracted from Jia and Harman’s survey work
                                                                                             May 2011
                                                              Sun Yat-Sen University, Guangzhou, China

[JH09] Yue Jia, Mark Harman (September 2009). "An Analysis and Survey of the Development of Mutation
Testing" (PDF). CREST Centre, King's College London, Technical Report TR-09-06.
                                                                                                   1/37
Outline
   Objectives
   Scope
   Classification of Research
   Fundamental Hypotheses
   Related Concepts
   Future Trend
   Tools
Objectives of Mutation Testing
   Provide “mutation adequacy score”
   Measure the effectiveness of a test set in
    terms of its ability to detect faults




                                                 3/20
Scope of Mutation Testing
   The unit level
   The integration level
   The specification level
   As a white-box unit test technique
Theoretical work on Mutation Testing
   Hypotheses supporting Mutation Testing
   Optimization techniques
       techniques for reducing computational cost
       techniques for the detection of equivalent mutants
Practical work on Mutation Testing
   Applications of Mutation Testing
   Development work on Mutation Testing tools
   Empirical work
Fundamental Hypotheses
Competent Programmer Hypothesis (CPH)

   Programs can be corrected by a few small
    syntactical changes.
Coupling Effect
   Test data sets that detect simple types of
    faults are sensitive enough to detect more
    complex types of faults
       A simple fault is represented by a simple mutant
        which is created by making a single syntactical
        change
       A complex fault is represented as a complex
        mutant which is created by making more than one
        change
A Mutation Operator
   A transformation rule that generates a mutant
    from the original program
   Generate ‘realistic faults’
Behaviors of Mutation Operators
   Mutation Objects
       Variables
       Expressions
   Mutation Operation
       Replacement
       Insertion
       Deletion
Problems of Mutation Analysis
   Executing the enormous number of mutants
   Human effort
       The human oracle problem
       The equivalent mutant problem
Cost Reduction Techniques
Classification of
Cost Reduction Techniques

   Reduction of the generated mutants (may
     be taken into consideration in our
    approach for Fault Localization)
   Reduction of the execution cost
Mutants Reduction Techniques
   Mutant Sampling
       Random
       Based on the Bayesian sequential probability ratio
        test (SPRT)
   Mutant Clustering
       Based on killable test cases
   Selective Mutation
       By reducing the number of mutation operators applied.
       Ignore operators ASR and SVR - redundant generation
       Only using ABS and ROR
Evaluation of Mutants Reduction
   A mean mutation score
   Reduction in the number of mutants
   Number of equivalent mutants
Execution Cost Reduction Techniques
   Strong Mutation
   Weak Mutation
   Firm Mutation
       by providing a continuum of intermediate
        possibilities - compare state, which lies between
        execution (Weak Mutation) and the final output
        (Strong Mutation).
Equivalent Mutant Detection Techniques

   10% to 40% of mutants which are equivalent
Empirical Study
   Compare mutation criteria with data flow
    criteria such as 'all-use'
   Compare mutants with real faults
Future Trend
   A need for high quality higher order mutants
   A need to reduce the equivalent mutants
   A preference for semantics over syntax
    mutation
   An interest in achieving a better balance
    between cost and value
   A pressing need to generate test cases to kill
    mutants
Life circle of Mutation Testing
   Generate mutants based on specified
    mutation operations
   Reduce mutants
   Run mutants against a test suite
Mutation Testing Tools
Goals of Mutation
to Enhance Fault Localization

   Not aim to simulate real faults
   Analyze the impact of mutation on the
    suspiciousness of the mutated statement
Name           Application       Year         Character            Available     Suitable
                                            Higher Order Mutation,
    MILU                C            2008   Search-based technique,       Yes          No
                                            Test harness embedding
MUFORMAT                C            2008     Format String Bugs          No           No
    ESPT              C/C++          2008          Tabular                No           No
                                                 Variable type
   CSAW                 C            2007                                 Yes          No
                                                 optimization
   ExMAn             C, Java         2006            TXL                  No           No
  SESAME         C, Lustre, Pascal   2006     Assembler Injection         No           No
  Certitude           C/C++          2006   General (Commercial)      Commercially     No
   Plextest           C/C++          2005   General (Commercial)      Commercially     No
                                              Interface Mutation,
Proteum/IM 2.0          C            2001                                 Yes          Yes
                                             Finite State Machines
                                                 Source Code
  Insure++            C/C++          1998      Instrumentation        Commercially     No
                                                (Commercial)
                                               Mutant Schemata
    TUMS                C            1995                                 No           No
                                                 Generation
                                              Interface Mutation,
 Proteum 1.4            C            1993                                 No           No
                                             Finite State Machines

                            Published C Mutation Testing Tools
Proteum
   Environment Variable: PROTEUMIMHOME
   li -P pre-filename [-D directory] source-filename LI-filename
        Call gcc to preprocess the source code file source-filename.c and
         produce a file pre-filename.c. Then parse the file pre-filename.c
         and generate various info files
   opmuta [-<operator> n m] [-all n m] source-filename Li-
    filename
        Apply mutant operators to the source code and LI files. As ouput,
         opmuta produces a description file in a format that muta is able to
         read and include in the mutant database.
strutt .h        include        space.c                source code




                                    li             ~/smart_debugger/toolkit/proteum/li -P pre-space space li-space




  pre-space.c                  li-space.nli                 li-space.fun               li-space.cgr                   li-spaec.gfc


                              statement info                 function info             call graph info               def-use pair info


     opmuta          ~/smart_debugger/toolkit/proteum/opmuta -O Operators pre-one_statement li one_statement > mutants.txt
                                                                                             -


                                   Proteum.py

                                         include
                                                                                                   function name by directory
                                                                               Mutants             line number by mutantdsc
                                                                                                                       .
   mutants.txt               GenetrateMutants .py
                                                                                                mutation operator by mutant
                                                                                                                          .dsc



  all mutants info


                                              Proteum – An Example: Space
Thoughts of Self-Made Mutants Generator
   I once consider to implement a self-made mutants generator.
        Only mutate one statement
        Not aim to simulate real faults
   IPO
        Input
             A piece of source code
             Line number to mutate
             Mutation operators
        Process
             Preprocess -> Scan -> Parse -> Mutate
        Output
             Mutants
Collection of Compiler Front-end Tools

   GCC-XML …failed
       E.g.
          source code:
           http://www.gccxml.org/HTML/example1in.html
          Parse-tree:

           http://www.gccxml.org/HTML/example1out.html
   LLVM … not try, good for Objective-C?
    http://llvm.org/
Collection of Compiler Front-end Tools
   GCC … failed, maybe no parse-tree for GCC
       -fdump-tree-fixup cfg-lineno
        http://stackoverflow.com/questions/697817/how-to-make-gcc-spi

       -fdump-tree-all -fdump-rtl-all
        http://stackoverflow.com/questions/1496497/how-can-i-see-parse

       -fprofile-arcs -ftest-coverage
           gcno gcda: not readable for human beings

           gcov: offer the line number, separated statements
Useful links
   http://en.wikipedia.org/wiki/Mutation_testing
   http://cs.gmu.edu/~offutt/rsrch/mut.html
   http://www.dcs.kcl.ac.uk/pg/jiayue/repository/
Q&A




      31/37
Thank you!
Contact me via elfinhe@gmail.com




                                   32/37
Abstract
   Fault localization is a technique that aims to pinpoint faults by
    analyzing program execution spectrum, while mutation is a testing
    technique used by generating faulty programs called mutants.
    Most of existing research in fault localization focuses on the
    spectrum of the given programs. Yet there are few attempts to
    introduce mutation’s impact to enhance fault localization
    techniques. In this paper, we propose a strategy that automatically
    introduces mutation into fault localization techniques, and present
    variations of a heuristic method to compute suspiciousness of
    each statement by considering the impact of mutation. To validate
    our method, experiments is conducted on benchmark programs,
    namely Siemens, grep, gzip, sed, space, flex, make, vim, and
    bash. Results indicate that the method can help programmers
    locate faults more effectively than methods without mutation.




                                                                   33/20

Contenu connexe

Tendances

Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practicesnickokiss
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration TestingDavid Berliner
 
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible MistakesRoy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible MistakesRoy Osherove
 
Unit Testing Best Practices
Unit Testing Best PracticesUnit Testing Best Practices
Unit Testing Best PracticesTomaš Maconko
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Gerald Muecke
 
JS Fest 2018. Андрей Кучеренко. Мутационное тестирование в JavaScript
JS Fest 2018. Андрей Кучеренко. Мутационное тестирование в JavaScriptJS Fest 2018. Андрей Кучеренко. Мутационное тестирование в JavaScript
JS Fest 2018. Андрей Кучеренко. Мутационное тестирование в JavaScriptJSFestUA
 
Unit Testing with Python
Unit Testing with PythonUnit Testing with Python
Unit Testing with PythonMicroPyramid .
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDDDror Helper
 
Clean Unit Test Patterns
Clean Unit Test PatternsClean Unit Test Patterns
Clean Unit Test PatternsFrank Appel
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
Unit testing - the hard parts
Unit testing - the hard partsUnit testing - the hard parts
Unit testing - the hard partsShaun Abram
 
Unit Tests And Automated Testing
Unit Tests And Automated TestingUnit Tests And Automated Testing
Unit Tests And Automated TestingLee Englestone
 

Tendances (20)

UNIT TESTING
UNIT TESTINGUNIT TESTING
UNIT TESTING
 
Unit testing best practices
Unit testing best practicesUnit testing best practices
Unit testing best practices
 
Unit testing
Unit testingUnit testing
Unit testing
 
Unit testing with JUnit
Unit testing with JUnitUnit testing with JUnit
Unit testing with JUnit
 
Unit and integration Testing
Unit and integration TestingUnit and integration Testing
Unit and integration Testing
 
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible MistakesRoy Osherove on Unit Testing Good Practices and Horrible Mistakes
Roy Osherove on Unit Testing Good Practices and Horrible Mistakes
 
Unit Testing Best Practices
Unit Testing Best PracticesUnit Testing Best Practices
Unit Testing Best Practices
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Unit testing
Unit testingUnit testing
Unit testing
 
Unit test
Unit testUnit test
Unit test
 
Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017
 
JS Fest 2018. Андрей Кучеренко. Мутационное тестирование в JavaScript
JS Fest 2018. Андрей Кучеренко. Мутационное тестирование в JavaScriptJS Fest 2018. Андрей Кучеренко. Мутационное тестирование в JavaScript
JS Fest 2018. Андрей Кучеренко. Мутационное тестирование в JavaScript
 
Unit Testing with Python
Unit Testing with PythonUnit Testing with Python
Unit Testing with Python
 
Unit tests & TDD
Unit tests & TDDUnit tests & TDD
Unit tests & TDD
 
Unit testing
Unit testingUnit testing
Unit testing
 
Clean Unit Test Patterns
Clean Unit Test PatternsClean Unit Test Patterns
Clean Unit Test Patterns
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Unit testing - the hard parts
Unit testing - the hard partsUnit testing - the hard parts
Unit testing - the hard parts
 
Unit Tests And Automated Testing
Unit Tests And Automated TestingUnit Tests And Automated Testing
Unit Tests And Automated Testing
 

En vedette

Mutation Testing
Mutation TestingMutation Testing
Mutation TestingESUG
 
An introduction to mutation testing
An introduction to mutation testingAn introduction to mutation testing
An introduction to mutation testingdavidmus
 
Mutagens
MutagensMutagens
MutagensUE
 

En vedette (6)

Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
 
An introduction to mutation testing
An introduction to mutation testingAn introduction to mutation testing
An introduction to mutation testing
 
Mutagen
MutagenMutagen
Mutagen
 
Mutagens
MutagensMutagens
Mutagens
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similaire à Mutation testing

DYNAMUT: A MUTATION TESTING TOOL FOR INDUSTRY-LEVEL EMBEDDED SYSTEM APPLICATIONS
DYNAMUT: A MUTATION TESTING TOOL FOR INDUSTRY-LEVEL EMBEDDED SYSTEM APPLICATIONSDYNAMUT: A MUTATION TESTING TOOL FOR INDUSTRY-LEVEL EMBEDDED SYSTEM APPLICATIONS
DYNAMUT: A MUTATION TESTING TOOL FOR INDUSTRY-LEVEL EMBEDDED SYSTEM APPLICATIONSijesajournal
 
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing
Wodel-Test: A Model-Based Framework for Language-Independent Mutation TestingWodel-Test: A Model-Based Framework for Language-Independent Mutation Testing
Wodel-Test: A Model-Based Framework for Language-Independent Mutation TestingPablo Gómez Abajo
 
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationTMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationIosif Itkin
 
EXPERIMENTAL EVALUATION AND RESULT DISCUSSION OF METAMORPHIC TESTING AUTOMATI...
EXPERIMENTAL EVALUATION AND RESULT DISCUSSION OF METAMORPHIC TESTING AUTOMATI...EXPERIMENTAL EVALUATION AND RESULT DISCUSSION OF METAMORPHIC TESTING AUTOMATI...
EXPERIMENTAL EVALUATION AND RESULT DISCUSSION OF METAMORPHIC TESTING AUTOMATI...IAEME Publication
 
Parameter Estimation of Software Reliability Growth Models Using Simulated An...
Parameter Estimation of Software Reliability Growth Models Using Simulated An...Parameter Estimation of Software Reliability Growth Models Using Simulated An...
Parameter Estimation of Software Reliability Growth Models Using Simulated An...Editor IJCATR
 
Performance testing and_reporting_with_j_meter by Le Van Nghi
Performance testing and_reporting_with_j_meter by  Le Van NghiPerformance testing and_reporting_with_j_meter by  Le Van Nghi
Performance testing and_reporting_with_j_meter by Le Van NghieXo Platform
 
Genetic Algorithm based Optimization of Machining Parameters
Genetic Algorithm based Optimization of Machining ParametersGenetic Algorithm based Optimization of Machining Parameters
Genetic Algorithm based Optimization of Machining ParametersAngshuman Pal
 
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...Lionel Briand
 
Fault Modeling of Combinational and Sequential Circuits at Register Transfer ...
Fault Modeling of Combinational and Sequential Circuits at Register Transfer ...Fault Modeling of Combinational and Sequential Circuits at Register Transfer ...
Fault Modeling of Combinational and Sequential Circuits at Register Transfer ...VLSICS Design
 
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...VLSICS Design
 
Mutation Testing for DSLs (Tool Demo)
Mutation Testing for DSLs (Tool Demo)Mutation Testing for DSLs (Tool Demo)
Mutation Testing for DSLs (Tool Demo)Pablo Gómez Abajo
 
A PARTICLE SWARM OPTIMIZATION TECHNIQUE FOR GENERATING PAIRWISE TEST CASES
A PARTICLE SWARM OPTIMIZATION TECHNIQUE FOR GENERATING PAIRWISE TEST CASESA PARTICLE SWARM OPTIMIZATION TECHNIQUE FOR GENERATING PAIRWISE TEST CASES
A PARTICLE SWARM OPTIMIZATION TECHNIQUE FOR GENERATING PAIRWISE TEST CASESKula Sekhar Reddy Yerraguntla
 
Theta: a Framework for Abstraction Refinement-Based Model Checking
Theta: a Framework for Abstraction Refinement-Based Model CheckingTheta: a Framework for Abstraction Refinement-Based Model Checking
Theta: a Framework for Abstraction Refinement-Based Model CheckingAkos Hajdu
 
Software Testing: Test Design and the Project Life Cycle
Software Testing: Test Design and the Project Life CycleSoftware Testing: Test Design and the Project Life Cycle
Software Testing: Test Design and the Project Life CycleDerek Callaway
 
Code coverage based test case selection and prioritization
Code coverage based test case selection and prioritizationCode coverage based test case selection and prioritization
Code coverage based test case selection and prioritizationijseajournal
 
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Wolfgang Grieskamp
 

Similaire à Mutation testing (20)

DYNAMUT: A MUTATION TESTING TOOL FOR INDUSTRY-LEVEL EMBEDDED SYSTEM APPLICATIONS
DYNAMUT: A MUTATION TESTING TOOL FOR INDUSTRY-LEVEL EMBEDDED SYSTEM APPLICATIONSDYNAMUT: A MUTATION TESTING TOOL FOR INDUSTRY-LEVEL EMBEDDED SYSTEM APPLICATIONS
DYNAMUT: A MUTATION TESTING TOOL FOR INDUSTRY-LEVEL EMBEDDED SYSTEM APPLICATIONS
 
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing
Wodel-Test: A Model-Based Framework for Language-Independent Mutation TestingWodel-Test: A Model-Based Framework for Language-Independent Mutation Testing
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing
 
Cots testing
Cots testingCots testing
Cots testing
 
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case GenerationTMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
TMPA-2017: A Survey on Model-Based Testing Tools for Test Case Generation
 
EXPERIMENTAL EVALUATION AND RESULT DISCUSSION OF METAMORPHIC TESTING AUTOMATI...
EXPERIMENTAL EVALUATION AND RESULT DISCUSSION OF METAMORPHIC TESTING AUTOMATI...EXPERIMENTAL EVALUATION AND RESULT DISCUSSION OF METAMORPHIC TESTING AUTOMATI...
EXPERIMENTAL EVALUATION AND RESULT DISCUSSION OF METAMORPHIC TESTING AUTOMATI...
 
Parameter Estimation of Software Reliability Growth Models Using Simulated An...
Parameter Estimation of Software Reliability Growth Models Using Simulated An...Parameter Estimation of Software Reliability Growth Models Using Simulated An...
Parameter Estimation of Software Reliability Growth Models Using Simulated An...
 
50120140502017
5012014050201750120140502017
50120140502017
 
Performance testing and_reporting_with_j_meter by Le Van Nghi
Performance testing and_reporting_with_j_meter by  Le Van NghiPerformance testing and_reporting_with_j_meter by  Le Van Nghi
Performance testing and_reporting_with_j_meter by Le Van Nghi
 
SAIConference_PAPER
SAIConference_PAPERSAIConference_PAPER
SAIConference_PAPER
 
C010241521
C010241521C010241521
C010241521
 
Genetic Algorithm based Optimization of Machining Parameters
Genetic Algorithm based Optimization of Machining ParametersGenetic Algorithm based Optimization of Machining Parameters
Genetic Algorithm based Optimization of Machining Parameters
 
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
 
Fault Modeling of Combinational and Sequential Circuits at Register Transfer ...
Fault Modeling of Combinational and Sequential Circuits at Register Transfer ...Fault Modeling of Combinational and Sequential Circuits at Register Transfer ...
Fault Modeling of Combinational and Sequential Circuits at Register Transfer ...
 
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...
FAULT MODELING OF COMBINATIONAL AND SEQUENTIAL CIRCUITS AT REGISTER TRANSFER ...
 
Mutation Testing for DSLs (Tool Demo)
Mutation Testing for DSLs (Tool Demo)Mutation Testing for DSLs (Tool Demo)
Mutation Testing for DSLs (Tool Demo)
 
A PARTICLE SWARM OPTIMIZATION TECHNIQUE FOR GENERATING PAIRWISE TEST CASES
A PARTICLE SWARM OPTIMIZATION TECHNIQUE FOR GENERATING PAIRWISE TEST CASESA PARTICLE SWARM OPTIMIZATION TECHNIQUE FOR GENERATING PAIRWISE TEST CASES
A PARTICLE SWARM OPTIMIZATION TECHNIQUE FOR GENERATING PAIRWISE TEST CASES
 
Theta: a Framework for Abstraction Refinement-Based Model Checking
Theta: a Framework for Abstraction Refinement-Based Model CheckingTheta: a Framework for Abstraction Refinement-Based Model Checking
Theta: a Framework for Abstraction Refinement-Based Model Checking
 
Software Testing: Test Design and the Project Life Cycle
Software Testing: Test Design and the Project Life CycleSoftware Testing: Test Design and the Project Life Cycle
Software Testing: Test Design and the Project Life Cycle
 
Code coverage based test case selection and prioritization
Code coverage based test case selection and prioritizationCode coverage based test case selection and prioritization
Code coverage based test case selection and prioritization
 
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
 

Plus de Tao He

Java 并发编程笔记:01. 并行与并发 —— 概念
Java 并发编程笔记:01. 并行与并发 —— 概念Java 并发编程笔记:01. 并行与并发 —— 概念
Java 并发编程笔记:01. 并行与并发 —— 概念Tao He
 
A software fault localization technique based on program mutations
A software fault localization technique based on program mutationsA software fault localization technique based on program mutations
A software fault localization technique based on program mutationsTao He
 
Introduction to llvm
Introduction to llvmIntroduction to llvm
Introduction to llvmTao He
 
Testing survey
Testing surveyTesting survey
Testing surveyTao He
 
Testing survey by_directions
Testing survey by_directionsTesting survey by_directions
Testing survey by_directionsTao He
 
Smart debugger
Smart debuggerSmart debugger
Smart debuggerTao He
 
C语言benchmark覆盖信息收集总结4
C语言benchmark覆盖信息收集总结4C语言benchmark覆盖信息收集总结4
C语言benchmark覆盖信息收集总结4Tao He
 
Django
DjangoDjango
DjangoTao He
 
基于覆盖信息的软件错误定位技术综述
基于覆盖信息的软件错误定位技术综述基于覆盖信息的软件错误定位技术综述
基于覆盖信息的软件错误定位技术综述Tao He
 
Java覆盖信息收集工具比较
Java覆盖信息收集工具比较Java覆盖信息收集工具比较
Java覆盖信息收集工具比较Tao He
 
Testing group’s work on fault localization
Testing group’s work on fault localizationTesting group’s work on fault localization
Testing group’s work on fault localizationTao He
 
Muffler a tool using mutation to facilitate fault localization 2.0
Muffler a tool using mutation to facilitate fault localization 2.0Muffler a tool using mutation to facilitate fault localization 2.0
Muffler a tool using mutation to facilitate fault localization 2.0Tao He
 
Muffler a tool using mutation to facilitate fault localization 2.3
Muffler a tool using mutation to facilitate fault localization 2.3Muffler a tool using mutation to facilitate fault localization 2.3
Muffler a tool using mutation to facilitate fault localization 2.3Tao He
 
Semantic Parsing in Bayesian Anti Spam
Semantic Parsing in Bayesian Anti SpamSemantic Parsing in Bayesian Anti Spam
Semantic Parsing in Bayesian Anti SpamTao He
 
Problems
ProblemsProblems
ProblemsTao He
 
A survey of software testing
A survey of software testingA survey of software testing
A survey of software testingTao He
 
Cleansing test suites from coincidental correctness to enhance falut localiza...
Cleansing test suites from coincidental correctness to enhance falut localiza...Cleansing test suites from coincidental correctness to enhance falut localiza...
Cleansing test suites from coincidental correctness to enhance falut localiza...Tao He
 
Concrete meta research - how to collect, manage, and read papers?
Concrete meta research - how to collect, manage, and read papers?Concrete meta research - how to collect, manage, and read papers?
Concrete meta research - how to collect, manage, and read papers?Tao He
 

Plus de Tao He (18)

Java 并发编程笔记:01. 并行与并发 —— 概念
Java 并发编程笔记:01. 并行与并发 —— 概念Java 并发编程笔记:01. 并行与并发 —— 概念
Java 并发编程笔记:01. 并行与并发 —— 概念
 
A software fault localization technique based on program mutations
A software fault localization technique based on program mutationsA software fault localization technique based on program mutations
A software fault localization technique based on program mutations
 
Introduction to llvm
Introduction to llvmIntroduction to llvm
Introduction to llvm
 
Testing survey
Testing surveyTesting survey
Testing survey
 
Testing survey by_directions
Testing survey by_directionsTesting survey by_directions
Testing survey by_directions
 
Smart debugger
Smart debuggerSmart debugger
Smart debugger
 
C语言benchmark覆盖信息收集总结4
C语言benchmark覆盖信息收集总结4C语言benchmark覆盖信息收集总结4
C语言benchmark覆盖信息收集总结4
 
Django
DjangoDjango
Django
 
基于覆盖信息的软件错误定位技术综述
基于覆盖信息的软件错误定位技术综述基于覆盖信息的软件错误定位技术综述
基于覆盖信息的软件错误定位技术综述
 
Java覆盖信息收集工具比较
Java覆盖信息收集工具比较Java覆盖信息收集工具比较
Java覆盖信息收集工具比较
 
Testing group’s work on fault localization
Testing group’s work on fault localizationTesting group’s work on fault localization
Testing group’s work on fault localization
 
Muffler a tool using mutation to facilitate fault localization 2.0
Muffler a tool using mutation to facilitate fault localization 2.0Muffler a tool using mutation to facilitate fault localization 2.0
Muffler a tool using mutation to facilitate fault localization 2.0
 
Muffler a tool using mutation to facilitate fault localization 2.3
Muffler a tool using mutation to facilitate fault localization 2.3Muffler a tool using mutation to facilitate fault localization 2.3
Muffler a tool using mutation to facilitate fault localization 2.3
 
Semantic Parsing in Bayesian Anti Spam
Semantic Parsing in Bayesian Anti SpamSemantic Parsing in Bayesian Anti Spam
Semantic Parsing in Bayesian Anti Spam
 
Problems
ProblemsProblems
Problems
 
A survey of software testing
A survey of software testingA survey of software testing
A survey of software testing
 
Cleansing test suites from coincidental correctness to enhance falut localiza...
Cleansing test suites from coincidental correctness to enhance falut localiza...Cleansing test suites from coincidental correctness to enhance falut localiza...
Cleansing test suites from coincidental correctness to enhance falut localiza...
 
Concrete meta research - how to collect, manage, and read papers?
Concrete meta research - how to collect, manage, and read papers?Concrete meta research - how to collect, manage, and read papers?
Concrete meta research - how to collect, manage, and read papers?
 

Dernier

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Dernier (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Mutation testing

  • 1. An Analysis and Survey of the Development of Mutation Testing[JH09] About 30 minutes Tao He elfinhe@gmail.com Software Engineering Laboratory Department of Computer Science, Sun Yat-Sen University With thanks to Yue Jia and Mark Harman These slides are mainly extracted from Jia and Harman’s survey work May 2011 Sun Yat-Sen University, Guangzhou, China [JH09] Yue Jia, Mark Harman (September 2009). "An Analysis and Survey of the Development of Mutation Testing" (PDF). CREST Centre, King's College London, Technical Report TR-09-06. 1/37
  • 2. Outline  Objectives  Scope  Classification of Research  Fundamental Hypotheses  Related Concepts  Future Trend  Tools
  • 3. Objectives of Mutation Testing  Provide “mutation adequacy score”  Measure the effectiveness of a test set in terms of its ability to detect faults 3/20
  • 4. Scope of Mutation Testing  The unit level  The integration level  The specification level  As a white-box unit test technique
  • 5. Theoretical work on Mutation Testing  Hypotheses supporting Mutation Testing  Optimization techniques  techniques for reducing computational cost  techniques for the detection of equivalent mutants
  • 6. Practical work on Mutation Testing  Applications of Mutation Testing  Development work on Mutation Testing tools  Empirical work
  • 8. Competent Programmer Hypothesis (CPH)  Programs can be corrected by a few small syntactical changes.
  • 9. Coupling Effect  Test data sets that detect simple types of faults are sensitive enough to detect more complex types of faults  A simple fault is represented by a simple mutant which is created by making a single syntactical change  A complex fault is represented as a complex mutant which is created by making more than one change
  • 10. A Mutation Operator  A transformation rule that generates a mutant from the original program  Generate ‘realistic faults’
  • 11. Behaviors of Mutation Operators  Mutation Objects  Variables  Expressions  Mutation Operation  Replacement  Insertion  Deletion
  • 12. Problems of Mutation Analysis  Executing the enormous number of mutants  Human effort  The human oracle problem  The equivalent mutant problem
  • 14. Classification of Cost Reduction Techniques  Reduction of the generated mutants (may be taken into consideration in our approach for Fault Localization)  Reduction of the execution cost
  • 15. Mutants Reduction Techniques  Mutant Sampling  Random  Based on the Bayesian sequential probability ratio test (SPRT)  Mutant Clustering  Based on killable test cases  Selective Mutation  By reducing the number of mutation operators applied.  Ignore operators ASR and SVR - redundant generation  Only using ABS and ROR
  • 16. Evaluation of Mutants Reduction  A mean mutation score  Reduction in the number of mutants  Number of equivalent mutants
  • 17. Execution Cost Reduction Techniques  Strong Mutation  Weak Mutation  Firm Mutation  by providing a continuum of intermediate possibilities - compare state, which lies between execution (Weak Mutation) and the final output (Strong Mutation).
  • 18. Equivalent Mutant Detection Techniques  10% to 40% of mutants which are equivalent
  • 19. Empirical Study  Compare mutation criteria with data flow criteria such as 'all-use'  Compare mutants with real faults
  • 20. Future Trend  A need for high quality higher order mutants  A need to reduce the equivalent mutants  A preference for semantics over syntax mutation  An interest in achieving a better balance between cost and value  A pressing need to generate test cases to kill mutants
  • 21. Life circle of Mutation Testing  Generate mutants based on specified mutation operations  Reduce mutants  Run mutants against a test suite
  • 23. Goals of Mutation to Enhance Fault Localization  Not aim to simulate real faults  Analyze the impact of mutation on the suspiciousness of the mutated statement
  • 24. Name Application Year Character Available Suitable Higher Order Mutation, MILU C 2008 Search-based technique, Yes No Test harness embedding MUFORMAT C 2008 Format String Bugs No No ESPT C/C++ 2008 Tabular No No Variable type CSAW C 2007 Yes No optimization ExMAn C, Java 2006 TXL No No SESAME C, Lustre, Pascal 2006 Assembler Injection No No Certitude C/C++ 2006 General (Commercial) Commercially No Plextest C/C++ 2005 General (Commercial) Commercially No Interface Mutation, Proteum/IM 2.0 C 2001 Yes Yes Finite State Machines Source Code Insure++ C/C++ 1998 Instrumentation Commercially No (Commercial) Mutant Schemata TUMS C 1995 No No Generation Interface Mutation, Proteum 1.4 C 1993 No No Finite State Machines Published C Mutation Testing Tools
  • 25. Proteum  Environment Variable: PROTEUMIMHOME  li -P pre-filename [-D directory] source-filename LI-filename  Call gcc to preprocess the source code file source-filename.c and produce a file pre-filename.c. Then parse the file pre-filename.c and generate various info files  opmuta [-<operator> n m] [-all n m] source-filename Li- filename  Apply mutant operators to the source code and LI files. As ouput, opmuta produces a description file in a format that muta is able to read and include in the mutant database.
  • 26. strutt .h include space.c source code li ~/smart_debugger/toolkit/proteum/li -P pre-space space li-space pre-space.c li-space.nli li-space.fun li-space.cgr li-spaec.gfc statement info function info call graph info def-use pair info opmuta ~/smart_debugger/toolkit/proteum/opmuta -O Operators pre-one_statement li one_statement > mutants.txt - Proteum.py include function name by directory Mutants line number by mutantdsc . mutants.txt GenetrateMutants .py mutation operator by mutant .dsc all mutants info Proteum – An Example: Space
  • 27. Thoughts of Self-Made Mutants Generator  I once consider to implement a self-made mutants generator.  Only mutate one statement  Not aim to simulate real faults  IPO  Input  A piece of source code  Line number to mutate  Mutation operators  Process  Preprocess -> Scan -> Parse -> Mutate  Output  Mutants
  • 28. Collection of Compiler Front-end Tools  GCC-XML …failed  E.g.  source code: http://www.gccxml.org/HTML/example1in.html  Parse-tree: http://www.gccxml.org/HTML/example1out.html  LLVM … not try, good for Objective-C? http://llvm.org/
  • 29. Collection of Compiler Front-end Tools  GCC … failed, maybe no parse-tree for GCC  -fdump-tree-fixup cfg-lineno http://stackoverflow.com/questions/697817/how-to-make-gcc-spi  -fdump-tree-all -fdump-rtl-all http://stackoverflow.com/questions/1496497/how-can-i-see-parse  -fprofile-arcs -ftest-coverage  gcno gcda: not readable for human beings  gcov: offer the line number, separated statements
  • 30. Useful links  http://en.wikipedia.org/wiki/Mutation_testing  http://cs.gmu.edu/~offutt/rsrch/mut.html  http://www.dcs.kcl.ac.uk/pg/jiayue/repository/
  • 31. Q&A 31/37
  • 32. Thank you! Contact me via elfinhe@gmail.com 32/37
  • 33. Abstract  Fault localization is a technique that aims to pinpoint faults by analyzing program execution spectrum, while mutation is a testing technique used by generating faulty programs called mutants. Most of existing research in fault localization focuses on the spectrum of the given programs. Yet there are few attempts to introduce mutation’s impact to enhance fault localization techniques. In this paper, we propose a strategy that automatically introduces mutation into fault localization techniques, and present variations of a heuristic method to compute suspiciousness of each statement by considering the impact of mutation. To validate our method, experiments is conducted on benchmark programs, namely Siemens, grep, gzip, sed, space, flex, make, vim, and bash. Results indicate that the method can help programmers locate faults more effectively than methods without mutation. 33/20

Notes de l'éditeur

  1. 感谢 Yue Jia 和 Mark Harman
  2. i.e., test data that distinguishes all programs differing from a correct one by only simple errors is so sensitive that it also implicitly distinguishes more complex errors
  3.   Milu 是开源的么? 不是 可以使用 Milu 的 API 么? 可以当成 tool 来使用 不过生成的代码插入了许多无用的宏定义代码,这是为什么呢? 插入的宏定义代码对我的实验哪些影响呢? Evaluation 阶段:错误代码行号变化了。 编译执行阶段:不知道还能否编译通过:不能:只能用 milu 来调用执行 gcc 。( main 函数不见了) 抓捕覆盖信息的时候,不能保证行号一致性。 只能使用 GUI 操作么? 还有命令行的操作,但是仅有的文档如下所示: Usage:    milu [OPTION...] - Milu first order mutation testing system Help Options:    -h, --help             Show help options Application Options:    --GUI                  Call from milu_GUI    --mode=M               Mode for each options    --killingtime=K        Killing time for loop mutants    --gcc=G                Specify a compiler to use    -v, --verbose          Be verbose    -s, --silent           Be silent    --noindent             Not apply indent to pretty print source code    -f, --test-file        Try to parse individual file    -p, --test-project     Try to parse source folder    -i, --init             Init Milu with project source path, output function list    -m, --generate_mut     Generate mutants    -t, --run_test         Run mutants ======================================================= ======================================================= ======================================================= CSAW Variable type optimization   : 无法配置变异类型(在源码层次可以, table-driven ,非常难配置) http://www.skicambridge.com/papers/   http://computing-reports.open.ac.uk/2007/TR2007-09.pdf Worked Example 1 – Bubble sort  如何配置变异类型? 变异之前需要预处理什么? 把相应的函数拷贝出来 变异完成之后需要做什么? 把相应的函数替换进去。 我们需要使用 driver , oracle 这些程序么? 不需要。 查看过 csaw 的论文,他们是基于函数来做 mutation 的,所以他们才需要 driver 这样的东西 而我们需要做的是,手动或者自动的把函数替换回原来的程序。 记得之前有一篇在 Siemens 上做 evaluation 的 tool 是哪一个? symbol tables 是什么? Manual 中最重要的章节是什么? Procedure 为什么需要在 test.c 中定义全局变量,全局函数呢? 因为 test.c 并不知道全局的信息。 处理过程的程序文件依次是什么? test.c nogen.txt: suppress the generation of specific numbered mutants line.c mutant.c  symbol_table.txt: be examined for errors pointers.h driver.c 我们试着先把第一步 line.c 跑完 ERROR : could not find input file &lt;param.txt&gt; 试着把 trash 中的文件移过来 Failed 重新解压一次 Failed 编写 nogen.txt Succeed 这里有一个最重要的问题:我们是如何配置变异类型的? 我们试着把 mutant.c 跑完 ======================================================= ======================================================= =======================================================
  4. 其实我们这个变异不要求模拟人犯的错误 我们的目标是: 把正确的代码变得特别特别的错误,最好在大多数测试用例上将错误传播到输出 我们的目标:变异出更多的 failed 把错误的代码变得疑似度排名变化不大 这里有一个问题:要是原来 Coincidental Correctness 本来很多,这里一变异, Coincidental Correctness 反而减少,那么错误疑似度也会增长得很厉害。 我们的目标:变异出更多的 Coincidental Correctness mutation 的变异算子有哪些? mutation 如何分类? 而且我们的 Selection Criteria 是不同的 疑似度的变化 疑似度排名的变化 覆盖 hit 的变化 覆盖 count 的变化 出现 failed ,却没有覆盖了的语句!!!也有可能是错的了,因为可能有多个错误