+ All Categories
Home > Software > From Jurassic Park to Microservices

From Jurassic Park to Microservices

Date post: 13-Apr-2017
Category:
Upload: sven-ruppert
View: 58 times
Download: 2 times
Share this document with a friend
321
prepare for… From Jurassic Park… ..to Microservices….
Transcript
Page 1: From Jurassic Park to Microservices

prepare for…

From Jurassic Park…..to Microservices….

Page 2: From Jurassic Park to Microservices

@SvenRuppert has been coding java since 1996

Fellow / Head of R&D

reply Group

Germany - Munich

2

Page 3: From Jurassic Park to Microservices

@SvenRuppert has been coding java since 1996

3

Page 4: From Jurassic Park to Microservices

@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: From Jurassic Park to Microservices

4

Save harbor statement

Page 6: From Jurassic Park to Microservices

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: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Page 8: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Codebase is > 13 years old

Page 9: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Codebase is > 13 years old no test coverage

Page 10: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Codebase is > 13 years old no test coverage

Code Lords

Page 11: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Codebase is > 13 years old no test coverage

Code Lordsnearly 15% are retired soon

Page 12: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Codebase is > 13 years old no test coverage

Code Lordsnearly 15% are retired soon

over 50% are since 15 yrs in the company

Page 13: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Codebase is > 13 years old no test coverage

Code Lordsnearly 15% are retired soon

over 50% are since 15 yrs in the company

hiring only students

Page 14: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Codebase is > 13 years old no test coverage

Code Lordsnearly 15% are retired soon

over 50% are since 15 yrs in the company

the developers learned Java at this project

hiring only students

Page 15: From Jurassic Park to Microservices

5

@SvenRuppertAt the time I started - 3 yrs ago

Codebase is > 13 years old no test coverage

Code Lordsnearly 15% are retired soon

over 50% are since 15 yrs in the company

the developers learned Java at this project

hiring only students

the first feeling was like ……

Page 16: From Jurassic Park to Microservices

6

@SvenRuppertAt the time I started - 3 yrs ago

Page 17: From Jurassic Park to Microservices

7

@SvenRuppertOverview

The Team

The Knowledge - SharingThe way of working

The way of leading the Team

QM / QS - How to increase qualityTechnical Migration?

Page 18: From Jurassic Park to Microservices

8

@SvenRuppertOverview - Start Small

Page 19: From Jurassic Park to Microservices

9

@SvenRuppertOverview - Think Bigger

Page 20: From Jurassic Park to Microservices

10

@SvenRuppertOverview - Build a Team

Page 21: From Jurassic Park to Microservices

11

@SvenRuppertOverview - Trust

Page 22: From Jurassic Park to Microservices

11

@SvenRuppertOverview - Trust

Page 23: From Jurassic Park to Microservices

12

@SvenRuppertThe way of working

20% Time have time to play or try

start learning how to practice it ?Closed Source versus Open Source

work from everywhere at your time

we started step by step

Page 24: From Jurassic Park to Microservices

13

@SvenRuppertwork from everywhere

Page 25: From Jurassic Park to Microservices

14

@SvenRuppertwork from everywhere

Page 26: From Jurassic Park to Microservices

14

@SvenRuppertwork from everywhere

change your environment

Page 27: From Jurassic Park to Microservices

14

@SvenRuppertwork from everywhere

change your environment

use Messenger like Slack

Page 28: From Jurassic Park to Microservices

14

@SvenRuppertwork from everywhere

change your environment

use Messenger like Slack avoid mails

Page 29: From Jurassic Park to Microservices

14

@SvenRuppertwork from everywhere

change your environment

use Messenger like Slack avoid mailsremote meetings with zoom

Page 30: From Jurassic Park to Microservices

14

@SvenRuppertwork from everywhere

change your environment

use Messenger like Slack avoid mailsremote meetings with zoom

remote Pair-Programming

Page 31: From Jurassic Park to Microservices

14

@SvenRuppertwork from everywhere

change your environment

use Messenger like Slack avoid mailsremote meetings with zoom

remote Pair-Programmingwork async.

Page 32: From Jurassic Park to Microservices

14

@SvenRuppertwork from everywhere

