SlideShare a Scribd company logo
Cucumber :
Introduction
May 21, 2017
Aditya Chourasiya
Quality Assurance
Business Analysts
Product Owners
Audience
Objective
Presentation is mostly covering my experience and findings on Cucumber. I will try to
keep it as much on discussion mode as possible, however there is definite time for
discussion after each section for it.
Please go through the prerequisites in next slide before the presentation.
Prerequisites
Read about Gherkin here
Behaviour Driven Development[BDD]
Test Driven Development [TDD]
Acceptance Test Driven Dev[ATDD]
Install Chocolatey
5 mins
Definitions
10 mins
Discussion on Definitions
20 mins
Hands on
25 mins
Hands on Discussion
30 mins
Discussion for next
Presentation - Robot
Framework
Let’s begin!
What is Test Driven Development [TDD]
Useful in short development life cycle
Widely accepted in XP / Agile
More Developer facing
commonly applied structure
(1) setup > (2) execution > (3) validation >(4) cleanup
They are usually in form of integration tests.
Ex. Code for calculator
Function 1 : Addition
Test : 1+1=2
Function 2 : Multiplication
What is Acceptance Test Driven Development
[ATDD]Acceptance tests are a part of an overall testing strategy. They
are the customer tests that demonstrate the business intent of a
system. Component tests are technical acceptance tests
developed by an architect that specify the behavior of large
modules.
What is Behaviour Driven Development [BDD]
It defines application behaviour in plain
meaningful English text using a simple
grammar.
Gherkin
Ruby community has many great tool for testing, one of
early test framework was RSpec. However due to
limitations it was evolved as cucumber.
In real life gherkin is a variety of cucumber but in
current context Gherkin is the language that Cucumber
understands.
Tags: Feature, Scenario, Scenario outline
Steps: Given-When-Then, And , But, Or
Hook: Before, After , Around
Feature: LogIn Action Test
Description: This feature will test a LogIn and LogOut
functionality
Scenario: Unsuccessful Login with InValid Credentials
Given User is on Home Page
When User Navigate to LogIn Page
And User enters UserName and Password
But The user credentials are wrong
Then Message displayed Wrong UserName &
Password
Discussion
on
Definitions
5min
Prerequisites for hands-on
Cmd admin mode and type
choco install ruby
choco install ruby2.devkit
choco install chromedriver
choco install ansicon
Start command prompt with ruby and type
Gem install watir
Gem install rspec
Gem install cucumber
Gem install colorize
References:
http://www.guru99.com/cucumber-installation.html
Files in Cucumber
Remember to create 2 Files –
Features and Step Definition
Features file contain high level description of the
test scenario in simple language
Steps Definition file contains the actual code to
execute the test scenario in the Features file.
Your structure looks like:
--/features test.feature ---/step_definitions test.rb
To run this feature type in command line:
cucumber test.feature -r step_definitions
Example of Features
Feature: search aditya chourasiya on google
Scenario : Visit google.com and search aditya
Given: I am on google.com
When: I type aditya
And: I click search
Then: I should see my linkedin in result page
Example of Step Definition
Step 1:
Given (/^ I am on google.com$/) do
Browser.goto "http://google.com" -To go to google
Browser.click "" -To go to google
end
Demo
Thank You !
-AdiChourasiya

More Related Content

PPTX
TDD
Dotan Patrich
 
PDF
Android Devops : Master Continuous Integration and Delivery
mahmoud ramadan
 
PPTX
Tdd and bdd
MohamedSubhiBouchi
 
PDF
Tdd 왜 배우기 어려운가
Jaehoon Oh
 
PDF
Test Driven Development Powered by LEGO
Agile Montréal
 
PPTX
What Is Cucumber?
QATestLab
 
PPT
Speed up your tests
Devi Sridharan
 
Android Devops : Master Continuous Integration and Delivery
mahmoud ramadan
 
Tdd and bdd
MohamedSubhiBouchi
 
Tdd 왜 배우기 어려운가
Jaehoon Oh
 
Test Driven Development Powered by LEGO
Agile Montréal
 
What Is Cucumber?
QATestLab
 
Speed up your tests
Devi Sridharan
 

What's hot (20)

PPTX
Presentation Test Driven Development
Rashmi Srivastava
 
PPTX
Test driven development(tdd)
Omar Youssef Shiha
 
KEY
TDD refresher
Kerry Buckley
 
PDF
Tdd practices
axykim00
 
PDF
Test driven development vs Behavior driven development
Gallop Solutions
 
