prepare for… mutation testing - jug saxony · has been coding java since 1996 developer advocate...
TRANSCRIPT
![Page 1: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/1.jpg)
prepare for…
Mutation Testing..from jUnit to Mutation-Testing
![Page 2: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/2.jpg)
@SvenRuppert has been coding java since 1996
Developer Advocate
Vaadin
Germany - Munich
2
![Page 3: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/3.jpg)
@SvenRuppert has been coding java since 1996
3
![Page 4: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/4.jpg)
@SvenRuppert has been coding java since 1996
Projects in the field of:•Automobile-industry•Energy•Finance / Leasing•Space- Satellit-•Government / UN / World-bank
Where?
•Europe•Asia - from India up to Malaysia
3
![Page 5: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/5.jpg)
4
Save harbor statement
![Page 6: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/6.jpg)
4
Save harbor statement
The following is intended for information purposes only. Ican not be held responsible for the overuse of effects andanimations in this presentation. If any person in this roomhas a medical condition that is triggered by fast movingobjects on the screen and/or explosions, he/she shouldprobably better leave now…
(I got carried away by the topic.)
![Page 7: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/7.jpg)
5
@SvenRuppertThe Environment
Do you have bugs in your code ?
![Page 8: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/8.jpg)
5
@SvenRuppertThe Environment
Do you have bugs in your code ?
no
![Page 9: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/9.jpg)
5
@SvenRuppertThe Environment
Do you have bugs in your code ?
since years you are
working hard on this….
no
![Page 10: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/10.jpg)
5
@SvenRuppertThe Environment
Do you have bugs in your code ?
since years you are
working hard on this….
no
![Page 11: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/11.jpg)
6
The Environment @SvenRuppert
Codebase is > 13 years old
![Page 12: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/12.jpg)
6
The Environment @SvenRuppert
Codebase is > 13 years old no test coverage
![Page 13: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/13.jpg)
6
The Environment @SvenRuppert
Codebase is > 13 years old no test coverage
no dedicated refactoring budget
![Page 14: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/14.jpg)
6
The Environment @SvenRuppert
Codebase is > 13 years old no test coverage
no dedicated refactoring budgetdecrease complexity
![Page 15: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/15.jpg)
6
The Environment @SvenRuppert
Codebase is > 13 years old no test coverage
no dedicated refactoring budgetdecrease complexity
but… lets start with the basics
![Page 16: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/16.jpg)
7
TDD with jUnit @SvenRuppert
![Page 17: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/17.jpg)
7
TDD with jUnit @SvenRuppert
are you using jUnit?
![Page 18: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/18.jpg)
7
TDD with jUnit @SvenRuppert
are you using jUnit?
assume that the following would make sense.. ;-)
![Page 19: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/19.jpg)
7
TDD with jUnit @SvenRuppert
are you using jUnit?
assume that the following would make sense.. ;-)
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
![Page 20: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/20.jpg)
7
TDD with jUnit @SvenRuppert
are you using jUnit?
assume that the following would make sense.. ;-)
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
![Page 21: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/21.jpg)
7
TDD with jUnit @SvenRuppert
are you using jUnit?
assume that the following would make sense.. ;-)
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
it depends ;-)
![Page 22: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/22.jpg)
8
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
it depends ;-)
![Page 23: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/23.jpg)
8
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
it depends ;-)
for line 100% coverage
![Page 24: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/24.jpg)
8
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
it depends ;-)
for line 100% coverage 2
![Page 25: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/25.jpg)
8
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
it depends ;-)
for line 100% coverage 2
but will this be enough?
![Page 26: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/26.jpg)
8
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
it depends ;-)
for line 100% coverage 2
but will this be enough? maybe ;-)
![Page 27: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/27.jpg)
9
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
for line 100% coverage 2
but will this be enough? maybe ;-)
it depends ;-)
![Page 28: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/28.jpg)
9
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
for line 100% coverage 2
but will this be enough? maybe ;-)
how to find out, what will be enough?
it depends ;-)
![Page 29: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/29.jpg)
9
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
for line 100% coverage 2
but will this be enough? maybe ;-)
how to find out, what will be enough?how to find the right tests?
it depends ;-)
![Page 30: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/30.jpg)
10
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
![Page 31: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/31.jpg)
10
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
@Test public void testAdd001() throws Exception { final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0); }
![Page 32: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/32.jpg)
10
TDD with jUnit @SvenRuppert
public class Service { public int add(int a, int b){ if(a<2){ return (a+b) * -1; } else { return a+b; } }}
How many tests
you will need ?
@Test public void testAdd001() throws Exception { final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0); }
@Test public void testAdd002() throws Exception { final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3); }
![Page 33: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/33.jpg)
11
Mutation Testing @SvenRuppert
![Page 34: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/34.jpg)
11
Mutation Testing @SvenRuppert
Mutation Testing is a structural testing method
![Page 35: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/35.jpg)
11
Mutation Testing @SvenRuppert
Mutation Testing is a structural testing method
we want to find a way to write "good" tests
![Page 36: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/36.jpg)
11
Mutation Testing @SvenRuppert
Mutation Testing is a structural testing method
we want to find a way to write "good" testshow to find "good" tests?
![Page 37: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/37.jpg)
11
Mutation Testing @SvenRuppert
Mutation Testing is a structural testing method
we want to find a way to write "good" testshow to find "good" tests?
let the machine find the targets
![Page 38: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/38.jpg)
11
Mutation Testing @SvenRuppert
Mutation Testing is a structural testing method
we want to find a way to write "good" testshow to find "good" tests?
let the machine find the targets
let´s mutate it... but how?
![Page 39: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/39.jpg)
12
Mutation Testing - the Idea @SvenRuppert
![Page 40: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/40.jpg)
12
Mutation Testing - the Idea @SvenRuppert
a mutation is a small change in the code
![Page 41: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/41.jpg)
12
Mutation Testing - the Idea @SvenRuppert
a mutation is a small change in the code.. small enough to be a small defect
![Page 42: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/42.jpg)
12
Mutation Testing - the Idea @SvenRuppert
a mutation is a small change in the code.. small enough to be a small defect
P will be the program
![Page 43: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/43.jpg)
12
Mutation Testing - the Idea @SvenRuppert
a mutation is a small change in the code.. small enough to be a small defect
P will be the programT will be the collection of all tests / Test Suite
![Page 44: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/44.jpg)
13
Mutation Testing - the Idea @SvenRuppert
P will be the programT will be the collection of all tests / Test Suite
![Page 45: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/45.jpg)
13
Mutation Testing - the Idea @SvenRuppert
P will be the programT will be the collection of all tests / Test Suite
we will create a sequence of mutations / P1,P2,P3...
![Page 46: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/46.jpg)
13
Mutation Testing - the Idea @SvenRuppert
P will be the programT will be the collection of all tests / Test Suite
we will create a sequence of mutations / P1,P2,P3...
.. Px will have only one mutation compared to P
![Page 47: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/47.jpg)
13
Mutation Testing - the Idea @SvenRuppert
P will be the programT will be the collection of all tests / Test Suite
we will create a sequence of mutations / P1,P2,P3...
.. Px will have only one mutation compared to P
running all tests from T against Px
![Page 48: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/48.jpg)
13
Mutation Testing - the Idea @SvenRuppert
P will be the programT will be the collection of all tests / Test Suite
we will create a sequence of mutations / P1,P2,P3...
.. Px will have only one mutation compared to P
running all tests from T against Px
green: T will kill the mutation
![Page 49: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/49.jpg)
13
Mutation Testing - the Idea @SvenRuppert
P will be the programT will be the collection of all tests / Test Suite
we will create a sequence of mutations / P1,P2,P3...
.. Px will have only one mutation compared to P
running all tests from T against Px
green: T will kill the mutation.. at leased one test from T will fail
![Page 50: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/50.jpg)
13
Mutation Testing - the Idea @SvenRuppert
P will be the programT will be the collection of all tests / Test Suite
we will create a sequence of mutations / P1,P2,P3...
.. Px will have only one mutation compared to P
running all tests from T against Px
green: T will kill the mutation.. at leased one test from T will fail
red: if all tests are green
![Page 51: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/51.jpg)
14
Mutation Testing - the Idea @SvenRuppert
![Page 52: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/52.jpg)
14
Mutation Testing - the Idea @SvenRuppert
if we kill k out of n mutants
![Page 53: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/53.jpg)
14
Mutation Testing - the Idea @SvenRuppert
if we kill k out of n mutants -> we are not good enough ;-)
![Page 54: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/54.jpg)
14
Mutation Testing - the Idea @SvenRuppert
if we kill k out of n mutants -> we are not good enough ;-)
we are perfect enough if we are reaching : k == n
![Page 55: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/55.jpg)
14
Mutation Testing - the Idea @SvenRuppert
if we kill k out of n mutants -> we are not good enough ;-)
we are perfect enough if we are reaching : k == n
how to create all versions of Px ?
![Page 56: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/56.jpg)
14
Mutation Testing - the Idea @SvenRuppert
if we kill k out of n mutants -> we are not good enough ;-)
we are perfect enough if we are reaching : k == n
how to create all versions of Px ?
.. the good thing..
![Page 57: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/57.jpg)
14
Mutation Testing - the Idea @SvenRuppert
if we kill k out of n mutants -> we are not good enough ;-)
we are perfect enough if we are reaching : k == n
how to create all versions of Px ?
.. the good thing..
we could almost generate/
automate everything
![Page 58: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/58.jpg)
15
Mutation Testing @SvenRuppert
practical TDD with Mutation Testing
![Page 59: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/59.jpg)
15
Mutation Testing @SvenRuppert
generating the mutants and
practical TDD with Mutation Testing
![Page 60: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/60.jpg)
15
Mutation Testing @SvenRuppert
generating the mutants and
practical TDD with Mutation Testing
running all junit tests
![Page 61: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/61.jpg)
15
Mutation Testing @SvenRuppert
generating the mutants and
practical TDD with Mutation Testing
running all junit testscheck the reports
![Page 62: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/62.jpg)
15
Mutation Testing @SvenRuppert
generating the mutants and
practical TDD with Mutation Testing
running all junit testscheck the reports
write more / better tests
![Page 63: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/63.jpg)
15
Mutation Testing @SvenRuppert
generating the mutants and
practical TDD with Mutation Testing
running all junit testscheck the reports
write more / better tests
loop until quality target reached
![Page 64: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/64.jpg)
16
Mutation Testing @SvenRuppert
mutants are a good approach / model to estimate the default rate of defects per 1k lines of the P
![Page 65: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/65.jpg)
16
Mutation Testing @SvenRuppert
mutants are a good approach / model to estimate the default rate of defects per 1k lines of the P
estimate that:
![Page 66: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/66.jpg)
16
Mutation Testing @SvenRuppert
mutants are a good approach / model to estimate the default rate of defects per 1k lines of the P
estimate that: the defects are independent
![Page 67: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/67.jpg)
17
Mutation Testing @SvenRuppert
![Page 68: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/68.jpg)
17
Mutation Testing @SvenRuppert
no need to know that Mutation Testing will be done, independent creation of T
![Page 69: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/69.jpg)
17
Mutation Testing @SvenRuppert
no need to know that Mutation Testing will be done, independent creation of T
for K==n we need a high number of mutants ( P1, P2, .., Px)
![Page 70: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/70.jpg)
17
Mutation Testing @SvenRuppert
no need to know that Mutation Testing will be done, independent creation of T
for K==n we need a high number of mutants ( P1, P2, .., Px)
.. mostly it will lead into exponential numbers of Px
![Page 71: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/71.jpg)
17
Mutation Testing @SvenRuppert
no need to know that Mutation Testing will be done, independent creation of T
for K==n we need a high number of mutants ( P1, P2, .., Px)
.. mostly it will lead into exponential numbers of Px
.. how to find YOUR barrier you
have to reach?
![Page 72: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/72.jpg)
17
Mutation Testing @SvenRuppert
no need to know that Mutation Testing will be done, independent creation of T
for K==n we need a high number of mutants ( P1, P2, .., Px)
.. mostly it will lead into exponential numbers of Px
.. how to find YOUR barrier you
have to reach?
but.. what is a mutation?
![Page 73: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/73.jpg)
18
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutationchanging constants,
loop bounds (adding/subtracting values)
![Page 74: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/74.jpg)
19
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation
Decision Mutation for example < will be changed to <=
![Page 75: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/75.jpg)
20
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation Decision Mutation
for example swapping/deleting/duplicating lines of code
Statement Mutation
![Page 76: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/76.jpg)
21
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation Decision MutationStatement Mutation
![Page 77: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/77.jpg)
21
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation Decision MutationStatement Mutation
for Java you could think about more language spec. mutations
![Page 78: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/78.jpg)
21
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation Decision MutationStatement Mutation
for Java you could think about more language spec. mutations
.. changing modifiers
![Page 79: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/79.jpg)
21
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation Decision MutationStatement Mutation
for Java you could think about more language spec. mutations
.. changing modifiers.. changing between static / non static
![Page 80: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/80.jpg)
21
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation Decision MutationStatement Mutation
for Java you could think about more language spec. mutations
.. changing modifiers.. changing between static / non static
.. delete member initialization
![Page 81: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/81.jpg)
21
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation Decision MutationStatement Mutation
for Java you could think about more language spec. mutations
.. changing modifiers.. changing between static / non static
.. delete member initialization .. delete this.
![Page 82: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/82.jpg)
21
Mutation Testing - Kinds of Mutation @SvenRuppert
but.. what is a mutation?
Value Mutation Decision MutationStatement Mutation
for Java you could think about more language spec. mutations
.. changing modifiers.. changing between static / non static
.. delete member initialization .. delete this... argument order change
![Page 83: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/83.jpg)
22
Mutation Testing - in short words @SvenRuppert
![Page 84: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/84.jpg)
22
Mutation Testing - in short words @SvenRuppert
mutation testing is an add on to normal jUnit TDD
![Page 85: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/85.jpg)
22
Mutation Testing - in short words @SvenRuppert
mutation testing is an add on to normal jUnit TDD
tools are supporting it well
![Page 86: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/86.jpg)
22
Mutation Testing - in short words @SvenRuppert
mutation testing is an add on to normal jUnit TDD
tools are supporting it well
generating and running all tests are time consuming
![Page 87: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/87.jpg)
22
Mutation Testing - in short words @SvenRuppert
mutation testing is an add on to normal jUnit TDD
tools are supporting it well
generating and running all tests are time consuming
but most important
![Page 88: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/88.jpg)
22
Mutation Testing - in short words @SvenRuppert
mutation testing is an add on to normal jUnit TDD
tools are supporting it well
generating and running all tests are time consuming
but most important
will effect your project structure
![Page 89: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/89.jpg)
23
Mutation Testing - Frameworks @SvenRuppert
![Page 90: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/90.jpg)
23
Mutation Testing - Frameworks @SvenRuppert
muJava
![Page 91: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/91.jpg)
23
Mutation Testing - Frameworks @SvenRuppert
muJava
2003. First released as JMutation (Java Mutation System).2004. The name was changed to MuJava (Mutation System for Java).2005. Software Copyright Registration, ALL RIGHTS RESERVED.2005. Version 2 released with several fault fixes and modified mutation operators.2008. Version 3 released with minimal support for Java 1.5 and 1.6.2013. Version 4 released to support JUnit tests and Java 1.6 language features, including generics, annotations, enumerations, varargs, enhanced for-each loops, and static imports.2015. Additional and improved error messages. Bug fixes for OpenJava. Licensing changed to the Apache license.
![Page 92: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/92.jpg)
23
Mutation Testing - Frameworks @SvenRuppert
muJava
2003. First released as JMutation (Java Mutation System).2004. The name was changed to MuJava (Mutation System for Java).2005. Software Copyright Registration, ALL RIGHTS RESERVED.2005. Version 2 released with several fault fixes and modified mutation operators.2008. Version 3 released with minimal support for Java 1.5 and 1.6.2013. Version 4 released to support JUnit tests and Java 1.6 language features, including generics, annotations, enumerations, varargs, enhanced for-each loops, and static imports.2015. Additional and improved error messages. Bug fixes for OpenJava. Licensing changed to the Apache license.
https://cs.gmu.edu/~offutt/mujava/
https://github.com/jeffoffutt/muJava/graphs/contributors
![Page 93: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/93.jpg)
23
Mutation Testing - Frameworks @SvenRuppert
muJava
2003. First released as JMutation (Java Mutation System).2004. The name was changed to MuJava (Mutation System for Java).2005. Software Copyright Registration, ALL RIGHTS RESERVED.2005. Version 2 released with several fault fixes and modified mutation operators.2008. Version 3 released with minimal support for Java 1.5 and 1.6.2013. Version 4 released to support JUnit tests and Java 1.6 language features, including generics, annotations, enumerations, varargs, enhanced for-each loops, and static imports.2015. Additional and improved error messages. Bug fixes for OpenJava. Licensing changed to the Apache license.
https://cs.gmu.edu/~offutt/mujava/
https://github.com/jeffoffutt/muJava/graphs/contributors
inactive
![Page 94: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/94.jpg)
24
Mutation Testing - Frameworks @SvenRuppert
![Page 95: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/95.jpg)
24
Mutation Testing - Frameworks @SvenRuppert
2012. started around 2012 with a small codebase.2014. very active since 2014
![Page 96: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/96.jpg)
24
Mutation Testing - Frameworks @SvenRuppert
2012. started around 2012 with a small codebase.2014. very active since 2014
http://pitest.org/
![Page 97: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/97.jpg)
24
Mutation Testing - Frameworks @SvenRuppert
2012. started around 2012 with a small codebase.2014. very active since 2014
http://pitest.org/
active ;-)
![Page 98: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/98.jpg)
25
Mutation Testing - Hello World @SvenRuppert
http://pitest.org/
![Page 99: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/99.jpg)
25
Mutation Testing - Hello World @SvenRuppert
http://pitest.org/assume the following would make sense ;-)
![Page 100: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/100.jpg)
25
Mutation Testing - Hello World @SvenRuppert
http://pitest.org/assume the following would make sense ;-)
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }}
![Page 101: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/101.jpg)
26
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }}
![Page 102: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/102.jpg)
26
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }} how many test you will need for..
![Page 103: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/103.jpg)
26
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }} how many test you will need for..
100% Line Coverage… and…
![Page 104: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/104.jpg)
26
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }} how many test you will need for..
100% Line Coverage… and… to be save ?
![Page 105: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/105.jpg)
26
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }} how many test you will need for..
100% Line Coverage… and… to be save ?
2 for Line Coverage
![Page 106: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/106.jpg)
26
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }} how many test you will need for..
100% Line Coverage… and… to be save ?
2 for Line Coverage we will see ;-)
![Page 107: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/107.jpg)
27
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }}
100% Line Coverage… and…
![Page 108: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/108.jpg)
27
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }}
100% Line Coverage… and…
we have one if statement
![Page 109: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/109.jpg)
27
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }}
100% Line Coverage… and…
we have one if statement with an else branch
![Page 110: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/110.jpg)
27
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }}
100% Line Coverage… and…
we have one if statement with an else branch
this will lead to 2 jUnit Tests to get 100 %
![Page 111: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/111.jpg)
28
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }} 100% Line Coverage… and…
![Page 112: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/112.jpg)
28
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }} 100% Line Coverage… and…
@Testpublic void testAdd001() throws Exception { final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0);}
![Page 113: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/113.jpg)
28
Mutation Testing - Hello World @SvenRuppert
public class Service { public int add(int a, int b){ if (a<2) { return (a+b) * -1; } else { return a+b; } }} 100% Line Coverage… and…
@Testpublic void testAdd001() throws Exception { final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0);}
@Testpublic void testAdd002() throws Exception { final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);}
![Page 114: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/114.jpg)
29
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0);
final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);
![Page 115: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/115.jpg)
29
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0);
final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);
![Page 116: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/116.jpg)
29
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0);
final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);
![Page 117: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/117.jpg)
30
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0); final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);
![Page 118: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/118.jpg)
30
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0); final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);
we got 100% Line Coverage
![Page 119: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/119.jpg)
30
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0); final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);
we got 100% Line CoverageHow good these tests are?
![Page 120: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/120.jpg)
30
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0); final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);
we got 100% Line CoverageHow good these tests are?
How to measure if these test are good?
![Page 121: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/121.jpg)
30
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0); Assertions.assertThat(add).isEqualTo(0); final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3);
we got 100% Line CoverageHow good these tests are?
How to measure if these test are good?
How to find the good tests?
![Page 122: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/122.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?
![Page 123: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/123.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
![Page 124: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/124.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
with maven : pitest: mutationCoverage
![Page 125: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/125.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
with maven : pitest: mutationCoverage
>> Generated 54 mutations
![Page 126: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/126.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
with maven : pitest: mutationCoverage
>> Generated 54 mutations Killed 3
![Page 127: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/127.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
with maven : pitest: mutationCoverage
>> Generated 54 mutations
org.pitest……mutators.ConditionalsBoundaryMutator
Killed 3
![Page 128: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/128.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
with maven : pitest: mutationCoverage
>> Generated 54 mutations
org.pitest……mutators.ConditionalsBoundaryMutatororg.pitest……mutators.IncrementsMutator
Killed 3
![Page 129: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/129.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
with maven : pitest: mutationCoverage
>> Generated 54 mutations
org.pitest……mutators.ConditionalsBoundaryMutatororg.pitest……mutators.IncrementsMutatororg.pitest……mutators.ReturnValsMutator
Killed 3
![Page 130: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/130.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
with maven : pitest: mutationCoverage
>> Generated 54 mutations
org.pitest……mutators.ConditionalsBoundaryMutatororg.pitest……mutators.IncrementsMutatororg.pitest……mutators.ReturnValsMutatororg.pitest……mutators.MathMutator
Killed 3
![Page 131: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/131.jpg)
31
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
final int add = new Service().add(3, 0);
How to find the good tests?let´s generate a the mutation report
with maven : pitest: mutationCoverage
>> Generated 54 mutations
org.pitest……mutators.ConditionalsBoundaryMutatororg.pitest……mutators.IncrementsMutatororg.pitest……mutators.ReturnValsMutatororg.pitest……mutators.MathMutatororg.pitest……mutators.NegateConditionalsMutator
Killed 3
![Page 132: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/132.jpg)
32
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutations Killed 3
![Page 133: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/133.jpg)
32
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutations Killed 3
![Page 134: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/134.jpg)
32
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutations Killed 3
![Page 135: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/135.jpg)
33
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutations Killed 3
![Page 136: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/136.jpg)
33
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutations Killed 3
![Page 137: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/137.jpg)
33
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutations Killed 3
![Page 138: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/138.jpg)
Killed 3
34
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutations
![Page 139: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/139.jpg)
Killed 3
34
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutationsfinal int add = new Service().add(2, 0);
![Page 140: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/140.jpg)
34
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutationsfinal int add = new Service().add(2, 0);
![Page 141: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/141.jpg)
Killed 4
34
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutationsfinal int add = new Service().add(2, 0);
![Page 142: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/142.jpg)
Killed 4
34
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutationsfinal int add = new Service().add(2, 0);
![Page 143: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/143.jpg)
Killed 4
34
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutationsfinal int add = new Service().add(2, 0);
![Page 144: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/144.jpg)
Killed 4
34
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);final int add = new Service().add(3, 0);
>> Generated 54 mutationsfinal int add = new Service().add(2, 0);
![Page 145: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/145.jpg)
Killed 4
34
Mutation Testing - Hello World @SvenRuppert
final int add = new Service().add(0, 0);
>> Generated 54 mutationsfinal int add = new Service().add(2, 0);
![Page 146: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/146.jpg)
Killed 4
34
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutationsfinal int add = new Service().add(2, 0);
![Page 147: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/147.jpg)
Killed 4
35
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);
![Page 148: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/148.jpg)
Killed 4
35
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
![Page 149: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/149.jpg)
35
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
![Page 150: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/150.jpg)
Killed 5
35
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
![Page 151: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/151.jpg)
Killed 5
35
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
killed 9:1
![Page 152: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/152.jpg)
Killed 5
36
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
killed 9:1
![Page 153: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/153.jpg)
Killed 5
36
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
killed 9:1
final int add = new Service().add(2, 2);
![Page 154: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/154.jpg)
36
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
killed 9:1
final int add = new Service().add(2, 2);
![Page 155: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/155.jpg)
Killed 6
36
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
killed 9:1
final int add = new Service().add(2, 2);
![Page 156: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/156.jpg)
Killed 6
36
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
killed 9:1
final int add = new Service().add(2, 2);
![Page 157: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/157.jpg)
Killed 6
36
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);
killed 9:1
final int add = new Service().add(2, 2);
![Page 158: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/158.jpg)
Killed 6
36
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(2, 0);final int add = new Service().add(1, 1);final int add = new Service().add(2, 2);
killed 11:1
![Page 159: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/159.jpg)
Killed 6
36
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(1, 1);final int add = new Service().add(2, 2);
killed 11:1
![Page 160: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/160.jpg)
Killed 6
37
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(1, 1);final int add = new Service().add(2, 2);
![Page 161: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/161.jpg)
Killed 6
37
Mutation Testing - Hello World @SvenRuppert
>> Generated 54 mutations
final int add = new Service().add(1, 1);final int add = new Service().add(2, 2);
![Page 162: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/162.jpg)
38
Mutation Testing - Lesson Learned @SvenRuppert
![Page 163: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/163.jpg)
38
Mutation Testing - Lesson Learned @SvenRuppert
mutation tests are often leading to
![Page 164: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/164.jpg)
38
Mutation Testing - Lesson Learned @SvenRuppert
mutation tests are often leading to
…cleaner code compared to jUnit only
![Page 165: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/165.jpg)
39
Mutation Testing - Lesson Learned @SvenRuppert
public static final String[] discardCommonPrefix(String a, String b) { String[] ret = { a, b }; int l = a.length() < b.length() ? a.length() : b.length(); for (int i = 0; i < l; i++) { if (a.charAt(i) == b.charAt(i)) { if (i + 1 < l) { ret[0] = a.substring(i + 1); ret[1] = b.substring(i + 1); } else { if (a.length() < b.length()) { ret[0] = ""; ret[1] = b.substring(i + 1); } if (a.length() == b.length()) { ret[0] = ""; ret[1] = „"; } if (a.length() > b.length()) { ret[0] = a.substring(i + 1); ret[1] = „"; } } } else break; } return ret; }
![Page 166: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/166.jpg)
40
Mutation Testing - Lesson Learned @SvenRuppert
public String[] discardCommonPrefix(String a, String b) { final String[] ret = new String[2]; int l; if (a.length() < b.length()) { l = a.length(); } else { l = b.length(); } int position = 0; for (; position < l; position++) { final char charA = a.charAt(position); final char charB = b.charAt(position); if (charA != charB) { break; } }
if (position >= a.length()) { ret[0] = ""; } else { ret[0] = a.substring(position); }
if (position >= b.length()) { ret[1] = ""; } else { ret[1] = b.substring(position); } return ret; }
![Page 167: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/167.jpg)
41
Mutation Testing - Lesson Learned @SvenRuppert
Version 1 Version 2
![Page 168: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/168.jpg)
41
Mutation Testing - Lesson Learned @SvenRuppert
Version 1 Version 2 for { if { if else { if if if } } else }
![Page 169: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/169.jpg)
41
Mutation Testing - Lesson Learned @SvenRuppert
Version 1 Version 2 for { if { if else { if if if } } else }
if else for { if}
if else
if else
![Page 170: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/170.jpg)
42
Mutation Testing - Lesson Learned @SvenRuppert
mutation tests are often leading to
…cleaner code compared to jUnit only
![Page 171: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/171.jpg)
42
Mutation Testing - Lesson Learned @SvenRuppert
mutation tests are often leading to
…cleaner code compared to jUnit only… smaller modules (shorter mutation runtime)
![Page 172: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/172.jpg)
42
Mutation Testing - Lesson Learned @SvenRuppert
mutation tests are often leading to
…cleaner code compared to jUnit only… smaller modules (shorter mutation runtime)
and something nice… helps to find useless code
![Page 173: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/173.jpg)
43
Example of useless Code @SvenRuppert
![Page 174: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/174.jpg)
43
Example of useless Code @SvenRuppert
![Page 175: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/175.jpg)
43
Example of useless Code @SvenRuppert
![Page 176: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/176.jpg)
44
Mutation Testing - How to start @SvenRuppert
![Page 177: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/177.jpg)
44
Mutation Testing - How to start @SvenRuppert
you need jUnit - to generate the reference
![Page 178: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/178.jpg)
44
Mutation Testing - How to start @SvenRuppert
you need jUnit - to generate the reference add the pitest-plugin to the build section
![Page 179: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/179.jpg)
44
Mutation Testing - How to start @SvenRuppert
you need jUnit - to generate the reference add the pitest-plugin to the build section
configure the plugin
![Page 180: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/180.jpg)
44
Mutation Testing - How to start @SvenRuppert
you need jUnit - to generate the reference add the pitest-plugin to the build section
configure the plugingenerate the reference -> clean , install
![Page 181: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/181.jpg)
44
Mutation Testing - How to start @SvenRuppert
you need jUnit - to generate the reference add the pitest-plugin to the build section
configure the plugingenerate the reference -> clean , install
run pitest: mutationCoverage
![Page 182: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/182.jpg)
44
Mutation Testing - How to start @SvenRuppert
you need jUnit - to generate the reference add the pitest-plugin to the build section
configure the plugingenerate the reference -> clean , install
run pitest: mutationCoveragereport will be under target/pit-reports
![Page 183: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/183.jpg)
45
Mutation Testing - How to start @SvenRuppert
pom.xml - example - build
<plugin> <groupId>org.pitest</groupId> <artifactId>pitest-maven</artifactId> <configuration> <outputFormats> <outputFormat>XML</outputFormat> <outputFormat>HTML</outputFormat> </outputFormats> <targetClasses> <param>org.rapidpm.*</param> </targetClasses> <targetTests> <param>org.rapidpm.*</param> <param>junit.org.rapidpm.*</param> </targetTests> </configuration></plugin>
![Page 184: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/184.jpg)
46
Mutation Testing - How to start @SvenRuppert
pom.xml - example - reporting
<reporting> <plugins> <plugin> <groupId>org.pitest</groupId> <artifactId>pitest-maven</artifactId> <reportSets> <reportSet> <reports> <report>report</report> </reports> </reportSet> </reportSets> </plugin> </plugins></reporting>
![Page 185: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/185.jpg)
47
Mutation Testing - practical usage @SvenRuppert
![Page 186: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/186.jpg)
47
Mutation Testing - practical usage @SvenRuppert
Start with some tests
![Page 187: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/187.jpg)
47
Mutation Testing - practical usage @SvenRuppert
Start with some testsgenerate the pitest report
![Page 188: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/188.jpg)
47
Mutation Testing - practical usage @SvenRuppert
Start with some testsgenerate the pitest report
write more tests to kill mutations
![Page 189: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/189.jpg)
47
Mutation Testing - practical usage @SvenRuppert
Start with some testsgenerate the pitest report
write more tests to kill mutationsif you have time, eliminate useless tests
![Page 190: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/190.jpg)
47
Mutation Testing - practical usage @SvenRuppert
Start with some testsgenerate the pitest report
write more tests to kill mutationsif you have time, eliminate useless tests
do it one by one
![Page 191: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/191.jpg)
47
Mutation Testing - practical usage @SvenRuppert
Mutation 001Mutation 002
Mutation 003Mutation 004 Survived
SurvivedSurvived
Survived
Start with some testsgenerate the pitest report
write more tests to kill mutationsif you have time, eliminate useless tests
do it one by one
![Page 192: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/192.jpg)
47
Mutation Testing - practical usage @SvenRuppert
Mutation 001Mutation 002
Mutation 003Mutation 004 Survived
Killed
SurvivedSurvived
SurvivedKilled
KilledKilled
Start with some testsgenerate the pitest report
write more tests to kill mutationsif you have time, eliminate useless tests
do it one by one
![Page 193: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/193.jpg)
48
Mutation Testing - Real Code Examples @SvenRuppert
![Page 194: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/194.jpg)
48
Mutation Testing - Real Code Examples @SvenRuppert
![Page 195: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/195.jpg)
48
Mutation Testing - Real Code Examples @SvenRuppert
![Page 196: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/196.jpg)
49
Mutation Testing - Real Code Examples @SvenRuppert
![Page 197: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/197.jpg)
49
Mutation Testing - Real Code Examples @SvenRuppert
![Page 198: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/198.jpg)
49
Mutation Testing - Real Code Examples @SvenRuppert
![Page 199: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/199.jpg)
50
Mutation Testing - Real Code Examples @SvenRuppert
![Page 200: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/200.jpg)
Summary
51
@SvenRuppert
If you are interested…
have a look at GITHUB
Functional-Reactive-Lib
Dynamic-Dependency-Injection
Vaadin-Developer
or contact me ;-) @SvenRuppert
![Page 201: prepare for… Mutation Testing - JUG Saxony · has been coding java since 1996 Developer Advocate Vaadin Germany - Munich 2 ... Mutation Testing - the Idea @SvenRuppert a mutation](https://reader035.vdocuments.mx/reader035/viewer/2022062917/5ed417fb8d46b66d226373c9/html5/thumbnails/201.jpg)
Summary
51
@SvenRuppert
If you are interested…
have a look at GITHUB
Functional-Reactive-Lib
Dynamic-Dependency-Injection
Vaadin-Developer
or contact me ;-) @SvenRuppert
Thank You !!!