change your environment

use Messenger like Slack avoid mailsremote meetings with zoom

remote Pair-Programmingwork async.

work at your time that is the best for you

Page 33: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for you

Page 34: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for you

Page 35: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

Page 36: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AM

Page 37: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMbreakfast with the family07AM to 09AM

Page 38: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMbreakfast with the family07AM to 09AMworking09AM to 12AM

Page 39: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMbreakfast with the family07AM to 09AMworking09AM to 12AMplaying with my son12AM to 07PM

Page 40: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMbreakfast with the family07AM to 09AMworking09AM to 12AMplaying with my son12AM to 07PMplaying with my wife 07PM to 09PM

Page 41: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMbreakfast with the family07AM to 09AMworking09AM to 12AMplaying with my son12AM to 07PMplaying with my wife 07PM to 09PMworking09PM to 11PM

Page 42: From Jurassic Park to Microservices

15

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMbreakfast with the family07AM to 09AMworking09AM to 12AMplaying with my son12AM to 07PMplaying with my wife 07PM to 09PMworking09PM to 11PM

and yes… I need only 6h sleep ;-)

Page 43: From Jurassic Park to Microservices

16

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMworking09AM to 12AMworking09PM to 11PM

Page 44: From Jurassic Park to Microservices

16

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMworking09AM to 12AMworking09PM to 11PM

working with Asia

Page 45: From Jurassic Park to Microservices

16

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMworking09AM to 12AMworking09PM to 11PM

working with Asiaworking with Europe

Page 46: From Jurassic Park to Microservices

16

@SvenRuppertwork from everywhere

work at your time that is the best for youmy „normal“ day…

working05AM to 07AMworking09AM to 12AMworking09PM to 11PM

working with Asiaworking with Europeworking with US

Page 47: From Jurassic Park to Microservices

17

@SvenRuppertThe way of working

Page 48: From Jurassic Park to Microservices

17

@SvenRuppertThe way of working

20% Time

Page 49: From Jurassic Park to Microservices

17

@SvenRuppertThe way of working

why you should do it?20% Time

Page 50: From Jurassic Park to Microservices

17

@SvenRuppertThe way of working

why you should do it?20% Time

lost in daily business

Page 51: From Jurassic Park to Microservices

17

@SvenRuppertThe way of working

why you should do it?20% Time

Page 52: From Jurassic Park to Microservices

18

@SvenRuppertThe way of working

20% Time

Page 53: From Jurassic Park to Microservices

18

@SvenRuppertThe way of working

how to make it useful ?20% Time

Page 54: From Jurassic Park to Microservices

18

@SvenRuppertThe way of working

how to make it useful ?20% Time

Page 55: From Jurassic Park to Microservices

18

@SvenRuppertThe way of working

how to make it useful ?

for the developer

20% Time

Page 56: From Jurassic Park to Microservices

18

@SvenRuppertThe way of working

how to make it useful ?

for the developer

20% Time

Page 57: From Jurassic Park to Microservices

18

@SvenRuppertThe way of working

how to make it useful ?

for the developer

for the company

20% Time

Page 58: From Jurassic Park to Microservices

18

@SvenRuppertThe way of working

how to make it useful ?

example : POC in the Mountains

for the developer

for the company

20% Time

Page 59: From Jurassic Park to Microservices

19

@SvenRuppertClosed- versus Open Source

Page 60: From Jurassic Park to Microservices

19

@SvenRuppertClosed- versus Open Source

Analyzing the existing Code

Page 61: From Jurassic Park to Microservices

19

@SvenRuppertClosed- versus Open Source

Analyzing the existing Code in our case : a lot of infrastructure…

Page 62: From Jurassic Park to Microservices

19

@SvenRuppertClosed- versus Open Source

Analyzing the existing Code in our case : a lot of infrastructure…

..with this we are not earning money

Page 63: From Jurassic Park to Microservices

19

@SvenRuppertClosed- versus Open Source

Analyzing the existing Code in our case : a lot of infrastructure…

..with this we are not earning money

we divided the

Page 64: From Jurassic Park to Microservices

19

@SvenRuppertClosed- versus Open Source

Analyzing the existing Code in our case : a lot of infrastructure…

..with this we are not earning money

we divided the

code base

Page 65: From Jurassic Park to Microservices

19

@SvenRuppertClosed- versus Open Source

Analyzing the existing Code in our case : a lot of infrastructure…

..with this we are not earning money

we divided the

code basedev. environment

Page 66: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

Page 67: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

Page 68: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

discuss at conferences

Page 69: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

could write articles about itdiscuss at conferences

Page 70: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

could write articles about itdiscuss at conferences

Page 71: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

could write articles about itdiscuss at conferences

will lead to better documentation

Page 72: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

could write articles about itdiscuss at conferences

will lead to better documentation

Page 73: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

could write articles about itdiscuss at conferences

will lead to better documentation

out of company rules

Page 74: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

could write articles about itdiscuss at conferences

will lead to better documentation

out of company rulesfree choice of tools

Page 75: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

could write articles about itdiscuss at conferences

will lead to better documentation

out of company rulesfree choice of tools

Page 76: From Jurassic Park to Microservices

20

@SvenRuppertClosed- versus Open Source

we divided the

code base dev. environment

could write articles about itdiscuss at conferences

will lead to better documentation

out of company rulesfree choice of tools

higher motivation

Page 77: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Page 78: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning again

Page 79: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning againfor example:

Page 80: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning againfor example: focus on a new paradigm

Page 81: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning againfor example:

functionalfocus on a new paradigm

Page 82: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning againfor example:

functionalfocus on a new paradigm reactive

Page 83: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning againfor example:

functionaladd a new Languagefocus on a new paradigm reactive

Page 84: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning againfor example:

functionaladd a new Languagefocus on a new paradigm

but not everyone want to learn

reactive

Page 85: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning againfor example:

functionaladd a new Languagefocus on a new paradigm

but not everyone want to learn or better…. some are learning faster

reactive

Page 86: From Jurassic Park to Microservices

21

@SvenRuppertThe way of working

Start Learning againfor example:

functionaladd a new Languagefocus on a new paradigm

but not everyone want to learn or better…. some are learning faster

reactive

this sometimes leads to ….. reactions….

Page 87: From Jurassic Park to Microservices

22

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

Page 88: From Jurassic Park to Microservices

22

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

Page 89: From Jurassic Park to Microservices

22

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

running away

Page 90: From Jurassic Park to Microservices

23

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

Page 91: From Jurassic Park to Microservices

23

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

Page 92: From Jurassic Park to Microservices

23

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

expecting something

Page 93: From Jurassic Park to Microservices

24

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

Page 94: From Jurassic Park to Microservices

24

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

feeling the near end

Page 95: From Jurassic Park to Microservices

24

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

feeling the near end

Page 96: From Jurassic Park to Microservices

25

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

Page 97: From Jurassic Park to Microservices

25

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

or only feeling to old

Page 98: From Jurassic Park to Microservices

25

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

or only feeling to old

Page 99: From Jurassic Park to Microservices

26

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

Page 100: From Jurassic Park to Microservices

26

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

if you don´t want to loose them

Page 101: From Jurassic Park to Microservices

26

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

you have to deal with this

if you don´t want to loose them

Page 102: From Jurassic Park to Microservices

26

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

you have to deal with this

if you don´t want to loose them

make them happy again

Page 103: From Jurassic Park to Microservices

26

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

you have to deal with this

if you don´t want to loose them

make them happy again

Page 104: From Jurassic Park to Microservices

26

@SvenRuppertThe way of working

Start Learning againthis sometimes leads to ….. reactions….

you have to deal with this

if you don´t want to loose them

make them happy again

How we solved

this?

Page 105: From Jurassic Park to Microservices

27

@SvenRuppertThe way of working

Page 106: From Jurassic Park to Microservices

27

@SvenRuppertThe way of working

we are a product company

Page 107: From Jurassic Park to Microservices

27

@SvenRuppertThe way of working

we are a product company with a lot of LTS contracts

Page 108: From Jurassic Park to Microservices

27

@SvenRuppertThe way of working

we are a product company with a lot of LTS contracts

we created three streams

Page 109: From Jurassic Park to Microservices