PPTX
Scrum
Kevingo Tsai
 
PDF
TDD and Simple Design Workshop - Session 1 - March 2019
Paulo Clavijo
 
PPTX
JavaScript Unit Testing
L&T Technology Services Limited
 
PDF
Tdd red-green-refactor
Francisco Iglesias Gómez
 
PDF
Test driven development - Zombie proof your code
Pascal Larocque
 
PDF
Code quality as a built-in process
Elad Maimon
 
PPTX
Testing JavaScript Applications
Muhammad Samu
 
PPTX
BDD presentation
temebele
 
ODP
Test Automation Framework using Cucumber BDD overview (part 1)
Mindfire Solutions
 
PDF
The WHY behind TDD/BDD and the HOW with RSpec
Ben Mabey
 
PPT
Test drive on driven development process
Muralidharan Deenathayalan
 
PPTX
Test-driven development & Behavior-driven development basics
Oleksii Prohonnyi
 
PDF
TDD and Simple Design Workshop - Session 1 - November 2018
Paulo Clavijo
 
PDF
Test driven development_continuous_integration
haochenglee
 
Presentation Test Driven Development
Rashmi Srivastava
 
Test driven development(tdd)
Omar Youssef Shiha
 
TDD refresher
Kerry Buckley
 
Tdd practices
axykim00
 
Test driven development vs Behavior driven development
Gallop Solutions
 
TDD and Simple Design Workshop - Session 1 - March 2019
Paulo Clavijo
 
JavaScript Unit Testing
L&T Technology Services Limited
 
Tdd red-green-refactor
Francisco Iglesias Gómez
 
Test driven development - Zombie proof your code
Pascal Larocque
 
Code quality as a built-in process
Elad Maimon
 
Testing JavaScript Applications
Muhammad Samu
 
BDD presentation
temebele
 
Test Automation Framework using Cucumber BDD overview (part 1)
Mindfire Solutions
 
The WHY behind TDD/BDD and the HOW with RSpec
Ben Mabey
 
Test drive on driven development process
Muralidharan Deenathayalan
 
Test-driven development & Behavior-driven development basics
Oleksii Prohonnyi
 
TDD and Simple Design Workshop - Session 1 - November 2018
Paulo Clavijo
 
Test driven development_continuous_integration
haochenglee
 
Ad

Similar to Cucumber (20)

PPTX
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
Jawad Khan
 
PPTX
Cucumber With Selenium
Vishwanath KC
 
PPSX
Cucumber & gherkin language
selvanathankapilan
 
PDF
Cucumbers Have Layers - RubyConf 2015
Sam Livingston-Gray
 
PDF
Advanced Test Automation: WDIO with BDD Cucumber
digitaljignect
 
PDF
Cucumbers Have Layers: A Love Story (AATC 2017)
Sam Livingston-Gray
 
ODP
BDD with Cucumber
Knoldus Inc.
 
PDF
Master Cucumber cheat sheet for testing .pdf
ArunVastrad4
 
PPTX
SGIN2013-ScrumStartRek-CucumberRecipes-SonikChopra
India Scrum Enthusiasts Community
 
PPTX
Hands on BDD with cucumber - Agile Goa Sept 2013
Sonik Chopra
 
PPTX
Cucumber_Training_ForQA
Meenakshi Singhal
 
PPTX
Cucumber jvm best practices v3
Ahmed Misbah
 
PDF
WE are Doing it Wrong - Dmitry Sharkov
QA or the Highway
 
PDF
Cucumber - We Are Doing It Wrong
Dmitry Sharkov
 
PPTX
Tutorial on the integration of Selenium with cucumber for experts and fresher’s
Chirag Thumar
 
PPTX
Testing with cucumber testing framework
AIMDek Technologies
 
PDF
cucumber harpal.pdf
VennelaVasupilli
 
PPTX
Cucumber
Bachue Zhou
 
PDF
BDD & Cucumber
Vladimir Arutin
 
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
Jawad Khan
 
Cucumber With Selenium
Vishwanath KC
 
Cucumber & gherkin language
selvanathankapilan
 
Cucumbers Have Layers - RubyConf 2015
Sam Livingston-Gray
 
Advanced Test Automation: WDIO with BDD Cucumber
digitaljignect
 
Cucumbers Have Layers: A Love Story (AATC 2017)
Sam Livingston-Gray
 
BDD with Cucumber
Knoldus Inc.
 
Master Cucumber cheat sheet for testing .pdf
ArunVastrad4
 
SGIN2013-ScrumStartRek-CucumberRecipes-SonikChopra
India Scrum Enthusiasts Community
 
