第1页
RubyConf China 2015
CUCUMBER
BDD
第2页
ThoughtWorks Rubist CoC
> > Mobile
第3页
Cucumber
第4页
Ruby
step
step
step
第5页
Cucumber
第6页
BDD
第7页
BDD
Cucumber
第9页
ASLAK
Aslak Hellesøy, Cucumber
BDD BDD
BDD Cucumber
第10页
Cucumber BDD
第11页
DAN
NORTH
BDD ORIGINATOR
第13页
CustomerLookup
- finds customer by id - fails for duplicate customers ……
第14页
TDD
BDD
第15页
DAN
Dan North, BDD
BDD
pull
stakeholder
第16页
MATT
Matt Wynne Cucumber
BDD
第18页
Cucumber
DISCOVERY GENERATE WORKSHOP EXAMPLES
DRIVEN DEVELOPMENT
第21页
Scenario: Detect agent type based on contract number Given I am on the 'Find me' page And I have entered a contract number When I click 'Continue' button And a contact number match is found Then the "Back" button will be displayed
第23页
Step
# A feature
Given there is student Harry And there is professor Snape And student Harry joins class of professor Snape
# B feature, use 1 new step instead of 3
Given student Harry in class of professor Snape
第24页
Step
Given /^there is student (.*)/ do |student| user = User.create(student) ……
end # Given /^student (.*) in class of professor (.*)/ do |stu, pro|
step "there is student #{stu}" step "there is professor #{pro}" step "student #{stu} joins class of professor #{pro}" end
Given /^there is student come from (.*)/ do |country| ……
end
第25页
/^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}| [1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9] {1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1} [0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}| [1-9]{1}[0-9]{1}|[0-9])$/
第27页
Report
第29页
Cucumber
第30页
Scenario: Detect agent type based on contract number Given I ahmavoenath"eTi'eFdiAngdenmte"'ppoalgiecy AWnhdenIIhasvuebmeinttemryedcoantcroanctrancutmbneurm ber WThen I cslhiocukld'Cboentaisnkueed'fbourttmoynlast name And a contact number match is found Then the "Back" button will be displayed
第31页
Step
Given /^there is student (.*)/ do |student| user = User.create(student) ……
end Given /^there is student (.*)/ do |student|
ModelFactory.create_user(student) end
第32页
Step
Given /^student (.*) in class of professor (.*)/ do |stu, pro| step "there is student #{stu}" step "there is professor #{pro}" step "student #{stu} joins class of professor #{pro}"
end Given /^student (.*) in class of professor (.*)/ do |student, professor|
ModelFactory.create_user(student, professor) ModelFactory.join_class(student, professor) end
第34页
Cucumber
@active-doc Scenario: Detect agent type based on contract number Given I have a "TiedAgent" policy When I submit my contract number Then I should be asked for my last name
第35页
@active-doc Scenario: Detect agent type based on contract number Given I have a "TiedAgent" policy When I submit my contract number Then I should be asked for my last name
===================== Given I have a "TiedAgent" policy =====================
##Detail Information** **In this step, you are assigned a "TieAgent" policy.** ![screenshot-1](./i-have-a-tied-agent-policy.png) You can click [here](http://example.com) for more information
=====================
第37页
Cucumber
ActiveDoc
HTML
第40页
HTML
HTML Java C#
第43页
Gauge
Markdown Golang
第44页
Gauge
第46页
im_mao_chao chaomao@thoughtworks.com