Here is a draft acceptance criteria for the feature:Scenario: Film member selects movie to rent with priority Given the film member has an account And there are movies available to rent When the member selects a movie And assigns it a priority of "High", "Medium", or "Low" Then the movie is added to their rental list And the priority is recordedScenario: Movies allocated by priority Given there are members with rental requests And some requests have "High" priority And some have "Medium" And some have "Low" When movies become available to allocate Then movies are allocated to "High" priority requests first And then "Medium" And then "Low
The document discusses Cucumber, a tool for writing acceptance tests in a business-readable domain-specific language called Gherkin. It touches on how Cucumber supports over 28 languages by compiling Gherkin grammars into the target language. It also provides examples of tagging scenarios and features in Cucumber to enable focused testing. Finally, it recommends further reading resources for learning more about Cucumber.
Similar to Here is a draft acceptance criteria for the feature:Scenario: Film member selects movie to rent with priority Given the film member has an account And there are movies available to rent When the member selects a movie And assigns it a priority of "High", "Medium", or "Low" Then the movie is added to their rental list And the priority is recordedScenario: Movies allocated by priority Given there are members with rental requests And some requests have "High" priority And some have "Medium" And some have "Low" When movies become available to allocate Then movies are allocated to "High" priority requests first And then "Medium" And then "Low
Similar to Here is a draft acceptance criteria for the feature:Scenario: Film member selects movie to rent with priority Given the film member has an account And there are movies available to rent When the member selects a movie And assigns it a priority of "High", "Medium", or "Low" Then the movie is added to their rental list And the priority is recordedScenario: Movies allocated by priority Given there are members with rental requests And some requests have "High" priority And some have "Medium" And some have "Low" When movies become available to allocate Then movies are allocated to "High" priority requests first And then "Medium" And then "Low (20)
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Here is a draft acceptance criteria for the feature:Scenario: Film member selects movie to rent with priority Given the film member has an account And there are movies available to rent When the member selects a movie And assigns it a priority of "High", "Medium", or "Low" Then the movie is added to their rental list And the priority is recordedScenario: Movies allocated by priority Given there are members with rental requests And some requests have "High" priority And some have "Medium" And some have "Low" When movies become available to allocate Then movies are allocated to "High" priority requests first And then "Medium" And then "Low
8. Scenario: Ecstatic Underground attendees
Given people turned up
When Joseph talks
Then everyone should learn something new
And no-one should fall asleep
And no cucumbers should be thrown
14. Outside-in
User
Browser
Views
Controllers
Models
15. “I believe that the hardest part of software projects, the
most common source of project failure, is
communication with the customers and users of
that software.
By providing a clear yet precise language to deal
with domains, a DSL can help improve this
communication.”
Martin Fowler
24. For Cuke Sake Why?
• Token Conversation
• Acceptance Criteria
• Design
• Documentation
• Functional test
• Integration test
25. Cucumber Feature
Feature: Be awesome Not
Narrative executed
Example of
Scenario: title
behaviour
which rocks
Given <some context>
And <yet more context>
When <some action>
Steps
And <more actions>
Then <some outcome>
And <more outcomes>
26. Cucumber Feature
Feature: Be awesome Not
Narrative executed
Example of
Scenario: title
behaviour
which rocks
Given <some context>
And <yet more context>
When <some action>
Steps
And <more actions>
Then <some outcome>
And <more outcomes>
28. Plaintext
Step Given a foaming cuke
Ruby Plaintext
Plaintext
Ruby
Ruby
29. Plaintext
Step Given a foaming cuke
Ruby Plaintext
Plaintext
Given /^a foaming (.*)$/i do |fruit|
Step fruit.should == 'cukes'
#assert_equal(fruit, 'cukes')
definition end
Ruby
Ruby
30. Plaintext
Step Given a foaming cuke
regexp match
Ruby Plaintext
Plaintext
Given /^a foaming (.*)$/i do |fruit|
Step fruit.should == 'cukes'
#assert_equal(fruit, 'cukes')
definition end
Ruby
Ruby
35. огурец Russian
concombre French
Japanese
Okurkový Czech
Gurke German
Cucumber English
pepino Spanish
cetriolo Italian
agurk Danish
ﺍﳋﻴﺎﺭ Arabic
ketimun Indonesian
מְלָפְפֹון Hebrew
Cogombre Catalan
CUCUMBR LOLCats
Agurk Norwegian
36. огурец Russian Korean
concombre French
gurka Swedish
Japanese
castravete Romanian
Okurkový Czech
ogórek Polish
Gurke German
Cucumber English Kurk Estonian
pepino Spanish dưa chuột Vietnamese
cetriolo Italian uhorka Slovak
agurk Danish gurķis Latvian
ﺍﳋﻴﺎﺭ Arabic Agurkas Lithuanian
ketimun Indonesian Salátauborka Hungarian
מְלָפְפֹון Hebrew
Kurkku Finnish
Cogombre Catalan
Краставица Bulgarian
CUCUMBR LOLCats
Agurk Norwegian Pepino Portuguese
37. # language: en-au
Crikey: Eating
Mate: cucumbers
Ya now how I have 3 cucumbers
When I eat 2 cucumbers
Ya gotta have 2 cucumbers in the belly
N I have 1 cucumber left
YaNowHow /^I have (d+) cucumbers$/ do |n|
@basket = Basket.new(n.to_i)
end
When /^I eat (d+) cucumbers$/ do |n|
@belly = Belly.new
@belly.eat(@basket.take(n.to_i))
end
YaGotta /^have (d+) cucumbers in the belly$/ do |n|
@belly.cukes.should == n.to_i
end
48. Story
Story: Film Member selects a movie to rent with priority
As a Film member
I want to add movies to my rental list with a priority
So that ...
49. Story
Story: Film Member selects a movie to rent with priority
As a Film member
I want to add movies to my rental list with a priority
So that ...
Give me the movie
NOW!
50. Feature Injection
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Stock department
Wants Film members to add movies to their rental list with
a priority
51. Feature Injection
Value
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Stock department
Wants Film members to add movies to their rental list with
a priority
52. Feature Injection
Value
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Stock department
Wants Film members to add movies to their rental list with
Role a priority
53. Feature Injection
Value
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Stock department
Wants Film members to add movies to their rental list with
Role a priority
Role
54. Feature Injection
Value
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Stock department
Wants Film members to add movies to their rental list with
Role a priority
Role Feature
55. Are we
Acceptance
done yet?
Definition of Done.
56. Scenarios
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Stock department
Wants Film members to add movies to their rental list with
a priority
Scenario: High priority
57. Scenarios
Feature: Film Member selects a movie to rent with priority
In order to maximise allocation of films
The Stock department
Wants Film members to add movies to their rental list with
a priority
Scenario: High priority
Given I'm logged in
And I am viewing the movie "Casshern"
When I choose "High priority"
And I press "Rent"
Then I should see "My rental list"
And I should see "Casshern" in my rental list
And "Casshern" should be marked as "High priority"
65. The Art of
War Plaintext
, ,
@"===, ,_____cctI
"?AAAAAAAAAAAAAAAA,,,,,,,,,,,,,,,,,,,,,;LLLLLLLLLL
~",,, 1""""""""""""###OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
'"EEEEE, !'"***"~~~~~~"OOOIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
,EEEEE)>"'''???????"WWW!MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
"E.,)+="WWW~~~~~~#"OOO1OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
,~:#")LLL!"+++???????"$$$1==========##/
&LLLLLLLLL;;;;;;;;;;;;,,,/
1#LLLLLLLLLLLLLLLLLLLLLL!
,!###LLLLLL"'EEEE,'"LLLLL!
!######LLL" "EEE" "LLLL"
!#########L! "EEJ. "LL!
!##########1 "JJ*,l"
!############"! ,l"
1##########" 1"~~,~~"
!##########"
!###########!
!###########1
!############!
1#############
!"#############"
!##############!
1##########"' A magnum, By calendron
1#####"'
"""""
66. Don’t force
Feature: Title
In order to <value>
As a <role>
structure I want <feature>
67. Avoid Noise!
Given I am able to login
Given I am able to login
68. Avoid Given I login
Given I authenticate
Inconsistency Given I gain access
69. Given I go to the login page
Balance
And I fill in "username" with "cuke"
And I fill in "password" with "cuker"
And I click "login"
Abstraction Given I'm logged in
70. Use Language
Building blocks
Given /I’m logged in/ do
User.create!(:user => 'josephwilk', :password => "pass")
Given 'I fill in "password" with "josephwilk"'
Given 'I fill in "password" with "pass"'
Given 'I click "login"'
end
71. Email Email-spec
Webpages Webrat
Forms Webrat
Java/Swing Swinger
72. Gherkin Metrics?
Lack of narrative
# language: en-au
Crikey: Eating
Mate: cucumbers Number
Ya now how I have 3 cucumbers
When I eat 2 cucumbers of steps
Ya gotta have 2 cucumbers in the belly
N I have 1 cucumber left
Number of Semantically
noise words similar words
74. Spork
require 'rubygems'
require 'spork'
# Sets up the Rails environment for Cucumber
ENV["RAILS_ENV"] ||= "cucumber"
Spork.prefork do
$ spork cuc
# Load all the heavy stuff...
end
Spork.each_run do
$ cucumber --drb ...
# Load the stuff just for this run...
Before do
Pages.delete_all
end
end
79. Tag Hooks Before(‘@teleport’) do
teleport.prepare
Attach code to tags end
80. Focused Testing
@teleport
Feature: Invent teleportation
Run just enough tests @money
Feature: Make lots of money
81. Continuous Integration(WIP)
Fail
Work in Pass
Done
Pending
progress
add list $ cucumber --wip
movies movies
--tags @WIP
features/
edit
movies
delete
movies
82. Limiting Tags in Flow
Work in
Done
progress
add add add add
movies movies
movies movies $ cucumber --tags @WIP:3
features/
add add add edit
movies movies
movies movies limit 3 tags
add add add
delete
movies movies
movies movies