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

PDF
BDD & Cucumber
PPTX
Cucumber BDD
PPTX
Test Automation Framework with BDD and Cucumber
PPTX
BDD WITH CUCUMBER AND JAVA
PPSX
Cucumber & gherkin language
PPTX
Bdd – with cucumber and gherkin
PDF
Cucumber ppt
BDD & Cucumber
Cucumber BDD
Test Automation Framework with BDD and Cucumber
BDD WITH CUCUMBER AND JAVA
Cucumber & gherkin language
Bdd – with cucumber and gherkin
Cucumber ppt

What's hot (20)

ODP
BDD with Cucumber
PPTX
What Is Cucumber?
PDF
An introduction to Behavior-Driven Development (BDD)
PPTX
Automation test framework with cucumber – BDD
ODP
Test Automation Framework using Cucumber BDD overview (part 1)
PPTX
Automated Test Framework with Cucumber
PDF
Selenium with Cucumber
PPT
Cucumber presentation
PPTX
Behavior driven development (bdd)
PPTX
BDD testing with cucumber
ODP
Introduction to BDD
PPT
Behavior Driven Development Pros and Cons
PDF
Bdd Introduction
PDF
Test and Behaviour Driven Development (TDD/BDD)
PDF
Introduction to BDD with Cucumber for Java
PPTX
Cucumber presenation
PPTX
Bdd and spec flow
PPTX
BDD with SpecFlow and Selenium
PPTX
Behavior Driven Development Testing (BDD)
PPTX
Cucumber_Training_ForQA
BDD with Cucumber
What Is Cucumber?
An introduction to Behavior-Driven Development (BDD)
Automation test framework with cucumber – BDD
Test Automation Framework using Cucumber BDD overview (part 1)
Automated Test Framework with Cucumber
Selenium with Cucumber
Cucumber presentation
Behavior driven development (bdd)
BDD testing with cucumber
Introduction to BDD
Behavior Driven Development Pros and Cons
Bdd Introduction
Test and Behaviour Driven Development (TDD/BDD)
Introduction to BDD with Cucumber for Java
Cucumber presenation
Bdd and spec flow
BDD with SpecFlow and Selenium
Behavior Driven Development Testing (BDD)
Cucumber_Training_ForQA
Ad

Viewers also liked (20)

PPTX
Test automation with Cucumber-JVM
PDF
Behavior Driven Development with Cucumber
PPTX
Story Testing Approach for Enterprise Applications using Selenium Framework
PPTX
Next level of Appium
PPTX
Automate you Appium test like a pro!
PPTX
Gerrit is Getting Native with RPM, Deb and Docker
PDF
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
PDF
Continuous integration using Jenkins and Sonar
PPTX
Sonar qube to impove code quality
PDF
Design First API's with RAML and SoapUI
PPTX
Gerrit Code Review with GitHub plugin
PDF
How To Use Selenium Successfully (Java Edition)
PPT
Automated Testing With Jasmine, PhantomJS and Jenkins
PDF
Tracking and improving software quality with SonarQube
PDF
Writing Software not Code with Cucumber
PPTX
Automation Testing by Selenium Web Driver
PDF
How Git and Gerrit make you more productive
PPTX
Gerrit Code Review
PDF
Testing Microservices with a Citrus twist
PDF
Capybara testing
Test automation with Cucumber-JVM
Behavior Driven Development with Cucumber
Story Testing Approach for Enterprise Applications using Selenium Framework
Next level of Appium
Automate you Appium test like a pro!
Gerrit is Getting Native with RPM, Deb and Docker
DevQA: make your testers happier with Groovy, Spock and Geb (Greach 2014)
Continuous integration using Jenkins and Sonar
Sonar qube to impove code quality
Design First API's with RAML and SoapUI
Gerrit Code Review with GitHub plugin
How To Use Selenium Successfully (Java Edition)
Automated Testing With Jasmine, PhantomJS and Jenkins
Tracking and improving software quality with SonarQube
Writing Software not Code with Cucumber
Automation Testing by Selenium Web Driver
How Git and Gerrit make you more productive
Gerrit Code Review
Testing Microservices with a Citrus twist
Capybara testing
Ad

Similar to Introduction to Bdd and cucumber (20)

PPTX
Testing with cucumber testing framework
PDF
Behavior Driven Development with Cucumber
PPTX
Xamariners - BDD + Mobile
PPTX
Bdd in action
PPTX
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
PPTX
Cucumber jvm best practices v3
PPTX
BDD Selenium for Agile Teams - User Stories
PPTX
Lets cook cucumber !!
PPTX
BDD 001 behavoir draven delopment ts.pptx
PPTX
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
PPTX
Behavior Driven Development
PPTX
presentation.pptx
PPT
Behavior Driven Development by Example
PDF
What is Gherkin or Cucumber testing.pdf
PDF
Introducing BDD and TDD with Cucumber
PPTX
Cucumber With Selenium
PPTX
Testable Agile Requirements with BDD - Jennifer Flora Black
PDF
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
PDF
Master Cucumber cheat sheet for testing .pdf
KEY
Exploring bdd
Testing with cucumber testing framework
Behavior Driven Development with Cucumber
Xamariners - BDD + Mobile
Bdd in action
Wednesday Webinar on "Strengthening your Agility with BDD - A demo using Cucu...
Cucumber jvm best practices v3
BDD Selenium for Agile Teams - User Stories
Lets cook cucumber !!
BDD 001 behavoir draven delopment ts.pptx
Introduction to Behaviour Driven Development (BDD) and Cucumber with Java
Behavior Driven Development
presentation.pptx
Behavior Driven Development by Example
What is Gherkin or Cucumber testing.pdf
Introducing BDD and TDD with Cucumber
Cucumber With Selenium
Testable Agile Requirements with BDD - Jennifer Flora Black
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
Master Cucumber cheat sheet for testing .pdf
Exploring bdd

Recently uploaded (20)

PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Cost to Outsource Software Development in 2025
PDF
Complete Guide to Website Development in Malaysia for SMEs
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PDF
Autodesk AutoCAD Crack Free Download 2025
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Nekopoi APK 2025 free lastest update
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PPTX
history of c programming in notes for students .pptx
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Download FL Studio Crack Latest version 2025 ?
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
wealthsignaloriginal-com-DS-text-... (1).pdf
How to Choose the Right IT Partner for Your Business in Malaysia
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Why Generative AI is the Future of Content, Code & Creativity?
Cost to Outsource Software Development in 2025
Complete Guide to Website Development in Malaysia for SMEs
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Autodesk AutoCAD Crack Free Download 2025
Odoo Companies in India – Driving Business Transformation.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Nekopoi APK 2025 free lastest update
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
history of c programming in notes for students .pptx
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Download FL Studio Crack Latest version 2025 ?
Operating system designcfffgfgggggggvggggggggg
Product Update: Alluxio AI 3.7 Now with Sub-Millisecond Latency
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Oracle Fusion HCM Cloud Demo for Beginners

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]