76
Behaviour Driven Development Time for a healthy talk with Matt Wynne Hans Odenthal September 22 nd , 2014

with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . [email protected] +31(0)40

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Behaviour Driven Development

Time for a healthy talk

with Matt Wynne

Hans Odenthal

September 22nd, 2014

Page 2: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Program

18:00 Welcome

18:05 Behaviour Driven Development, part 1

19:30 Break

20:00 Behaviour Driven Development, part 2

20:55 Hot or Not?

21:00 Drinks

Page 3: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Behaviour Driven Development

Is it about discipline?

Are fast results not healthy?

Does green always mean good?

Page 4: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Matt will give

all the answers

Page 5: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Matt, the floor is yours …

Page 6: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Behaviour-Driven Development

Matt WynneSioux Embedded Systems, Eindhoven22 September 2014!@[email protected]

Page 7: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

What is BDD?

...and why should I care?

Page 8: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

About Matt

• Programmer

• Agile / lean advocate & coach

• Author of The Cucumber Book

• Founder of Cucumber Ltd

Page 9: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 10: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 11: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 12: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 13: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Stakeholders, Customers,

UsersProgrammers,

Testers

Page 14: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Problem Domain

Solution Domain

Page 15: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Ubiquitous Language

Page 16: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Problem Domain

Solution Domain

Page 17: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Problem Domain

SolutionDomain

Page 18: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Deliberate discovery

Page 19: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

There are known knowns; there are things we know that we know.

!

There are known unknowns; that is to say there are things that, we now know we don't know.

!

But there are also unknown unknowns – there are things we do not know we don't know.

Page 20: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

ASSUME YOU'RE

IGNORANT

Page 21: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Specification by example

Page 22: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Ideas

Requirements

Examples

Automated Tests

Code

Page 23: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

CONVERSATIONS

Page 24: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

The Three Amigos

Page 25: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

ProblemDomain

SolutionDomain

Page 26: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Sustainable delivery

Page 27: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Cost of a change

Time

Page 28: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 29: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 30: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

You can't have clean code without refactoring

You can't refactor without good automated tests

You can't stay agile without clean code

Page 31: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Write a failing test

Make it pass

Clean up!

Page 32: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Living documentation

Page 33: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 34: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

So what is BDD?

• Using examples to drive conversations

• Using conversations to grow the team's domain knowledge

• Using automated tests for the examples, to keep total cost of ownership under control

Page 35: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

The floor is yours …

© Sioux 2013 | Confidential | 1

Page 36: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

L I F E A F T E R B D DM A T T W Y N N E , S O I U X E I N D H O V E N 2 0 1 4

Page 37: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 38: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

A G I L E

Page 39: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S C R U M

Page 40: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 1 :

B U R N E D T O A S T

Page 41: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 1 : B U R N E D T O A S T

1. Programmers write bugs

2. Testers find bugs

3. Project managers prioritise bugs

4. Programmers fix bugs

5. GOTO 1

Page 42: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

I ’ L L B U R N I T, Y O U S C R A P E I T ”

“ L E T ’ S M A K E T O A S T T H E A M E R I C A N W AY:

– D E M M I N G

Page 43: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 2 :

A U T O - B U R N E D T O A S T

Page 44: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 2 : A U T O - B U R N E D T O A S T

1. Programmers write bugs

2. Testers write automated tests

3. Automated tests find bugs

4. Project managers prioritise bugs

5. Programmers fix bugs

6. GOTO 1

Page 45: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

T H AT I S N O T B D D

Page 46: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

E V E N I F Y O U ’ R E U S I N G

C U C U M B E R

Page 47: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

C O D E T E S T F I X

B U I L D I N G

S O F T WA R E

B A C K WA R D S

Page 48: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

B E H AV I O U R D R I V E N

D E V E L O P M E N T

Page 49: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

C O D E T E S T F I X

Page 50: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 3 :

T H R E E A M I G O S

Page 51: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 3 : T H R E E A M I G O S

1. Programmers, Testers and BAs define behaviour together

2. Programmers write (less) bugs

3. Testers write (more) automated tests

4. Automated tests find bugs

5. Project managers prioritise bugs

6. Programmers fix bugs

7. GOTO 2

Page 52: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Story

Rule

Example

Question

QuestionRule

Example

Rule

Example

Page 53: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 3 : T H R E E A M I G O S

1. Programmers, Testers and BAs define behaviour together

2. Programmers write (less) bugs

3. Testers write (more) automated tests

4. Automated tests find bugs

5. Project managers prioritise bugs

6. Programmers fix bugs

7. GOTO 2

Page 54: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 55: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

W H Y D O T E S T E R S H AV E T O A U T O M AT E

T H E T E S T S ?

Page 56: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 4 :

T E S T- F I R S T

Page 57: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 4 : T E S T- F I R S T

1. Programmers, Testers and BAs define behaviour together

2. Team automate tests for that behaviour

3. Programmers make the tests pass

4. Testers find missing scenarios

5. GOTO 2

Page 58: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

B D D

Page 59: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 5 :

D I S I L L U S I O N M E N T

Page 60: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 5 : D I S I L L U S I O N M E N T

• Lots of scenarios

• Build takes ages

• Build normally broken

• Some scenarios flicker

• Poor / mixed readability

• I hate Cucumber

Page 61: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 62: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

VA L U E O F A T E S T O V E R T I M E

-25

0

25

50

75

100

Page 63: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

W H E N ’ S T H E L A S T T I M E

Y O U P U S H E D A T E S T D O W N ?

(or just deleted it altogether)

Page 64: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Y O U S T I L L H AV E T O

D O S O F T WA R E

D E S I G N

Page 65: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 66: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 67: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40
Page 68: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 6 :

T R A N S C E N D E N C E

Page 69: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

S TA G E 6 : T R A N S C E N D E N C E

• Problem domain is well understood by the team

• Solution models the problem well

• Scenarios are actually readable

• Rules over examples

• Clear architectural boundaries

• Fewer end-to-end tests

Page 70: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

T H E E N D

Page 71: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Hot-or-Not?

Page 72: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

‘Komkommertijd’?

Page 73: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

More Hot-or-Not

Oct 22 littleBits Workshop

Hot-or-Not, The Next Generation

Nov 10 Markus Völter & Tijs van der Storm

MDSD: What's the right way to go?

More information: www.sioux.eu/hotornot

© Sioux 2013 | Confidential | 3

Page 74: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

www.sioux.eu/premiumcourses

September 23 - 24, 2014

Behaviour Driven Development

Matt Wynne

November 11 - 12, 2014

Language Engineering with MPS

Markus Völter

Page 75: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

Thank you

Page 76: with Matt Wynne - Sioux · Behaviour Driven Development Matt Wynne November 11 - 12, 2014 Language Engineering with MPS Markus Völter . Thank you . hans.odenthal@sioux.eu +31(0)40

www.sioux.eu

[email protected]

+31(0)40 2677100