42
Behavior Driven Development by Aliaksandr Ikhelis, 2012 Friday, 30 November 12

Bdd intro for Microsoft, 29 Nov 2012

Embed Size (px)

DESCRIPTION

High level intro into BDD for "MSN websites" and "win 8 apps" teams in Microsoft, 29 Nov 2012

Citation preview

Page 1: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven Development

by Aliaksandr Ikhelis, 2012Friday, 30 November 12

Page 2: Bdd intro for Microsoft, 29 Nov 2012

Communication Issue

They are slow!..

They do not know what they need!..

Friday, 30 November 12

Page 3: Bdd intro for Microsoft, 29 Nov 2012

Communication Issue

They are slow!..

They do not know what they need!..

Friday, 30 November 12

Page 4: Bdd intro for Microsoft, 29 Nov 2012

Building communication bridge

Friday, 30 November 12

Page 5: Bdd intro for Microsoft, 29 Nov 2012

Building communication bridge

Friday, 30 November 12

Page 6: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven Development

Friday, 30 November 12

Page 7: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven Development

BDD is an evolution in the thinking behind TDD & ATDP

Friday, 30 November 12

Page 8: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven Development

BDD is an evolution in the thinking behind TDD & ATDP

Focus on delivery of the prioritized and verifiable business value

by providing a common vocabulary

Friday, 30 November 12

Page 9: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven DevelopmentPractices

Friday, 30 November 12

Page 10: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven DevelopmentPractices

• Establish goals

Friday, 30 November 12

Page 11: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven DevelopmentPractices

• Establish goals

• Draw out features using feature injection

Friday, 30 November 12

Page 12: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven DevelopmentPractices

• Establish goals

• Draw out features using feature injection

• Involve stakeholders in the implementation process through outside-in software development

Friday, 30 November 12

Page 13: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven DevelopmentPractices

• Establish goals

• Draw out features using feature injection

• Involve stakeholders in the implementation process through outside-in software development

• Use examples to describe behavior

Friday, 30 November 12

Page 14: Bdd intro for Microsoft, 29 Nov 2012

Behavior Driven DevelopmentPractices

• Establish goals

• Draw out features using feature injection

• Involve stakeholders in the implementation process through outside-in software development

• Automate examples to provide quick feedback and regression testing

• Use examples to describe behavior

Friday, 30 November 12

Page 15: Bdd intro for Microsoft, 29 Nov 2012

What BDD adds to TDD

Friday, 30 November 12

Page 16: Bdd intro for Microsoft, 29 Nov 2012

What BDD adds to TDD

• Test what an object does instead of what it is

Friday, 30 November 12

Page 17: Bdd intro for Microsoft, 29 Nov 2012

What BDD adds to TDD

• Test what an object does instead of what it is

• Design top-down, which is essential for YAGNI – You Aren't Gonna Need It

Friday, 30 November 12

Page 18: Bdd intro for Microsoft, 29 Nov 2012

What BDD adds to TDD

• Test what an object does instead of what it is

• Design top-down, which is essential for YAGNI – You Aren't Gonna Need It

• Define acceptance criteria with the customer and specify it in the automated way, serve the living spec

Friday, 30 November 12

Page 19: Bdd intro for Microsoft, 29 Nov 2012

The BDD “Outside-In” cycle

Friday, 30 November 12

Page 20: Bdd intro for Microsoft, 29 Nov 2012

The BDD “Outside-In” cycle

Friday, 30 November 12

Page 21: Bdd intro for Microsoft, 29 Nov 2012

Gherkin: feature title and narrative

Feature: Adding movies to the queue

Friday, 30 November 12

Page 22: Bdd intro for Microsoft, 29 Nov 2012

Gherkin: feature title and narrative

Feature: Adding movies to the queue

Friday, 30 November 12

Page 23: Bdd intro for Microsoft, 29 Nov 2012

Gherkin: feature title and narrative

Feature: Adding movies to the queue

Friday, 30 November 12

Page 24: Bdd intro for Microsoft, 29 Nov 2012

Gherkin: feature title and narrative

Feature: Adding movies to the queue

Friday, 30 November 12

Page 25: Bdd intro for Microsoft, 29 Nov 2012

Describing Features with Cucumber

Friday, 30 November 12

Page 26: Bdd intro for Microsoft, 29 Nov 2012

Describing Features with Cucumber

Cucumber is a BDD tool that reads plain text descriptions of application features with example scenarios, which can be converted into automation. The text is written in a business readable domain language, known as Gherkin.

Friday, 30 November 12

Page 27: Bdd intro for Microsoft, 29 Nov 2012

Describing Features with Cucumber

Cucumber is a BDD tool that reads plain text descriptions of application features with example scenarios, which can be converted into automation. The text is written in a business readable domain language, known as Gherkin.

Friday, 30 November 12

Page 28: Bdd intro for Microsoft, 29 Nov 2012

Describing code with RSpec

Friday, 30 November 12

Page 29: Bdd intro for Microsoft, 29 Nov 2012

Describing code with RSpec

RSpec is a BDD framework, which is used to write executable examples of the expected behaviour of a small bit of code in a controlled context.

Friday, 30 November 12

Page 30: Bdd intro for Microsoft, 29 Nov 2012

Describing code with RSpec

RSpec is a BDD framework, which is used to write executable examples of the expected behaviour of a small bit of code in a controlled context.

Code example: Output:

Friday, 30 November 12

Page 31: Bdd intro for Microsoft, 29 Nov 2012

Describing code with RSpecDescribing code with RSpec

Friday, 30 November 12

Page 32: Bdd intro for Microsoft, 29 Nov 2012

Example: story card

Friday, 30 November 12

Page 33: Bdd intro for Microsoft, 29 Nov 2012

Example: process flow

Friday, 30 November 12

Page 34: Bdd intro for Microsoft, 29 Nov 2012

Describing code with RSpecDescribing code with RSpec

Friday, 30 November 12

Page 35: Bdd intro for Microsoft, 29 Nov 2012

Testing quadrands

Friday, 30 November 12

Page 36: Bdd intro for Microsoft, 29 Nov 2012

AFTERBEFORE

Get the testing pyramid (un)fit

Friday, 30 November 12

Page 37: Bdd intro for Microsoft, 29 Nov 2012

Communications in the business org

Friday, 30 November 12

Page 38: Bdd intro for Microsoft, 29 Nov 2012

Communications in the business org

1. Translate business goals into prioritized list of features

Friday, 30 November 12

Page 39: Bdd intro for Microsoft, 29 Nov 2012

Communications in the business org

1. Translate business goals into prioritized list of features

2. Trace required behavior within the team - drive design by behavior, build transparency, trust and confidence.

Friday, 30 November 12

Page 40: Bdd intro for Microsoft, 29 Nov 2012

Communications in the business org

1. Translate business goals into prioritized list of features

2. Trace required behavior within the team - drive design by behavior, build transparency, trust and confidence.

3. Clarify business value and desired software behavior - ask “5 Why”, provide feedback, if application logic appears overcomplicated.

Friday, 30 November 12

Page 41: Bdd intro for Microsoft, 29 Nov 2012

Speaking the same language = building together

As an awesome teamWe want to build such a great productSo that everyone loves it

Given the investment of 22M of bricks When you place all the bricks properly Then the Microsoft Tower of Babel is visible to all people across the Globe

Friday, 30 November 12

Page 42: Bdd intro for Microsoft, 29 Nov 2012

Recommended reading

by Aliaksandr Ikhelis, 2012Friday, 30 November 12