27

@SvenRuppertThe way of working

we are a product company with a lot of LTS contracts

we created three streams

Consultants - play and throw away

Page 110: From Jurassic Park to Microservices

27

@SvenRuppertThe way of working

we are a product company with a lot of LTS contracts

we created three streams

Consultants - play and throw awayCore Developers - collect and clean

Page 111: From Jurassic Park to Microservices

27

@SvenRuppertThe way of working

we are a product company with a lot of LTS contracts

we created three streams

Consultants - play and throw awayCore Developers - collect and clean

LTS Developers - keep alive

Page 112: From Jurassic Park to Microservices

27

@SvenRuppertThe way of working

we are a product company with a lot of LTS contracts

we created three streams

Consultants - play and throw awayCore Developers - collect and clean

LTS Developers - keep alive

Why ?

Page 113: From Jurassic Park to Microservices

28

@SvenRuppertThe way of working

Consultants - play and throw awayCore Developer - collect and cleanLTS Developer - keep alive Why ?

Page 114: From Jurassic Park to Microservices

28

@SvenRuppertThe way of working

Consultants - play and throw awayCore Developer - collect and cleanLTS Developer - keep alive Why ?some want to learn and experiment

Page 115: From Jurassic Park to Microservices

28

@SvenRuppertThe way of working

Consultants - play and throw awayCore Developer - collect and cleanLTS Developer - keep alive Why ?some want to learn and experimentsome need more stabil environments

Page 116: From Jurassic Park to Microservices

28

@SvenRuppertThe way of working

Consultants - play and throw awayCore Developer - collect and cleanLTS Developer - keep alive Why ?some want to learn and experimentsome need more stabil environmentssome did not want to change something

Page 117: From Jurassic Park to Microservices

29

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

Why ?some want to learn and experiment

some need more stabil environments

some did not want to change something

Page 118: From Jurassic Park to Microservices

29

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

Why ?some want to learn and experiment

some need more stabil environments

some did not want to change something

amount of hours paid by the customer

Page 119: From Jurassic Park to Microservices

29

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

Why ?some want to learn and experiment

some need more stabil environments

some did not want to change something

amount of hours paid by the customer

rated on hours the systems are stabil

Page 120: From Jurassic Park to Microservices

29

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

Why ?some want to learn and experiment

some need more stabil environments

some did not want to change something

amount of hours paid by the customer

rated on hours the systems are stabil

fixed income - bonus based on Change Request

Page 121: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

Page 122: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

Page 123: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

Page 124: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

customer driven

Page 125: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep alive

customer driven

Page 126: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep aliveSCRUM

customer driven

Page 127: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep aliveSCRUM

customer driven

Page 128: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep aliveSCRUM

customer driven

roadmap driven

Page 129: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep aliveSCRUM

customer driven

roadmap driven

Page 130: From Jurassic Park to Microservices

30

@SvenRuppertThe way of working

Consultants - play and throw away

Core Developer - collect and clean

LTS Developer - keep aliveSCRUM

Kanban

customer driven

roadmap driven

Page 131: From Jurassic Park to Microservices

31

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers Core - Developers

Consultants

Page 132: From Jurassic Park to Microservices

31

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers Core - Developers

Consultants

Page 133: From Jurassic Park to Microservices

31

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers Core - Developers

Fire

Consultants

Page 134: From Jurassic Park to Microservices

31

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers Core - Developers

Fire

Consultants

Page 135: From Jurassic Park to Microservices

31

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers Core - Developers

Fire

Consultants

Page 136: From Jurassic Park to Microservices

31

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers Core - Developers

Fire

Consultants

Page 137: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Page 138: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

LTS - Developers LTS - Developers LTS - Developers

Page 139: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Consultants Consultants Consultants

LTS - Developers LTS - Developers

Page 140: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Consultants Consultants Consultants

LTS - Developers LTS - Developers

Page 141: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Consultants Consultants Consultants

LTS - Developers LTS - Developers

time based planning

Page 142: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers

Consultants Consultants Consultants

LTS - Developers LTS - Developers

Core - Developers Core - Developers

time based planning

Page 143: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers

