Cucumber Crash Course

Purposeful Technologist at Arrgyle
Mar. 22, 2012
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
Cucumber Crash Course
1 of 21

More Related Content

Viewers also liked

The Testable WebThe Testable Web
The Testable WebDave Haeffner
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium SuccessfullyDave Haeffner
Agile testing for mere mortalsAgile testing for mere mortals
Agile testing for mere mortalsDave Haeffner
Selenium BasicsSelenium Basics
Selenium BasicsDave Haeffner
Getting Started with SeleniumGetting Started with Selenium
Getting Started with SeleniumDave Haeffner
Selenium Users AnonymousSelenium Users Anonymous
Selenium Users AnonymousDave Haeffner

Similar to Cucumber Crash Course

Behaviour Driven DevelopmentBehaviour Driven Development
Behaviour Driven DevelopmentCarsten Nielsen
Fukuoka Ruby Award 2023 - OpalFukuoka Ruby Award 2023 - Opal
Fukuoka Ruby Award 2023 - OpalAndy Maleh
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014
Advanced EPUB creation for iPad with Adobe InDesign CC - Digital Book World 2014DouglasWaterfall
Multi Lingual Websites In UmbracoMulti Lingual Websites In Umbraco
Multi Lingual Websites In UmbracoPaul Marden
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Ivo Jansch
React Native? A developer's perspectiveReact Native? A developer's perspective
React Native? A developer's perspectiveBorisConforty

Recently uploaded

Data Integrity TrendsData Integrity Trends
Data Integrity TrendsPrecisely
TEKART CON 2023TEKART CON 2023
TEKART CON 2023AdedoyinSamuel1
Inclusivity and AI: opportunity or threatInclusivity and AI: opportunity or threat
Inclusivity and AI: opportunity or threatAlan Dix
Elevate Your Enterprise with FME 23.1Elevate Your Enterprise with FME 23.1
Elevate Your Enterprise with FME 23.1Safe Software
Metadata & Discovery Group Conference 2023 - Day 1 ProgrammeMetadata & Discovery Group Conference 2023 - Day 1 Programme
Metadata & Discovery Group Conference 2023 - Day 1 ProgrammeCILIP MDG
Scaling out with WordPressScaling out with WordPress
Scaling out with WordPressKonstantin Kovshenin

Cucumber Crash Course

Editor's Notes

  1. Thanks for joining meToday we are going to step through a crash course on Cucumber & GherkinWe will:Start with the benefitsProvide a brief primer on the mechanicsProvide an end-to-end exampleAnd cover the different approaches to gherkin feature writingSound good?OK – let’s get started
  2. Why do Acceptance Test Driven Development?Well, [step through pic]It also helps the team work with confidence
  3. #1 – in this case, English#2A common language between the business and the tech teamHelping you understand better what needs to be builtAnd, helps the business better understand what you are building#3 Cucumber is a communication tool more than anything – automation is just a secondary benefit#4 Examples are powerful stuffThey have the power to turn high-level acceptance criteria into specific & actionable acceptance tests (either to be carried out manually, or, with automation)They also engage our brains enabling us to visualize scenarios & figure out edge cases we may otherwise miss#5 This is all buttressed by the idea of describing the behavior of an application you are hoping to verify
  4. So, really, it’s not just about automation, it’s about communication. To bring this point home, here’s a quote from the creator of Cucumber
  5. Okay, let’s change gears and step through the mechanics of CucumberCucumber uses Gherkin which is a universalTo be clear -- Gherkin can be used in other BDD frameworks that use other programming languagesFor our purposes, we’ll be using Cucumber & RubySo, in Cucumber, there is a default folder structure – let’s step through it
  6. Capybara API: https://gist.github.com/428105
  7. Basic example (from end-to-end earlier)
  8. Extend it – there are two additional keywordsBut may be indicative of the need for another scenarioBut your mileage may varyDepends on the readability and if it works for you and the team
  9. The words don’t matter to Cucumber. They should matter to YOU
  10. This seems much more readable – don’t you think?
  11. Helper text – aka User Stories can go here
  12. Freedom to specify data in different ways – e.g. headings down the site, or just specify a listThe pipes’ spacing doesn’t matter to Cucumber