SlideShare a Scribd company logo
1 of 10
e-movimento Software Design & Beratung GmbH
1030 Wien ● Marxergasse 7/26 ► www.e-movimento.com
Mutation-Testing mit PIT
www.pitest.org
Mutation Testing – Was?
 Definition (https://en.wikipedia.org/wiki/Mutation_testing):
Mutation testing (or Mutation analysis or Program
mutation) is used to design new software tests and evaluate
the quality of existing software tests. Mutation testing
involves modifying a program in small ways. Each mutated
version is called a mutant and tests detect and reject
mutants by causing the behavior of the original version to
differ from the mutant. This is called killing the mutant. Test
suites are measured by the percentage of mutants that they
kill.
► www.e-movimento.com, Sebastian Dietrich2
Mutation Testing – Wozu?
 Ziel:
The purpose is to help the tester develop effective tests or
locate weaknesses in the test data used for the program or
in sections of the code that are seldom or never accessed
during execution. Mutation testing is a form of white-box
testing.
 Reicht das?
"Quis custodiet ipsos custodes?“
“Wer wird die Wächter selbst bewachen?“
[Juvenal, Satire 6, 347f.]
► www.e-movimento.com, Sebastian Dietrich3
 muJava A mutation tool for Java that
includes class-level operators
 mutate.py A Python script to mutate
C-programs
 Mutator A source-based multi-
language commercial mutation
analyzer for concurrent Java, Ruby,
JavaScript and PHP
 Bacterio Mutation testing tool for
multi-class Java systems
 Javalanche Bytecode-based mutation
testing tool for Java
 Major Compiler-integrated mutation
testing framework for Java
 Jumble Bytecode-based mutation
testing tool for Java
 PIT Bytecode-based mutation
testing tool for Java
 Stryker Mutation testing tool for
JavaScript
 Mutant AST based mutation testing
tool for Ruby
 Jester Source-based mutation testing
tool for Java
 Judy Mutation testing tool for Java
 Heckle Mutation testing tool for Ruby
 NinjaTurtles IL-based mutation testing
tool for .NET and Mono
 Nester Mutation testing tool for C#
 Humbug Mutation testing tool for PHP
 MuCheck Mutation analysis library for
Haskell
Mutation Testing - PIT
► www.e-movimento.com, Sebastian Dietrich4
PIT
 Ändert Bytecode und lässt
Tests laufen
 Arbeitet mit ant, maven,
gradle, ...
 Plugins für Eclipse, IDEA, ...
 Dunkelgrün = Mutation Coverage
 Hellgrün = Line Coverage
 Hellrot = keine Line Coverage
 Dunkelrot = keine Mutation Coverage
► www.e-movimento.com, Sebastian Dietrich5
 Conditionals Boundary:
<  <=, >=  >, ...
 Negate Conditionals:
==  !=, >=  <
 Remove Conditionals:
a == b  true
 Math Mutator:
+  -, &  |, <<  >>, ...
 Increments Mutator:
i++  i—, i--  i++
 Invert Negatives:
-i  i
 Inline Constant:
int i = 5;  int i =-1;
 Return Values:
return true;  return false;
return x;  return x+1;
return obj;  return null;
return null;  RuntimeExc
 Void Method Call:
doSomething();  ;
 Non Void Method Call:
return5();  0;
 Constructor Call:
new Object();  null;
PIT – Mutators (Auszug – in Summe 7/13)
► www.e-movimento.com, Sebastian Dietrich6
Praxis – UnitTests eines Moduls
 1.735 Tests  69,5% Coverage (lt. Sonar)
 Min. 5GB RAM für Maven-Build
  12857 Mutationen, davon 5312 gekillt (weil doppelt)
  19.117 Tests
  41% Mutation Coverage (63% Line Coverage)
Laufzeit
 mvn test  3:18 min.
vs.
 mvn pitest-maven:mutationCoverage 
► www.e-movimento.com, Sebastian Dietrich8
Laufzeit – Aber...
 Incremental analysis möglich (nicht getestet):
 Mutation Killed, weder Test noch Klasse geändert  Mutation gilt
weiterhin als gekilled
 Mutation Überlebt, weder Test noch Klasse geändert, kein neuer
Test covered diese Klasse  Mutation gilt weiterhin als überlebt
 Mutation Killed, Klasse oder Test geändert  Mutation wird
vermutlich weiterhin gekilled werden  höhere Prio
 ...
► www.e-movimento.com, Sebastian Dietrich9
Konklusio
 Für Coverage-Kennzahlen größerer Module ungeeignet
(da zu viel RAM nötig)
 Für Build vermutlich ungeeignet (da zu langsam –
incremental analysis check noch offen)
 Zum Schreiben/Perfektionieren/Verbessern einzelner
Unit-Tests gut geeignet
 Am besten mit Plugins arbeiten
► www.e-movimento.com, Sebastian Dietrich10

More Related Content

What's hot

Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Filip Van Laenen
 
GeeCON - Improve your tests with Mutation Testing
GeeCON - Improve your tests with Mutation TestingGeeCON - Improve your tests with Mutation Testing
GeeCON - Improve your tests with Mutation TestingNicolas Fränkel
 
Mutation Testing and MuJava
Mutation Testing and MuJavaMutation Testing and MuJava
Mutation Testing and MuJavaKrunal Parmar
 
Mutation testing
Mutation testingMutation testing
Mutation testing기영 이
 
MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system Tarin Gamberini
 
Mutation testing
Mutation testingMutation testing
Mutation testingTao He
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing10Pines
 
Test driven development - JUnit basics and best practices
Test driven development - JUnit basics and best practicesTest driven development - JUnit basics and best practices
Test driven development - JUnit basics and best practicesNarendra Pathai
 
Unit testing with Junit
Unit testing with JunitUnit testing with Junit
Unit testing with JunitValerio Maggio
 
Software Engineering - RS3
Software Engineering - RS3Software Engineering - RS3
Software Engineering - RS3AtakanAral
 
[JS EXPERIENCE 2018] “Who watches the watchmen": Testando nossos testes - Mar...
[JS EXPERIENCE 2018] “Who watches the watchmen": Testando nossos testes - Mar...[JS EXPERIENCE 2018] “Who watches the watchmen": Testando nossos testes - Mar...
[JS EXPERIENCE 2018] “Who watches the watchmen": Testando nossos testes - Mar...iMasters
 
Simple Unit Testing With Netbeans 6.1
Simple Unit Testing With Netbeans 6.1Simple Unit Testing With Netbeans 6.1
Simple Unit Testing With Netbeans 6.1Kiki Ahmadi
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test frameworkAbner Chih Yi Huang
 
Unit testing best practices with JUnit
Unit testing best practices with JUnitUnit testing best practices with JUnit
Unit testing best practices with JUnitinTwentyEight Minutes
 

What's hot (20)

Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
Mutation Testing with PIT (Booster 2014, 2014-MAR-13)
 
GeeCON - Improve your tests with Mutation Testing
GeeCON - Improve your tests with Mutation TestingGeeCON - Improve your tests with Mutation Testing
GeeCON - Improve your tests with Mutation Testing
 
Mutation Testing and MuJava
Mutation Testing and MuJavaMutation Testing and MuJava
Mutation Testing and MuJava
 
Mutation testing
Mutation testingMutation testing
Mutation testing
 
MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system
 
Mutation testing
Mutation testingMutation testing
Mutation testing
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
 
ATPG flow chart
ATPG flow chart ATPG flow chart
ATPG flow chart
 
Mutation testing in Java
Mutation testing in JavaMutation testing in Java
Mutation testing in Java
 
Test driven development - JUnit basics and best practices
Test driven development - JUnit basics and best practicesTest driven development - JUnit basics and best practices
Test driven development - JUnit basics and best practices
 
Unit testing with Junit
Unit testing with JunitUnit testing with Junit
Unit testing with Junit
 
Junit
JunitJunit
Junit
 
Software Engineering - RS3
Software Engineering - RS3Software Engineering - RS3
Software Engineering - RS3
 
Introduction to JUnit
Introduction to JUnitIntroduction to JUnit
Introduction to JUnit
 
Unit testing 101
Unit testing 101Unit testing 101
Unit testing 101
 
[JS EXPERIENCE 2018] “Who watches the watchmen": Testando nossos testes - Mar...
[JS EXPERIENCE 2018] “Who watches the watchmen": Testando nossos testes - Mar...[JS EXPERIENCE 2018] “Who watches the watchmen": Testando nossos testes - Mar...
[JS EXPERIENCE 2018] “Who watches the watchmen": Testando nossos testes - Mar...
 
Simple Unit Testing With Netbeans 6.1
Simple Unit Testing With Netbeans 6.1Simple Unit Testing With Netbeans 6.1
Simple Unit Testing With Netbeans 6.1
 
An introduction to Google test framework
An introduction to Google test frameworkAn introduction to Google test framework
An introduction to Google test framework
 
Unit testing with JUnit
Unit testing with JUnitUnit testing with JUnit
Unit testing with JUnit
 
Unit testing best practices with JUnit
Unit testing best practices with JUnitUnit testing best practices with JUnit
Unit testing best practices with JUnit
 

Similar to Mutation-Testing mit PIT

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
 
Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Gerald Muecke
 
Fuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation TestingFuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation TestingLionel Briand
 
Mutation Testing.pdf
Mutation Testing.pdfMutation Testing.pdf
Mutation Testing.pdfKeir Bowden
 
SophiaConf 2018 - P. Urso (Activeeon)
SophiaConf 2018 - P. Urso (Activeeon)SophiaConf 2018 - P. Urso (Activeeon)
SophiaConf 2018 - P. Urso (Activeeon)TelecomValley
 
Robustness Metrics for ML Models based on Deep Learning Methods
Robustness Metrics for ML Models based on Deep Learning MethodsRobustness Metrics for ML Models based on Deep Learning Methods
Robustness Metrics for ML Models based on Deep Learning MethodsData Science Milan
 
Assessing Unit Test Quality
Assessing Unit Test QualityAssessing Unit Test Quality
Assessing Unit Test Qualityguest268ee8
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projectsVincent Massol
 
I.T.A.K.E Unconference - Mutation testing to the rescue of your tests
I.T.A.K.E Unconference - Mutation testing to the rescue of your testsI.T.A.K.E Unconference - Mutation testing to the rescue of your tests
I.T.A.K.E Unconference - Mutation testing to the rescue of your testsNicolas Fränkel
 
Engineering scikit-learn
Engineering scikit-learnEngineering scikit-learn
Engineering scikit-learnAndreas Mueller
 
New and improved: Coming changes to the unittest module
 	 New and improved: Coming changes to the unittest module 	 New and improved: Coming changes to the unittest module
New and improved: Coming changes to the unittest modulePyCon Italia
 
Real Impact Testing Analysis for JVM developers
Real Impact Testing Analysis for JVM developersReal Impact Testing Analysis for JVM developers
Real Impact Testing Analysis for JVM developersRaquel Pau
 
Puppet At Twitter - Puppet Camp Silicon Valley
Puppet At Twitter - Puppet Camp Silicon ValleyPuppet At Twitter - Puppet Camp Silicon Valley
Puppet At Twitter - Puppet Camp Silicon ValleyPuppet
 
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
 
Lecture (Software Testing).pptx
Lecture (Software Testing).pptxLecture (Software Testing).pptx
Lecture (Software Testing).pptxskknowledge
 
SSBSE 2020 keynote
SSBSE 2020 keynoteSSBSE 2020 keynote
SSBSE 2020 keynoteShiva Nejati
 

Similar to Mutation-Testing mit PIT (20)

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
 
Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016Must.kill.mutants. TopConf Tallinn 2016
Must.kill.mutants. TopConf Tallinn 2016
 
des mutants dans le code.pdf
des mutants dans le code.pdfdes mutants dans le code.pdf
des mutants dans le code.pdf
 
Fuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation TestingFuzzing for CPS Mutation Testing
Fuzzing for CPS Mutation Testing
 
Mutation Testing.pdf
Mutation Testing.pdfMutation Testing.pdf
Mutation Testing.pdf
 
SophiaConf 2018 - P. Urso (Activeeon)
SophiaConf 2018 - P. Urso (Activeeon)SophiaConf 2018 - P. Urso (Activeeon)
SophiaConf 2018 - P. Urso (Activeeon)
 
Robustness Metrics for ML Models based on Deep Learning Methods
Robustness Metrics for ML Models based on Deep Learning MethodsRobustness Metrics for ML Models based on Deep Learning Methods
Robustness Metrics for ML Models based on Deep Learning Methods
 
Assessing Unit Test Quality
Assessing Unit Test QualityAssessing Unit Test Quality
Assessing Unit Test Quality
 
groovy & grails - lecture 7
groovy & grails - lecture 7groovy & grails - lecture 7
groovy & grails - lecture 7
 
New types of tests for Java projects
New types of tests for Java projectsNew types of tests for Java projects
New types of tests for Java projects
 
I.T.A.K.E Unconference - Mutation testing to the rescue of your tests
I.T.A.K.E Unconference - Mutation testing to the rescue of your testsI.T.A.K.E Unconference - Mutation testing to the rescue of your tests
I.T.A.K.E Unconference - Mutation testing to the rescue of your tests
 
Engineering scikit-learn
Engineering scikit-learnEngineering scikit-learn
Engineering scikit-learn
 
Gallio Crafting A Toolchain
Gallio Crafting A ToolchainGallio Crafting A Toolchain
Gallio Crafting A Toolchain
 
New and improved: Coming changes to the unittest module
 	 New and improved: Coming changes to the unittest module 	 New and improved: Coming changes to the unittest module
New and improved: Coming changes to the unittest module
 
Software testing
Software testingSoftware testing
Software testing
 
Real Impact Testing Analysis for JVM developers
Real Impact Testing Analysis for JVM developersReal Impact Testing Analysis for JVM developers
Real Impact Testing Analysis for JVM developers
 
Puppet At Twitter - Puppet Camp Silicon Valley
Puppet At Twitter - Puppet Camp Silicon ValleyPuppet At Twitter - Puppet Camp Silicon Valley
Puppet At Twitter - Puppet Camp Silicon Valley
 
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...
 
Lecture (Software Testing).pptx
Lecture (Software Testing).pptxLecture (Software Testing).pptx
Lecture (Software Testing).pptx
 
SSBSE 2020 keynote
SSBSE 2020 keynoteSSBSE 2020 keynote
SSBSE 2020 keynote
 

Recently uploaded

%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 

Recently uploaded (20)

%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

Mutation-Testing mit PIT

  • 1. e-movimento Software Design & Beratung GmbH 1030 Wien ● Marxergasse 7/26 ► www.e-movimento.com Mutation-Testing mit PIT www.pitest.org
  • 2. Mutation Testing – Was?  Definition (https://en.wikipedia.org/wiki/Mutation_testing): Mutation testing (or Mutation analysis or Program mutation) is used to design new software tests and evaluate the quality of existing software tests. Mutation testing involves modifying a program in small ways. Each mutated version is called a mutant and tests detect and reject mutants by causing the behavior of the original version to differ from the mutant. This is called killing the mutant. Test suites are measured by the percentage of mutants that they kill. ► www.e-movimento.com, Sebastian Dietrich2
  • 3. Mutation Testing – Wozu?  Ziel: The purpose is to help the tester develop effective tests or locate weaknesses in the test data used for the program or in sections of the code that are seldom or never accessed during execution. Mutation testing is a form of white-box testing.  Reicht das? "Quis custodiet ipsos custodes?“ “Wer wird die Wächter selbst bewachen?“ [Juvenal, Satire 6, 347f.] ► www.e-movimento.com, Sebastian Dietrich3
  • 4.  muJava A mutation tool for Java that includes class-level operators  mutate.py A Python script to mutate C-programs  Mutator A source-based multi- language commercial mutation analyzer for concurrent Java, Ruby, JavaScript and PHP  Bacterio Mutation testing tool for multi-class Java systems  Javalanche Bytecode-based mutation testing tool for Java  Major Compiler-integrated mutation testing framework for Java  Jumble Bytecode-based mutation testing tool for Java  PIT Bytecode-based mutation testing tool for Java  Stryker Mutation testing tool for JavaScript  Mutant AST based mutation testing tool for Ruby  Jester Source-based mutation testing tool for Java  Judy Mutation testing tool for Java  Heckle Mutation testing tool for Ruby  NinjaTurtles IL-based mutation testing tool for .NET and Mono  Nester Mutation testing tool for C#  Humbug Mutation testing tool for PHP  MuCheck Mutation analysis library for Haskell Mutation Testing - PIT ► www.e-movimento.com, Sebastian Dietrich4
  • 5. PIT  Ändert Bytecode und lässt Tests laufen  Arbeitet mit ant, maven, gradle, ...  Plugins für Eclipse, IDEA, ...  Dunkelgrün = Mutation Coverage  Hellgrün = Line Coverage  Hellrot = keine Line Coverage  Dunkelrot = keine Mutation Coverage ► www.e-movimento.com, Sebastian Dietrich5
  • 6.  Conditionals Boundary: <  <=, >=  >, ...  Negate Conditionals: ==  !=, >=  <  Remove Conditionals: a == b  true  Math Mutator: +  -, &  |, <<  >>, ...  Increments Mutator: i++  i—, i--  i++  Invert Negatives: -i  i  Inline Constant: int i = 5;  int i =-1;  Return Values: return true;  return false; return x;  return x+1; return obj;  return null; return null;  RuntimeExc  Void Method Call: doSomething();  ;  Non Void Method Call: return5();  0;  Constructor Call: new Object();  null; PIT – Mutators (Auszug – in Summe 7/13) ► www.e-movimento.com, Sebastian Dietrich6
  • 7. Praxis – UnitTests eines Moduls  1.735 Tests  69,5% Coverage (lt. Sonar)  Min. 5GB RAM für Maven-Build   12857 Mutationen, davon 5312 gekillt (weil doppelt)   19.117 Tests   41% Mutation Coverage (63% Line Coverage)
  • 8. Laufzeit  mvn test  3:18 min. vs.  mvn pitest-maven:mutationCoverage  ► www.e-movimento.com, Sebastian Dietrich8
  • 9. Laufzeit – Aber...  Incremental analysis möglich (nicht getestet):  Mutation Killed, weder Test noch Klasse geändert  Mutation gilt weiterhin als gekilled  Mutation Überlebt, weder Test noch Klasse geändert, kein neuer Test covered diese Klasse  Mutation gilt weiterhin als überlebt  Mutation Killed, Klasse oder Test geändert  Mutation wird vermutlich weiterhin gekilled werden  höhere Prio  ... ► www.e-movimento.com, Sebastian Dietrich9
  • 10. Konklusio  Für Coverage-Kennzahlen größerer Module ungeeignet (da zu viel RAM nötig)  Für Build vermutlich ungeeignet (da zu langsam – incremental analysis check noch offen)  Zum Schreiben/Perfektionieren/Verbessern einzelner Unit-Tests gut geeignet  Am besten mit Plugins arbeiten ► www.e-movimento.com, Sebastian Dietrich10