SlideShare a Scribd company logo
Introduction to BDD with
Cucumber
Nibu baby
Introduction to Bdd and cucumber
BDD?
Behavior Driven Development
An Evolution
TDD ATDD BDD
Introduction to Bdd and cucumber
BDD
• Uses examples to illustrate behavior
• Core is around conversations and requirements discovery
• Uses conversations around examples, expressed In a form that can be
easily automated, to reduce lost information and misunderstandings
• Starting with the business outcome, and working through high level
functional areas to drill into specific stories with acceptance criteria.
• When writing examples, regression tests are a by-product
Examples
Given a context
When an event happens
Then an outcome should occur
Introduction to Bdd and cucumber
Vision
Goal
Capability
Feature
Story
Scenario
Code
Have enough conversation to get started.
Find out where the riskiest bits are and
where the system behaves unusually .
Chat, Discuss, Discover, Work out how and
when , you are going to get feedback on the
work you are about to do . Then and only
then , reach for tools
[ Liz Keogh]
Story
• What are we really trying to build ?
• It has to be a description of a requirement and its business benefit, and a
set of criteria by which we all agree that it is “done” [Dann North]
• Written in business language
• Stories are the result of conversations between the project stakeholders,
business analysts, testers and developers
Example
As a user
I want to publish a tweet
So that share information with my followers
Scenario
• Is set of conditions that story must meet for it to be accepted as complete
• Can be used to help discover the scope of the story or the feature
• Is not replacement for conversation
• Is the outcome of conversations with all players
• Scenario title should say what’s different
• The scenario should be described in terms of Givens, Events and Outcomes
Given [some context]
When [I do something]
Then [this happens]
BDD tools
Few of them ….
Introduction to Bdd and cucumber
Cucumber
• Collaboration tool
• It’s Testing tool
• Outside-In approach , where programmers incrementally write code and run the
scenarios using Cucumber until the feature passes all the tests
• Supports about 60+ languages
• Helps to execute plain text functional descriptions as automated tests
• Automation can be written in own favorite language ( Ruby, Java, c#.net , JavaScript,
Scala, Groovy, Jython, Python, Perl, Go, C++ etc)
• writing scenarios before code enables programmers to be guided by an unambiguous
specification
Collaboration is essential
Life cycle
Define
steps
Run and
watch it
fail
Write
code
Refactor
Add
Scenarios
Gherkin
Means : “a small variety of cucumber, or a young green cucumber used for
pickling.” [google]
Cucumber executes .feature files, and those files contain executable
specifications written in a language called Gherkin.
Gherkin supports 60+ languages.
Gherkin is designed to be easy to learn by non-programmers, yet
structured enough to allow concise description of examples to illustrate
business rules in most real-world domains. [www. cucumber.io]
Introduction to Bdd and cucumber
Gherkin Keywords
• Feature
• Scenario
• Given, When, Then, And, But
• Background
• Scenario Outline
• Examples
More helpful keywords
• """ (Doc Strings)
• | (Data Tables)
• @ (Tags)
• # (Comments)
Cucumber testing stack
Project
Features
Scenarios
Steps
Steps Definitions
Automation code support
System
Business
Facing
Technology
Facing
Let’s explore
Benefits
• Better communication
• Ubiquitous language ( Same/being present everywhere )
• Better collaboration between stakeholders, BA, QA and Developers
• Formal documentation is not required
• Living Documentation (Single source of truth)
• Quick feedback (If the automated tests are included in the CI)
• Right Focus, Right Product, Product Right
Disadvantages
• It requires high level of business engagement and collaborations
• May not work well in silos
• Poorly written tests can lead to higher test-maintenance costs
References
• http://dannorth.net
• http://lizkeogh.com
• http://behaviour-driven.org
• https://cucumber.io
• BDD in action [John Ferguson]
• The cucumber book [Matt wynne and Aslak Hellesoy]
Thank you
Happy Testing

More Related Content

What's hot (20)

ODP
BDD with Cucumber
Knoldus Inc.
 
PPTX
Cucumber presenation
Oussama BEN WAFI
 
PPTX
Automation test framework with cucumber – BDD
123abcda
 
PDF
Introduction to BDD with Cucumber for Java
Seb Rose
 
PPTX
What Is Cucumber?
QATestLab
 
ODP
Test Automation Framework using Cucumber BDD overview (part 1)
Mindfire Solutions
 
PDF
Cucumber ppt
Qwinix Technologies
 
PDF
Selenium with Cucumber
Knoldus Inc.
 
PPTX
Automated Test Framework with Cucumber
Ramesh Krishnan Ganesan
 
PDF
Bdd Introduction
Skills Matter
 
PPTX
BDD testing with cucumber
Daniel Kummer
 
ODP
Introduction to BDD
Knoldus Inc.
 
PPTX
Behavior driven development (bdd)
Rohit Bisht
 
PDF
An introduction to Behavior-Driven Development (BDD)
Suman Guha
 
PPTX
BDD presentation
temebele
 
PDF
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
PDF
Successfully Implementing BDD in an Agile World
SmartBear
 
PDF
Behavior Driven Development (BDD)
Ajay Danait
 
PPTX
Cucumber Tool
Sohail Ahmed
 
PPTX
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
Jawad Khan
 
BDD with Cucumber
Knoldus Inc.
 
Cucumber presenation
Oussama BEN WAFI
 
Automation test framework with cucumber – BDD
123abcda
 
Introduction to BDD with Cucumber for Java
Seb Rose
 
What Is Cucumber?
QATestLab
 
Test Automation Framework using Cucumber BDD overview (part 1)
Mindfire Solutions
 
Cucumber ppt
Qwinix Technologies
 
Selenium with Cucumber
Knoldus Inc.
 
Automated Test Framework with Cucumber
Ramesh Krishnan Ganesan
 
Bdd Introduction
Skills Matter
 
BDD testing with cucumber
Daniel Kummer
 
Introduction to BDD
Knoldus Inc.
 
Behavior driven development (bdd)
Rohit Bisht
 
An introduction to Behavior-Driven Development (BDD)
Suman Guha
 
BDD presentation
temebele
 
Test and Behaviour Driven Development (TDD/BDD)
Lars Thorup
 
Successfully Implementing BDD in an Agile World
SmartBear
 
Behavior Driven Development (BDD)
Ajay Danait
 
Cucumber Tool
Sohail Ahmed
 
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
Jawad Khan
 

Viewers also liked (20)

PPTX
Test automation with Cucumber-JVM
Alan Parkinson
 
PDF
Behavior Driven Development with Cucumber
Brandon Keepers
 
PPTX
Story Testing Approach for Enterprise Applications using Selenium Framework
Oleksiy Rezchykov
 
PPTX
Next level of Appium
Keshav Kashyap
 
PPTX
Automate you Appium test like a pro!
TestObject - Mobile Testing
 
PPTX
Gerrit is Getting Native with RPM, Deb and Docker
Luca Milanesio
 
PDF
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Alvaro Sanchez-Mariscal
 
PDF
Continuous integration using Jenkins and Sonar
Pascal Larocque
 
PPTX
Sonar qube to impove code quality
Mani Sarkar
 
PDF
Design First API's with RAML and SoapUI
Daniel Feist
 
PPTX
Gerrit Code Review with GitHub plugin
Luca Milanesio
 
PDF
How To Use Selenium Successfully (Java Edition)
Dave Haeffner
 
PPT
Automated Testing With Jasmine, PhantomJS and Jenkins
Work at Play
 
PDF
Tracking and improving software quality with SonarQube
Patroklos Papapetrou (Pat)
 
PDF
Writing Software not Code with Cucumber
Ben Mabey
 
PPTX
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
PDF
How Git and Gerrit make you more productive
Karsten Dambekalns
 
PPTX
Gerrit Code Review
Luca Milanesio
 
PDF
Testing Microservices with a Citrus twist
christophd
 
PDF
Capybara testing
Futureworkz
 
Test automation with Cucumber-JVM
Alan Parkinson
 
Behavior Driven Development with Cucumber
Brandon Keepers
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Oleksiy Rezchykov
 
Next level of Appium
Keshav Kashyap
 
Automate you Appium test like a pro!
TestObject - Mobile Testing
 
Gerrit is Getting Native with RPM, Deb and Docker
Luca Milanesio
 
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Alvaro Sanchez-Mariscal
 
Continuous integration using Jenkins and Sonar
Pascal Larocque
 
Sonar qube to impove code quality
Mani Sarkar
 
Design First API's with RAML and SoapUI
Daniel Feist
 
Gerrit Code Review with GitHub plugin
Luca Milanesio
 
How To Use Selenium Successfully (Java Edition)
Dave Haeffner
 
Automated Testing With Jasmine, PhantomJS and Jenkins
Work at Play
 
Tracking and improving software quality with SonarQube
Patroklos Papapetrou (Pat)
 
Writing Software not Code with Cucumber
Ben Mabey
 
Automation Testing by Selenium Web Driver
Cuelogic Technologies Pvt. Ltd.
 
How Git and Gerrit make you more productive
Karsten Dambekalns
 
Gerrit Code Review
Luca Milanesio
 
Testing Microservices with a Citrus twist
christophd
 
Capybara testing
Futureworkz
 
Ad

Similar to Introduction to Bdd and cucumber (20)

PPTX
Testing with cucumber testing framework
AIMDek Technologies
 
PDF
Behavior Driven Development with Cucumber
Asheesh Mehdiratta
 
PPTX
Xamariners - BDD + Mobile
Xamariners
 
PPTX
Bdd in action
Kien Nguyen
 
PPTX
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Agile Testing Alliance
 
PPTX
Cucumber jvm best practices v3
Ahmed Misbah
 
PPTX
BDD Selenium for Agile Teams - User Stories
Sauce Labs
 
PPTX
Lets cook cucumber !!
vodQA
 
PPTX
BDD 001 behavoir draven delopment ts.pptx
mahmoudabdelaty96
 
PPTX
Behavior Driven Development
Dhawal Joshi
 
PPTX
presentation.pptx
AMINEADIB2
 
PPT
Behavior Driven Development by Example
Nalin Goonawardana
 
PDF
What is Gherkin or Cucumber testing.pdf
Riley Claire
 
PDF
Introducing BDD and TDD with Cucumber
Knoldus Inc.
 
PPTX
Cucumber With Selenium
Vishwanath KC
 
PPTX
Cucumber_Training_ForQA
Meenakshi Singhal
 
PPTX
Testable Agile Requirements with BDD - Jennifer Flora Black
Jennifer Flora Black
 
PDF
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Master Cucumber cheat sheet for testing .pdf
ArunVastrad4
 
KEY
Exploring bdd
johnnonolan
 
Testing with cucumber testing framework
AIMDek Technologies
 
Behavior Driven Development with Cucumber
Asheesh Mehdiratta
 
Xamariners - BDD + Mobile
Xamariners
 
Bdd in action
Kien Nguyen
 
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Agile Testing Alliance
 
Cucumber jvm best practices v3
Ahmed Misbah
 
BDD Selenium for Agile Teams - User Stories
Sauce Labs
 
Lets cook cucumber !!
vodQA
 
BDD 001 behavoir draven delopment ts.pptx
mahmoudabdelaty96
 
Behavior Driven Development
Dhawal Joshi
 
presentation.pptx
AMINEADIB2
 
Behavior Driven Development by Example
Nalin Goonawardana
 
What is Gherkin or Cucumber testing.pdf
Riley Claire
 
Introducing BDD and TDD with Cucumber
Knoldus Inc.
 
Cucumber With Selenium
Vishwanath KC
 
Cucumber_Training_ForQA
Meenakshi Singhal
 
Testable Agile Requirements with BDD - Jennifer Flora Black
Jennifer Flora Black
 
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Master Cucumber cheat sheet for testing .pdf
ArunVastrad4
 
Exploring bdd
johnnonolan
 
Ad

Recently uploaded (20)

PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Dipole Tech Innovations – Global IT Solutions for Business Growth
dipoletechi3
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PDF
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Dipole Tech Innovations – Global IT Solutions for Business Growth
dipoletechi3
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Customise Your Correlation Table in IBM SPSS Statistics.pptx
Version 1 Analytics
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 

Introduction to Bdd and cucumber

  • 1. Introduction to BDD with Cucumber Nibu baby
  • 6. BDD • Uses examples to illustrate behavior • Core is around conversations and requirements discovery • Uses conversations around examples, expressed In a form that can be easily automated, to reduce lost information and misunderstandings • Starting with the business outcome, and working through high level functional areas to drill into specific stories with acceptance criteria. • When writing examples, regression tests are a by-product
  • 7. Examples Given a context When an event happens Then an outcome should occur
  • 10. Have enough conversation to get started. Find out where the riskiest bits are and where the system behaves unusually . Chat, Discuss, Discover, Work out how and when , you are going to get feedback on the work you are about to do . Then and only then , reach for tools [ Liz Keogh]
  • 11. Story • What are we really trying to build ? • It has to be a description of a requirement and its business benefit, and a set of criteria by which we all agree that it is “done” [Dann North] • Written in business language • Stories are the result of conversations between the project stakeholders, business analysts, testers and developers Example As a user I want to publish a tweet So that share information with my followers
  • 12. Scenario • Is set of conditions that story must meet for it to be accepted as complete • Can be used to help discover the scope of the story or the feature • Is not replacement for conversation • Is the outcome of conversations with all players • Scenario title should say what’s different • The scenario should be described in terms of Givens, Events and Outcomes Given [some context] When [I do something] Then [this happens]
  • 13. BDD tools Few of them ….
  • 15. Cucumber • Collaboration tool • It’s Testing tool • Outside-In approach , where programmers incrementally write code and run the scenarios using Cucumber until the feature passes all the tests • Supports about 60+ languages • Helps to execute plain text functional descriptions as automated tests • Automation can be written in own favorite language ( Ruby, Java, c#.net , JavaScript, Scala, Groovy, Jython, Python, Perl, Go, C++ etc) • writing scenarios before code enables programmers to be guided by an unambiguous specification
  • 17. Life cycle Define steps Run and watch it fail Write code Refactor Add Scenarios
  • 18. Gherkin Means : “a small variety of cucumber, or a young green cucumber used for pickling.” [google] Cucumber executes .feature files, and those files contain executable specifications written in a language called Gherkin. Gherkin supports 60+ languages. Gherkin is designed to be easy to learn by non-programmers, yet structured enough to allow concise description of examples to illustrate business rules in most real-world domains. [www. cucumber.io]
  • 20. Gherkin Keywords • Feature • Scenario • Given, When, Then, And, But • Background • Scenario Outline • Examples More helpful keywords • """ (Doc Strings) • | (Data Tables) • @ (Tags) • # (Comments)
  • 21. Cucumber testing stack Project Features Scenarios Steps Steps Definitions Automation code support System Business Facing Technology Facing
  • 23. Benefits • Better communication • Ubiquitous language ( Same/being present everywhere ) • Better collaboration between stakeholders, BA, QA and Developers • Formal documentation is not required • Living Documentation (Single source of truth) • Quick feedback (If the automated tests are included in the CI) • Right Focus, Right Product, Product Right
  • 24. Disadvantages • It requires high level of business engagement and collaborations • May not work well in silos • Poorly written tests can lead to higher test-maintenance costs
  • 25. References • http://dannorth.net • http://lizkeogh.com • http://behaviour-driven.org • https://cucumber.io • BDD in action [John Ferguson] • The cucumber book [Matt wynne and Aslak Hellesoy]