Consultants Consultants Consultants

LTS - Developers LTS - Developers

Core - Developers Core - Developers

time based planning

Page 144: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers

Consultants Consultants Consultants

LTS - Developers LTS - Developers

Core - Developers Core - Developers

time based planning

version based

Page 145: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers

Consultants Consultants Consultants

LTS - Developers LTS - Developers

Core - Developers Core - Developers

time based planning fixed size time slots

version based

Page 146: From Jurassic Park to Microservices

32

@SvenRuppertThe way of working

SCRUM

Kanban

Consultants

LTS - Developers

Core - Developers

Consultants Consultants Consultants

LTS - Developers LTS - Developers

Core - Developers Core - Developers

time based planning fixed size time slots

version based dynamic size time slots

Page 147: From Jurassic Park to Microservices

33

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

Page 148: From Jurassic Park to Microservices

33

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

build a source of knowledge

Page 149: From Jurassic Park to Microservices

33

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

build a source of knowledge

Page 150: From Jurassic Park to Microservices

33

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

build a source of knowledge

Page 151: From Jurassic Park to Microservices

33

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

build a source of knowledge

Page 152: From Jurassic Park to Microservices

34

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

Hacking session

Articles / Blogs

Screencasts Refactoring SessionsPOC

Page 153: From Jurassic Park to Microservices

34

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

Hacking session

Articles / Blogs

Screencasts Refactoring SessionsPOC

Page 154: From Jurassic Park to Microservices

34

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

Hacking session

Articles / Blogs

Screencasts Refactoring SessionsPOC

Page 155: From Jurassic Park to Microservices

34

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

Hacking session

Articles / Blogs

Screencasts Refactoring SessionsPOC

Page 156: From Jurassic Park to Microservices

34

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

Hacking session

Articles / Blogs

Screencasts Refactoring SessionsPOC

Page 157: From Jurassic Park to Microservices

34

@SvenRuppertKnowledge Sharing

Consultants

LTS - Developers

Core - Developers

Hacking session

Articles / Blogs

Screencasts Refactoring SessionsPOC

Page 158: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

Page 159: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

if you ask the consultants…

Page 160: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

if you ask the consultants…to scale or change you need at least … ;-)

Page 161: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

if you ask the consultants…to scale or change you need at least … ;-)

NoSQL

Page 162: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

if you ask the consultants…to scale or change you need at least … ;-)

NoSQL Akka / Scala

Page 163: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

if you ask the consultants…to scale or change you need at least … ;-)

NoSQL

Events

Akka / Scala

Page 164: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

if you ask the consultants…to scale or change you need at least … ;-)

NoSQL

Events

Akka / Scala

Reactive

Page 165: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

if you ask the consultants…to scale or change you need at least … ;-)

NoSQL

Events

Akka / Scala

ReactiveFunctional

Page 166: From Jurassic Park to Microservices

35

@SvenRuppertTechnical Migrations

if you ask the consultants…to scale or change you need at least … ;-)

NoSQL

Events

Akka / Scala

ReactiveFunctional

maybe ;-)

Page 167: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Page 168: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

JDBC - ResultSet

Page 169: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

JDBC - ResultSet

Page 170: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

JDBC - ResultSet Speedment - Streams

Page 171: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Swing JDBC - ResultSet Speedment - Streams

Page 172: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Swing JDBC - ResultSet Speedment - Streams

Page 173: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Swing VaadinJDBC - ResultSet Speedment - Streams

Page 174: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Swing Vaadin

HashMap

JDBC - ResultSet Speedment - Streams

Page 175: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Swing Vaadin

HashMap

JDBC - ResultSet Speedment - Streams

Page 176: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Swing Vaadin

HashMap Hazelcast - Map

JDBC - ResultSet Speedment - Streams

Page 177: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Swing Vaadin

HashMap Hazelcast - Map

JDBC - ResultSet Speedment - Streams

what is the right technology for your team?

Page 178: From Jurassic Park to Microservices

36

@SvenRuppertTechnical Transformation

Swing Vaadin

HashMap Hazelcast - Map

JDBC - ResultSet Speedment - Streams

what is the right technology for your team? what is the right order?