Hands on BDD with cucumber - Agile Goa Sept 2013
Sonik Chopra
 
Cucumber_Training_ForQA
Meenakshi Singhal
 
Cucumber jvm best practices v3
Ahmed Misbah
 
WE are Doing it Wrong - Dmitry Sharkov
QA or the Highway
 
Cucumber - We Are Doing It Wrong
Dmitry Sharkov
 
Tutorial on the integration of Selenium with cucumber for experts and fresher’s
Chirag Thumar
 
Testing with cucumber testing framework
AIMDek Technologies
 
cucumber harpal.pdf
VennelaVasupilli
 
Cucumber
Bachue Zhou
 
BDD & Cucumber
Vladimir Arutin
 
Ad

Recently uploaded (20)

PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 

Cucumber

  • 1. Cucumber : Introduction May 21, 2017 Aditya Chourasiya
  • 3. Objective Presentation is mostly covering my experience and findings on Cucumber. I will try to keep it as much on discussion mode as possible, however there is definite time for discussion after each section for it. Please go through the prerequisites in next slide before the presentation.
  • 4. Prerequisites Read about Gherkin here Behaviour Driven Development[BDD] Test Driven Development [TDD] Acceptance Test Driven Dev[ATDD] Install Chocolatey
  • 5. 5 mins Definitions 10 mins Discussion on Definitions 20 mins Hands on 25 mins Hands on Discussion 30 mins Discussion for next Presentation - Robot Framework
  • 7. What is Test Driven Development [TDD] Useful in short development life cycle Widely accepted in XP / Agile More Developer facing commonly applied structure (1) setup > (2) execution > (3) validation >(4) cleanup They are usually in form of integration tests. Ex. Code for calculator Function 1 : Addition Test : 1+1=2 Function 2 : Multiplication
  • 8. What is Acceptance Test Driven Development [ATDD]Acceptance tests are a part of an overall testing strategy. They are the customer tests that demonstrate the business intent of a system. Component tests are technical acceptance tests developed by an architect that specify the behavior of large modules.
  • 9. What is Behaviour Driven Development [BDD] It defines application behaviour in plain meaningful English text using a simple grammar.
  • 10. Gherkin Ruby community has many great tool for testing, one of early test framework was RSpec. However due to limitations it was evolved as cucumber. In real life gherkin is a variety of cucumber but in current context Gherkin is the language that Cucumber understands. Tags: Feature, Scenario, Scenario outline Steps: Given-When-Then, And , But, Or Hook: Before, After , Around Feature: LogIn Action Test Description: This feature will test a LogIn and LogOut functionality Scenario: Unsuccessful Login with InValid Credentials Given User is on Home Page When User Navigate to LogIn Page And User enters UserName and Password But The user credentials are wrong Then Message displayed Wrong UserName & Password
  • 12. Prerequisites for hands-on Cmd admin mode and type choco install ruby choco install ruby2.devkit choco install chromedriver choco install ansicon Start command prompt with ruby and type Gem install watir Gem install rspec Gem install cucumber Gem install colorize References: http://www.guru99.com/cucumber-installation.html
  • 13. Files in Cucumber Remember to create 2 Files – Features and Step Definition Features file contain high level description of the test scenario in simple language Steps Definition file contains the actual code to execute the test scenario in the Features file. Your structure looks like: --/features test.feature ---/step_definitions test.rb To run this feature type in command line: cucumber test.feature -r step_definitions Example of Features Feature: search aditya chourasiya on google Scenario : Visit google.com and search aditya Given: I am on google.com When: I type aditya And: I click search Then: I should see my linkedin in result page Example of Step Definition Step 1: Given (/^ I am on google.com$/) do Browser.goto "http://google.com" -To go to google Browser.click "" -To go to google end
  • 14. Demo

Editor's Notes

  • #8: Benefits: By focusing on the test cases first, functionality used by clients is clear to team. Used in conjunction with a version control system, when tests fail unexpectedly, reverting the code to the last version that passed all tests However does not perform sufficient functional tests
  • #9: It is a collaborative practice where users, testers, and developers define automated acceptance criteria. ATDD helps to ensure that all project members understand precisely what needs to be done and implemented. Failing tests provide quick feedback that the requirements are not being met. The tests are specified in business domain terms.
  • #10: BDD focuses on the behaviors of your system exhibits than the implementation details of it.
  • #11: .feature files can be considered a method invocation. Before Cucumber can execute a step it must be told, via a step definition, how that step should be performed.