advances in mutation testing research for c
play

Advances in Mutation Testing Research for C++ Pedro Delgado-Prez - PowerPoint PPT Presentation

Introduction Mutation Operators Conclusion Advances in Mutation Testing Research for C++ Pedro Delgado-Prez TAROT: Intro Talk June 2015 P. Delgado-Prez UCASE (University of Cdiz) Advances in Mutation Testing Research for C++ TAROT:


  1. Introduction Mutation Operators Conclusion Advances in Mutation Testing Research for C++ Pedro Delgado-Pérez TAROT: Intro Talk June 2015 P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 1 / 24

  2. Introduction Mutation Operators Conclusion Index Introduction 1 Mutation testing Research line Mutation Operators 2 Class mutation operators Mutation operator implementation Correct mutations Conclusion 3 Conclusion P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 2 / 24

  3. Introduction Mutation Operators Conclusion Index Introduction 1 Mutation testing Research line Mutation Operators 2 Class mutation operators Mutation operator implementation Correct mutations Conclusion 3 Conclusion P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 3 / 24

  4. Introduction Mutation Operators Conclusion Mutation testing A brief definition A fault injection testing technique. x > 1 → x < 1 Involves inserting simple syntactic changes in the program using mutation operators. Mutation operators are based on typical mistakes. This modification creates a new version called mutant. Goals Measure how good is a test suite detecting faults affecting the program. 1 Improve the test suite through the results of the mutants. 2 P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 4 / 24

  5. Introduction Mutation Operators Conclusion Mutation testing A brief definition A fault injection testing technique. x > 1 → x < 1 Involves inserting simple syntactic changes in the program using mutation operators. Mutation operators are based on typical mistakes. This modification creates a new version called mutant. Goals Measure how good is a test suite detecting faults affecting the program. 1 Improve the test suite through the results of the mutants. 2 P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 4 / 24

  6. Introduction Mutation Operators Conclusion Mutation testing Mutant classification Dead: The output of the original program and the mutant is different. 1 Alive: The change has not been detected: 2 Equivalence: The change cannot be detected by any input. A new test case is needed to detect the change. Invalid: The mutant does not comply with the grammar rules. 3 P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 5 / 24

  7. Introduction Mutation Operators Conclusion Mutation testing Mutant classification Dead: The output of the original program and the mutant is different. 1 Alive: The change has not been detected: 2 Equivalence: The change cannot be detected by any input. A new test case is needed to detect the change. Invalid: The mutant does not comply with the grammar rules. 3 P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 5 / 24

  8. Introduction Mutation Operators Conclusion Index Introduction 1 Mutation testing Research line Mutation Operators 2 Class mutation operators Mutation operator implementation Correct mutations Conclusion 3 Conclusion P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 6 / 24

  9. Introduction Mutation Operators Conclusion Mutation testing research History First ideas in 1970s. Early years: around procedural languages → traditional operators From 1990s onwards: around other kind of languages and domains. Mutation tools developed Mothra - FORTRAN MuJava - Java GAmera - WS-BPEL ... P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 7 / 24

  10. Introduction Mutation Operators Conclusion Mutation testing research Motivation One of the most important programming languages → 4 th position in TIOBE index. Research regarding C++ was pending. Obtaining results about the usefulness of this technique in C++. Possible reasons Complexity of the language. The technique to inject mutations in the code. Dependency analysis of source code files. P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 8 / 24

  11. Introduction Mutation Operators Conclusion Mutation testing research Motivation One of the most important programming languages → 4 th position in TIOBE index. Research regarding C++ was pending. Obtaining results about the usefulness of this technique in C++. Possible reasons Complexity of the language. The technique to inject mutations in the code. Dependency analysis of source code files. P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 8 / 24

  12. Introduction Mutation Operators Conclusion The C++ programming language Achievements State of the art [1]. 1 Definition of a set of class-level mutation operators [2]. 2 Implementation of class mutation operators. 3 P . Delgado-Pérez, I. Medina-Bulo and J. J. Domínguez-Jiménez. Analysis of the development process of a mutation testing tool for the C++ language. In The Ninth International Multi-Conference on Computing in the Global Information Technology, ICCGI 2014 . Seville, Spain, 2014. P . Delgado-Pérez, I. Medina-Bulo, J. Domínguez-Jiménez, A. García-Domínguez and F. Palomo-Lozano. Class mutation operators for C++ object-oriented systems. Annals of Telecommunications , April 2015. ISSN 0003-4347. P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 9 / 24

  13. Introduction Mutation Operators Conclusion Index Introduction 1 Mutation testing Research line Mutation Operators 2 Class mutation operators Mutation operator implementation Correct mutations Conclusion 3 Conclusion P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 10 / 24

  14. Introduction Mutation Operators Conclusion Categories Summary Definition of 37 operators at the class level. Operators grouped into 7 categories. Adapted and new operators. Access control 1 Inheritance 2 Polymorphism and dynamic binding 3 Method overloading 4 Exception handling 5 Object and member replacement 6 Miscellany 7 P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 11 / 24

  15. Introduction Mutation Operators Conclusion Categories Summary Definition of 37 operators at the class level. Operators grouped into 7 categories. Adapted and new operators. Access control 1 Inheritance 2 Polymorphism and dynamic binding 3 Method overloading 4 Exception handling 5 Object and member replacement 6 Miscellany 7 P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 11 / 24

  16. Introduction Mutation Operators Conclusion Example Example “Inheritance” block: IOD (Overriding method deletion) Original: class A { class B: public A{ ... ... ... ... int method(){... ...}; int method(){... ...}; }; }; Mutant: class A { class B: public A{ ... ... ... ... /*IOD*/ int method(){... ...}; }; }; P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 12 / 24

  17. Introduction Mutation Operators Conclusion Example Example “Inheritance” block: IOD (Overriding method deletion) Original: class A { class B: public A{ ... ... ... ... int method(){... ...}; int method(){... ...}; }; }; Mutant: class A { class B: public A{ ... ... ... ... /*IOD*/ int method(){... ...}; }; }; P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 12 / 24

  18. Introduction Mutation Operators Conclusion Example Example “Inheritance” block: IOD (Overriding method deletion) Original: class A { class B: public A{ ... ... ... ... int method(){... ...}; int method(){... ...}; }; }; Mutant: class A { class B: public A{ ... ... ... ... /*IOD*/ int method(){... ...}; }; }; P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 12 / 24

  19. Introduction Mutation Operators Conclusion Example Example “Polymorphism” block: PVI ( virtual modifier insertion) Original: class A { class B: public A{ ... ... ... ... int method(){... ...}; int method(){... ...}; }; }; Mutant: class A { ... ... virtual int method(){... ...}; }; P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 13 / 24

  20. Introduction Mutation Operators Conclusion Example Example “Polymorphism” block: PVI ( virtual modifier insertion) Original: class A { class B: public A{ ... ... ... ... int method(){... ...}; int method(){... ...}; }; }; Mutant: class A { ... ... virtual int method(){... ...}; }; P. Delgado-Pérez UCASE (University of Cádiz) Advances in Mutation Testing Research for C++ TAROT: Intro Talk 13 / 24

Recommend


More recommend