This talk will look at 5 things Cucumber’s bad at, why that’s a good thing, and what it tells us about Cucumber’s sweet spot in a team’s toolkit.
Many times, when people complain about something Cucumber’s not good at, they’re unwittingly describing something Cucumber shouldn't be good at. They’re revealing that they don’t quite understand BDD and Cucumber’s role in it.
Cucumber is the world's most misunderstood collaboration tool and people need to hear this over and over again.
4. Problems with My Car
1. Doesn’t taste good
2. Doesn’t fit in my carry-on luggage
3. Buggy entertainment system
4. Some people think it’s ugly
5. Bigger than most other cars
6. Relatively low gas mileage
5. Two kinds of
Weaknesses
Those that represent
opportunities for
improvement
Those that teach us
what the thing is &
what we do or don’t
need
6. 5 “Problems” with Cucumber
that can teach us
about Cucumber,
BDD, and us
7. “Problems” with Cucumber #1
Gherkin isn’t a very powerful language.
Where are my Gherkin
macros? How am I
supposed to program
with this?
8. “Problems” with Cucumber #2
I have to describe things in 2 places.
Background:
Given
a
provider
named
"Complex
Schedule
Provider"
serving:
|
From
|
To
|
When
|
Both
Ways?
|
|
Boulder
|
Boulder
|
M-‐F
7:30am-‐5pm
|
yes
|
|
Boulder
|
Lafayette
|
M
7:30am-‐5pm;
W
7:30am-‐5pm
|
yes
|
|
Boulder
|
Louisville
|
M-‐F
7:30am-‐5pm
|
no
|
And
I'm
logged
in
as
a
non-‐admin
user
Given
/^a
provider
named
"([^"]*)"
serving:$/
do
|provider_name,
schedule|
#
...
end
Given
/I'm
logged
in
as
a
non-‐admin
user/
do
#
...
end
9. “Problems” with Cucumber #3
Step definitions are all global.
Why don’t I get
namespaces? Won’t this
lead to ambiguity?
11. “Problems” with Cucumber #4
Regular expressions.
(.+)
cucumbers?
an?
(d+)
(?:I'm
logged|I
log)
See
h%p://www.agileforall.com/2010/07/
just-‐enough-‐regular-‐expressions-‐for-‐cucumber/
12. “Problems” with Cucumber #5
My stakeholders won’t write feature files.
Doesn’t it defeat the purpose
of Gherkin and separate
feature files if I still have to
write it all anyway?