Bdd intro for Microsoft, 29 Nov 2012

Preview:

DESCRIPTION

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

Citation preview

Behavior Driven Development

by Aliaksandr Ikhelis, 2012Friday, 30 November 12

Communication Issue

They are slow!..

They do not know what they need!..

Friday, 30 November 12

Communication Issue

They are slow!..

They do not know what they need!..

Friday, 30 November 12

Building communication bridge

Friday, 30 November 12

Building communication bridge

Friday, 30 November 12

Behavior Driven Development

Friday, 30 November 12

Behavior Driven Development

BDD is an evolution in the thinking behind TDD & ATDP

Friday, 30 November 12

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

Behavior Driven DevelopmentPractices

Friday, 30 November 12

Behavior Driven DevelopmentPractices

• Establish goals

Friday, 30 November 12

Behavior Driven DevelopmentPractices

• Establish goals

• Draw out features using feature injection

Friday, 30 November 12

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

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

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

What BDD adds to TDD

Friday, 30 November 12

What BDD adds to TDD

• Test what an object does instead of what it is

Friday, 30 November 12

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

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

The BDD “Outside-In” cycle

Friday, 30 November 12

The BDD “Outside-In” cycle

Friday, 30 November 12

Gherkin: feature title and narrative

Feature: Adding movies to the queue

Friday, 30 November 12

Gherkin: feature title and narrative

Feature: Adding movies to the queue

Friday, 30 November 12

Gherkin: feature title and narrative

Feature: Adding movies to the queue

Friday, 30 November 12

Gherkin: feature title and narrative

Feature: Adding movies to the queue

Friday, 30 November 12

Describing Features with Cucumber

Friday, 30 November 12

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

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

Describing code with RSpec

Friday, 30 November 12

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

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

Describing code with RSpecDescribing code with RSpec

Friday, 30 November 12

Example: story card

Friday, 30 November 12

Example: process flow

Friday, 30 November 12

Describing code with RSpecDescribing code with RSpec

Friday, 30 November 12

Testing quadrands

Friday, 30 November 12

AFTERBEFORE

Get the testing pyramid (un)fit

Friday, 30 November 12

Communications in the business org

Friday, 30 November 12

Communications in the business org

1. Translate business goals into prioritized list of features

Friday, 30 November 12

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

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

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

Recommended reading

by Aliaksandr Ikhelis, 2012Friday, 30 November 12