Page 179: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

Page 180: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

Page 181: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

reduce complexity

Page 182: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

reduce complexity the team could work with

Page 183: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

reduce complexityscale

the team could work with

Page 184: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

reduce complexityscale

the team could work with

a lot more….

Page 185: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

reduce complexityscale

the team could work with

a lot more….

start with new modules ?

Page 186: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

reduce complexityscale

the team could work with

a lot more….

start with new modules ?start with the oldest one ?

Page 187: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

reduce complexityscale

the team could work with

a lot more….

start with new modules ?start with the oldest one ?

most komplex one?

Page 188: From Jurassic Park to Microservices

37

@SvenRuppertTechnical Transformation

what is the right technology for your team?

what is the right order?

reduce complexityscale

the team could work with

a lot more….

start with new modules ?start with the oldest one ?

most komplex one?… or ….

Page 189: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

Page 190: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

Page 191: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versions

Page 192: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versions

v1

Page 193: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versions

v1

Page 194: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versions

v1

Page 195: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versions

v1

v2

Page 196: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versions

v1

v2stabilize

Page 197: From Jurassic Park to Microservices

38

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versions

v1

v2stabilize

Page 198: From Jurassic Park to Microservices

39

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versionsv2

stabilize

Page 199: From Jurassic Park to Microservices

39

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versionsv2

stabilizedelta t compared to project lifetime

Page 200: From Jurassic Park to Microservices

39

@SvenRuppertTechnical Transformation

on thing that would limit your speed…

time

number of versionsv2

stabilizedelta t compared to project lifetime

Page 201: From Jurassic Park to Microservices

40

@SvenRuppertQM / QS - TDD

Do you have bugs in your code ?

Page 202: From Jurassic Park to Microservices

40

@SvenRuppertQM / QS - TDD

Do you have bugs in your code ?

no

Page 203: From Jurassic Park to Microservices

40

@SvenRuppertQM / QS - TDD

Do you have bugs in your code ?

since years you are

working hard on this….

no

Page 204: From Jurassic Park to Microservices

40

@SvenRuppertQM / QS - TDD

Do you have bugs in your code ?

since years you are

working hard on this….

no

Page 205: From Jurassic Park to Microservices

41

@SvenRuppertQM / QS - TDD

Codebase is > 13 years old remember….

how to start?what is the right point to start?

how to increase the quality of the tests?

Page 206: From Jurassic Park to Microservices

41

@SvenRuppertQM / QS - TDD

Codebase is > 13 years old no test coverage

remember….

how to start?what is the right point to start?

how to increase the quality of the tests?

Page 207: From Jurassic Park to Microservices

41

@SvenRuppertQM / QS - TDD

Codebase is > 13 years old no test coverage

how to decrease complexity?

remember….

how to start?what is the right point to start?

how to increase the quality of the tests?

Page 208: From Jurassic Park to Microservices

42

TDD with jUnit @SvenRuppert

Page 209: From Jurassic Park to Microservices

42

TDD with jUnit @SvenRuppert

are you using jUnit?

Page 210: From Jurassic Park to Microservices

42

TDD with jUnit @SvenRuppert

are you using jUnit?

assume that the following would make sense.. ;-)

Page 211: From Jurassic Park to Microservices

42

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 212: From Jurassic Park to Microservices

42

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 213: From Jurassic Park to Microservices

42

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 214: From Jurassic Park to Microservices

43

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 215: From Jurassic Park to Microservices

43

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 216: From Jurassic Park to Microservices

43

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 217: From Jurassic Park to Microservices

43

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 218: From Jurassic Park to Microservices

43

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 219: From Jurassic Park to Microservices

44

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 220: From Jurassic Park to Microservices

44

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 221: From Jurassic Park to Microservices

44

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 222: From Jurassic Park to Microservices

45

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 223: From Jurassic Park to Microservices

45

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 224: From Jurassic Park to Microservices

45

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 225: From Jurassic Park to Microservices

46

Mutation Testing @SvenRuppert

Page 226: From Jurassic Park to Microservices

46

Mutation Testing @SvenRuppert

Mutation Testing is a structural testing method

Page 227: From Jurassic Park to Microservices

46

