Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

5 things cucumber is bad at by Richard Lawrence


Published on

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.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

5 things cucumber is bad at by Richard Lawrence

  1. 1. 5 Things Cucumber Is Bad At (& why that’s a good thing) By Richard Lawrence For CukeUp NYC, Sept 30, 2014
  2. 2. As we get started… Discuss with one or two people near you: What are some common complaints you hear (or say) about Cucumber?
  3. 3. Problems with My Car
  4. 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. 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. 6. 5 “Problems” with Cucumber that can teach us about Cucumber, BDD, and us
  7. 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. 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. 9. “Problems” with Cucumber #3 Step definitions are all global. Why don’t I get namespaces? Won’t this lead to ambiguity?
  10. 10. “Problems” with Cucumber #4 Regular expressions. (?:[a-­‐z0-­‐9!#$%&'*+/=?^_`{|}~-­‐]+(?:.[a-­‐z0-­‐9!#$%&'*+/=? ^_`{|}~-­‐]+)*|"(?:[x01-­‐x08x0bx0cx0e-­‐x1fx21x23-­‐x5bx5d-­‐x7f]| [x01-­‐x09x0bx0cx0e-­‐x7f])*")@(?:(?:[a-­‐z0-­‐9](?:[a-­‐z0-­‐9-­‐]*[a-­‐ z0-­‐9])?.)+[a-­‐z0-­‐9](?:[a-­‐z0-­‐9-­‐]*[a-­‐z0-­‐9])?|[(?:(?:25[0-­‐5]| 2[0-­‐4][0-­‐9]|[01]?[0-­‐9][0-­‐9]?).){3}(?:25[0-­‐5]|2[0-­‐4][0-­‐9]| [01]?[0-­‐9][0-­‐9]?|[a-­‐z0-­‐9-­‐]*[a-­‐z0-­‐9]:(?:[x01-­‐x08x0bx0cx0e-­‐ x1fx21-­‐x5ax53-­‐x7f]|[x01-­‐x09x0bx0cx0e-­‐x7f])+)])
  11. 11. “Problems” with Cucumber #4 Regular expressions. (.+) cucumbers? an? (d+) (?:I'm logged|I log) See h%p:// just-­‐enough-­‐regular-­‐expressions-­‐for-­‐cucumber/
  12. 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?
  13. 13. SO What?
  14. 14. Questions? Contact me… Twitter: @rslawrence Email: Blog: