Transcript

BDD programming the happy way

by Leon Du

Friday, September 10, 2010

Who Am I

• Freelancer / Ruby on Rails developer @guangzhou

• github.com/leondu

• twitter.com/leondu

• flickr.com/leondu

[email protected]

Friday, September 10, 2010

Talk about

• BDD is a second-generation, outside-in, pull-based, multiple-stakeholder, multiple-scale,

high-automation, agile methodology. It describes a cycle of interactions with well-defined outputs, resulting in the delivery of working, tested software that matters. --- from wikipedia.org

• a set of toolsRspecCucumberWebratCapybaraemail-spec

BDD, aka, Behavior Driven Development

Friday, September 10, 2010

Methodology

• Change the way of development

• Focus on behavior not only internal structure

• Ease the difficulty of communication

Friday, September 10, 2010

BDD Cycle

Text

---from The RSpec BookFriday, September 10, 2010

---from The RSpec BookFriday, September 10, 2010

the Tools

• RSpecfor internal behaviors

• Cucumberfor system behaviors

• Webrat/Capybara/email-spec...for common task steps

Friday, September 10, 2010

Cucumber

Friday, September 10, 2010

CucumberCucumber

Features

Scenarios

Steps

http://cukes.info/Friday, September 10, 2010

Feature

• Plain text

• Focus on behavior

Friday, September 10, 2010

Scenario

• Write Scenario with Given/When/Then

Friday, September 10, 2010

StepStep definition

and is translated to below:

Friday, September 10, 2010

Advance topics

Preparing data with Examples

Friday, September 10, 2010

Advance topicsTesting email with email-spec

email steps

Friday, September 10, 2010

BDD in other world

• JavaInstinct, JDave, JBehave, BDoc...http://java-sources.org/open-source/bdd

• .NetStoryQhttp://storyq.codeplex.com/

http://www.codeproject.com/KB/testing/bddintro.aspx

Friday, September 10, 2010

Special Thanks To

Rain Chen [email protected]

Friday, September 10, 2010

Questions?

Friday, September 10, 2010


Top Related