Mutation Testing @SvenRuppert

Mutation Testing is a structural testing method

we want to find a way to write "good" tests

Page 228: From Jurassic Park to Microservices

46

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 229: From Jurassic Park to Microservices

46

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 230: From Jurassic Park to Microservices

46

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 231: From Jurassic Park to Microservices

47

Mutation Testing - the Idea @SvenRuppert

Page 232: From Jurassic Park to Microservices

47

Mutation Testing - the Idea @SvenRuppert

a mutation is a small change in the code

Page 233: From Jurassic Park to Microservices

47

Mutation Testing - the Idea @SvenRuppert

a mutation is a small change in the code.. small enough to be a small defect

Page 234: From Jurassic Park to Microservices

47

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 235: From Jurassic Park to Microservices

47

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 236: From Jurassic Park to Microservices

48

Mutation Testing - the Idea @SvenRuppert

P will be the programT will be the collection of all tests / Test Suite

Page 237: From Jurassic Park to Microservices

48

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 238: From Jurassic Park to Microservices

48

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 239: From Jurassic Park to Microservices

48

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 240: From Jurassic Park to Microservices

48

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 241: From Jurassic Park to Microservices

48

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 242: From Jurassic Park to Microservices

48

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 243: From Jurassic Park to Microservices

49

Mutation Testing - the Idea @SvenRuppert

Page 244: From Jurassic Park to Microservices

49

Mutation Testing - the Idea @SvenRuppert

if we kill k out of n mutants

Page 245: From Jurassic Park to Microservices

49

Mutation Testing - the Idea @SvenRuppert

if we kill k out of n mutants -> we are not good enough ;-)

Page 246: From Jurassic Park to Microservices

49

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 247: From Jurassic Park to Microservices

49

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 248: From Jurassic Park to Microservices

49

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 249: From Jurassic Park to Microservices

49

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 250: From Jurassic Park to Microservices

50

Mutation Testing @SvenRuppert

practical TDD with Mutation Testing

Page 251: From Jurassic Park to Microservices

50

Mutation Testing @SvenRuppert

generating the mutants and

practical TDD with Mutation Testing

Page 252: From Jurassic Park to Microservices

50

Mutation Testing @SvenRuppert

generating the mutants and

practical TDD with Mutation Testing

running all junit tests

Page 253: From Jurassic Park to Microservices

50

Mutation Testing @SvenRuppert

generating the mutants and

practical TDD with Mutation Testing

running all junit testscheck the reports

Page 254: From Jurassic Park to Microservices

50

Mutation Testing @SvenRuppert

generating the mutants and

practical TDD with Mutation Testing

running all junit testscheck the reports

write more / better tests

Page 255: From Jurassic Park to Microservices

50

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 256: From Jurassic Park to Microservices

51

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 257: From Jurassic Park to Microservices

51

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 258: From Jurassic Park to Microservices

51

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 259: From Jurassic Park to Microservices

51

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 260: From Jurassic Park to Microservices

51

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 261: From Jurassic Park to Microservices

51

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 262: From Jurassic Park to Microservices

52

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 263: From Jurassic Park to Microservices

52

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 264: From Jurassic Park to Microservices

52

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 265: From Jurassic Park to Microservices

52

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 266: From Jurassic Park to Microservices

53

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 267: From Jurassic Park to Microservices

53

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 268: From Jurassic Park to Microservices

53

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); } @Test

public void testAdd002() throws Exception { final int add = new Service().add(3, 0); Assertions.assertThat(add).isEqualTo(3); }

Page 269: From Jurassic Park to Microservices

54

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 270: From Jurassic Park to Microservices

54

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 271: From Jurassic Park to Microservices

54

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 272: From Jurassic Park to Microservices

55

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 273: From Jurassic Park to Microservices

55

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 274: From Jurassic Park to Microservices

55

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 275: From Jurassic Park to Microservices

56

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 276: From Jurassic Park to Microservices

56

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 277: From Jurassic Park to Microservices

56

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 278: From Jurassic Park to Microservices

Killed 3

57

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 279: From Jurassic Park to Microservices

Killed 3

57

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 280: From Jurassic Park to Microservices

57

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 281: From Jurassic Park to Microservices

Killed 4

57

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 282: From Jurassic Park to Microservices

Killed 4

57

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 283: From Jurassic Park to Microservices

Killed 4

57

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 284: From Jurassic Park to Microservices

Killed 4

57

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 285: From Jurassic Park to Microservices

Killed 4

57

Mutation Testing - Hello World @SvenRuppert

final int add = new Service().add(0, 0);

>> Generated 54 mutationsfinal int add = new Service().add(2, 0);

Page 286: From Jurassic Park to Microservices

Killed 4

57

Mutation Testing - Hello World @SvenRuppert

>> Generated 54 mutationsfinal int add = new Service().add(2, 0);

Page 287: From Jurassic Park to Microservices

Killed 4

58

Mutation Testing - Hello World @SvenRuppert

>> Generated 54 mutations

final int add = new Service().add(2, 0);

Page 288: From Jurassic Park to Microservices

Killed 4

58

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 289: From Jurassic Park to Microservices

58

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 290: From Jurassic Park to Microservices

Killed 5

58

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 291: From Jurassic Park to Microservices

Killed 5

58

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 292: From Jurassic Park to Microservices

Killed 5

59

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 293: From Jurassic Park to Microservices

Killed 5

59

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 294: From Jurassic Park to Microservices

59

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 295: From Jurassic Park to Microservices

Killed 6

59

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 296: From Jurassic Park to Microservices

Killed 6

59

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 297: From Jurassic Park to Microservices

Killed 6

59

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 298: From Jurassic Park to Microservices

Killed 6

59

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 299: From Jurassic Park to Microservices

Killed 6

59

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 300: From Jurassic Park to Microservices

Killed 6

60

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 301: From Jurassic Park to Microservices

Killed 6

60

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 302: From Jurassic Park to Microservices

61

Mutation Testing - in short words @SvenRuppert

Page 303: From Jurassic Park to Microservices

61

Mutation Testing - in short words @SvenRuppert

mutation testing is an add on to normal jUnit TDD

Page 304: From Jurassic Park to Microservices

61

Mutation Testing - in short words @SvenRuppert

mutation testing is an add on to normal jUnit TDD

tools are supporting it well

Page 305: From Jurassic Park to Microservices

61

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 306: From Jurassic Park to Microservices

61

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 307: From Jurassic Park to Microservices

61

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 308: From Jurassic Park to Microservices

62

Mutation Testing - Lesson Learned @SvenRuppert

Page 309: From Jurassic Park to Microservices

62

Mutation Testing - Lesson Learned @SvenRuppert

mutation tests are often leading to

Page 310: From Jurassic Park to Microservices

62

Mutation Testing - Lesson Learned @SvenRuppert

mutation tests are often leading to

…cleaner code compared to jUnit only

Page 311: From Jurassic Park to Microservices

63

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 312: From Jurassic Park to Microservices

64

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 313: From Jurassic Park to Microservices

65

Mutation Testing - Lesson Learned @SvenRuppert

Version 1 Version 2

Page 314: From Jurassic Park to Microservices

65

Mutation Testing - Lesson Learned @SvenRuppert

Version 1 Version 2 for { if { if else { if if if } } else }

Page 315: From Jurassic Park to Microservices

65

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 316: From Jurassic Park to Microservices

66

Example of useless Code @SvenRuppert

Page 317: From Jurassic Park to Microservices

66

Example of useless Code @SvenRuppert

Page 318: From Jurassic Park to Microservices

66

Example of useless Code @SvenRuppert

Page 319: From Jurassic Park to Microservices

Summary

67

@SvenRuppert

Now it is time to relax again ;-)

Page 320: From Jurassic Park to Microservices

Summary

68

@SvenRuppert

If you are interested…

have a look at GITHUB

ProxyBuilder

Dynamic-Dependency-Injection

Java-Microservice

or contact me ;-) @SvenRuppert

Page 321: From Jurassic Park to Microservices

Summary

68

@SvenRuppert

If you are interested…

have a look at GITHUB

ProxyBuilder

Dynamic-Dependency-Injection

Java-Microservice

or contact me ;-) @SvenRuppert

Thank You !!!


Recommended