SlideShare a Scribd company logo
1 of 15
BDD with Cucumber
By :-
Gaurav Shukla
Test Engineer
Knoldus Software LLP
By :-
Gaurav Shukla
Test Engineer
Knoldus Software LLP
Agenda
● Behavior Driven Development
● 3 Amigos
● What is cucumber
● Feature file
● What is gherkins
● Cucumber installation
● Framework Integration
● Cucumber reports
What is Behavior-Driven Development
● Behavior Driven development is the process of exploring, discovering,
defining and driving the desired behavior of software system by using
conversation, concrete examples and automated tests.
– Using conversation and concrete examples to explore, discover and illustrate a
shared understanding of the problem we need to solve for the stakeholders Then
we refine those examples in automated tests, to describe the desired behavior of
our solution to drive the development of the system.
3 Amigos
What is Cucumber
● Cucumber is a most widely open source tool for executable
specifications.
● A single source of truth, merges specification and test
documentation into one cohesive whole.
● Living documentation, All the specifications always up to date
with cucumber automated acceptance tests.
● Product owner and IT don't always understand each other, so
cucumber automated specification help to keep business
value in mind all the time and encourage teams for closer
collaboration with shared understanding of the system.
● Cucumber automated tests protect the teams from costly
regressions.
● Cucumber is a way of taking features, which is the combination
of scenarios written in plain English language using a simple
grammar defined by a language called gherkins.
● Cucumber itself written in Ruby but supports other languages as
well like java, scala, C# and many more.
● This feature is share with all the amigos involve in development,
developers, tester, business analyst, product owner.
● Glue code : glue code works as a bridge between ubiquitous
language into your application that you want to develop, it
translate English in your code.
– The feature is made up with scenarios and steps, and each steps
essentially map to the step definition.
– These step could be written in your language of your choice.
Feature file
● What is Gherkins
– Gherkins is the language that cucumber understands, it is a bussiness
Readable, domain specific language that lets you describe software
behavior with out detailing its implementation.
– Gherkins serves two purposes- Documentation and automated testes.
– Gherkin’s grammar is defined in the Treetop grammar that is part of the
Cucumber codebase.
– It exist in different flavors for many spoken language. (60+)
– Single Gherkin source file contains a description of a single feature.
– Source files have .feature extension.
● Gherkins source File format
Cucumber Installation
● Add following library dependencies in build.sbt,
"org.scalatest" %% "scalatest" % "3.0.0",
"info.cukes" % "cucumber-core" % "1.2.4",
"info.cukes" % "cucumber-junit" % "1.2.4",
"info.cukes" %% "cucumber-scala" % "1.2.4",
"info.cukes" % "cucumber-jvm" % "1.2.4",
● Enable cucumber plugin by adding in plugins.sbt
addSbtPlugin("com.waioeka.sbt" % "cucumber-plugin" % "0.1.0")
Framework Integration
● Cucumber works with various frameworks available in the
market.
– Selenium (Web browser automation)
– Ruby On Rails (Web application framework)
– Spring (Application framework for java platform )
– Watir (Web application testing in Ruby)
– Serenity (An open source library for automated acceptance tests.)
● Cucumber Reports
– Cucumber can report results in several different formats, using
formatter plugins. The available formatters plugins are:
● Pretty : prints the gerkin source with additional colours and stack traces for
errors
● HTML: Generates a HTML file, suitable for publishing.
● JSON : Generates a JSON file, suitable for post-processing to generate
custom reports.
● Junit : Generates XML files just like Apache Ant’s junitreport task. This XML
format is understood by most Continuous Integration servers, who will use
it to generate visual reports.
Reference
● https://github.com/cucumber/cucumber/wiki/Gherkin
● https://cucumber.io/
● http://toolsqa.com/cucumber/cucumber-options/
● https://www.youtube.com/watch?v=MCaXumfckmQ&t=1791s
Thank You

More Related Content

What's hot

What's hot (20)

BDD & Cucumber
BDD & CucumberBDD & Cucumber
BDD & Cucumber
 
Automation test framework with cucumber – BDD
Automation test framework with cucumber – BDDAutomation test framework with cucumber – BDD
Automation test framework with cucumber – BDD
 
Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)Test Automation Framework using Cucumber BDD overview (part 1)
Test Automation Framework using Cucumber BDD overview (part 1)
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkin
 
Gherkin /BDD intro
Gherkin /BDD introGherkin /BDD intro
Gherkin /BDD intro
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?
 
Automated Test Framework with Cucumber
Automated Test Framework with CucumberAutomated Test Framework with Cucumber
Automated Test Framework with Cucumber
 
Cucumber presentation
Cucumber presentationCucumber presentation
Cucumber presentation
 
API Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberAPI Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+Cucumber
 
Introduction to BDD
Introduction to BDDIntroduction to BDD
Introduction to BDD
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Bdd Introduction
Bdd IntroductionBdd Introduction
Bdd Introduction
 
An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)An introduction to Behavior-Driven Development (BDD)
An introduction to Behavior-Driven Development (BDD)
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in Angular
 
An Introduction To Jenkins
An Introduction To JenkinsAn Introduction To Jenkins
An Introduction To Jenkins
 
Automation Testing using Selenium
Automation Testing using SeleniumAutomation Testing using Selenium
Automation Testing using Selenium
 
Automation - web testing with selenium
Automation - web testing with seleniumAutomation - web testing with selenium
Automation - web testing with selenium
 

Viewers also liked

Building Streaming And Fast Data Applications With Spark, Mesos, Akka, Cassan...
Building Streaming And Fast Data Applications With Spark, Mesos, Akka, Cassan...Building Streaming And Fast Data Applications With Spark, Mesos, Akka, Cassan...
Building Streaming And Fast Data Applications With Spark, Mesos, Akka, Cassan...
Lightbend
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
Brandon Keepers
 

Viewers also liked (20)

Walk-through: Amazon ECS
Walk-through: Amazon ECSWalk-through: Amazon ECS
Walk-through: Amazon ECS
 
Introduction to AWS IAM
Introduction to AWS IAMIntroduction to AWS IAM
Introduction to AWS IAM
 
Event sourcing with Eventuate
Event sourcing with EventuateEvent sourcing with Eventuate
Event sourcing with Eventuate
 
Introduction to Quasiquotes
Introduction to QuasiquotesIntroduction to Quasiquotes
Introduction to Quasiquotes
 
Introduction to Structured Streaming
Introduction to Structured StreamingIntroduction to Structured Streaming
Introduction to Structured Streaming
 
Akka Finite State Machine
Akka Finite State MachineAkka Finite State Machine
Akka Finite State Machine
 
Shapeless- Generic programming for Scala
Shapeless- Generic programming for ScalaShapeless- Generic programming for Scala
Shapeless- Generic programming for Scala
 
Internals
InternalsInternals
Internals
 
Building Streaming And Fast Data Applications With Spark, Mesos, Akka, Cassan...
Building Streaming And Fast Data Applications With Spark, Mesos, Akka, Cassan...Building Streaming And Fast Data Applications With Spark, Mesos, Akka, Cassan...
Building Streaming And Fast Data Applications With Spark, Mesos, Akka, Cassan...
 
Introduction to Scala Macros
Introduction to Scala MacrosIntroduction to Scala Macros
Introduction to Scala Macros
 
Introduction to ScalaZ
Introduction to ScalaZIntroduction to ScalaZ
Introduction to ScalaZ
 
Effective way to code in Scala
Effective way to code in ScalaEffective way to code in Scala
Effective way to code in Scala
 
Cassandra - Tips And Techniques
Cassandra - Tips And TechniquesCassandra - Tips And Techniques
Cassandra - Tips And Techniques
 
Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2Introduction to Apache Kafka- Part 2
Introduction to Apache Kafka- Part 2
 
Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1Introduction to Apache Kafka- Part 1
Introduction to Apache Kafka- Part 1
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Cucumber And Bdd
Cucumber And BddCucumber And Bdd
Cucumber And Bdd
 
BDD in Symfony2
BDD in Symfony2BDD in Symfony2
BDD in Symfony2
 
Http programming in play
Http programming in playHttp programming in play
Http programming in play
 
Functions In Scala
Functions In Scala Functions In Scala
Functions In Scala
 

Similar to BDD with Cucumber

Introduction To Development And Operations
Introduction To Development And OperationsIntroduction To Development And Operations
Introduction To Development And Operations
teekhesawaal
 

Similar to BDD with Cucumber (20)

Code, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers wayCode, ci, infrastructure - the gophers way
Code, ci, infrastructure - the gophers way
 
5 Best Automation Testing Tools to Speed up Testing.pdf
5 Best Automation Testing Tools to Speed up Testing.pdf5 Best Automation Testing Tools to Speed up Testing.pdf
5 Best Automation Testing Tools to Speed up Testing.pdf
 
Devops
DevopsDevops
Devops
 
Jenkins.pdf
Jenkins.pdfJenkins.pdf
Jenkins.pdf
 
Go programming language
Go programming languageGo programming language
Go programming language
 
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-54&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
4&5.pptx SOFTWARE TESTING UNIT-4 AND UNIT-5
 
Continuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applicationsContinuous integration and delivery for java based web applications
Continuous integration and delivery for java based web applications
 
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
 
"Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa..."Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa...
 
Introduction to go lang
Introduction to go langIntroduction to go lang
Introduction to go lang
 
The Ring programming language version 1.6 book - Part 6 of 189
The Ring programming language version 1.6 book - Part 6 of 189The Ring programming language version 1.6 book - Part 6 of 189
The Ring programming language version 1.6 book - Part 6 of 189
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality Tools
 
Calabash Mobile App Automated Testing Framework
Calabash Mobile App Automated Testing FrameworkCalabash Mobile App Automated Testing Framework
Calabash Mobile App Automated Testing Framework
 
Calabash Mobile Application Testing Overview
Calabash Mobile Application Testing OverviewCalabash Mobile Application Testing Overview
Calabash Mobile Application Testing Overview
 
Top 10 Best DevOps tools in 2020
Top 10 Best DevOps tools in 2020Top 10 Best DevOps tools in 2020
Top 10 Best DevOps tools in 2020
 
Behavior driven development
Behavior driven developmentBehavior driven development
Behavior driven development
 
#ATAGTR2020 Presentation - Universal Test Automation Framework
#ATAGTR2020 Presentation - Universal Test Automation Framework#ATAGTR2020 Presentation - Universal Test Automation Framework
#ATAGTR2020 Presentation - Universal Test Automation Framework
 
Cucumber in Practice(en)
Cucumber in Practice(en)Cucumber in Practice(en)
Cucumber in Practice(en)
 
KrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdfKrishnaToolComparisionPPT.pdf
KrishnaToolComparisionPPT.pdf
 
Introduction To Development And Operations
Introduction To Development And OperationsIntroduction To Development And Operations
Introduction To Development And Operations
 

More from Knoldus Inc.

More from Knoldus Inc. (20)

Supply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptxSupply chain security with Kubeclarity.pptx
Supply chain security with Kubeclarity.pptx
 
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML ParsingMastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
Mastering Web Scraping with JSoup Unlocking the Secrets of HTML Parsing
 
Akka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On IntroductionAkka gRPC Essentials A Hands-On Introduction
Akka gRPC Essentials A Hands-On Introduction
 
Entity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptxEntity Core with Core Microservices.pptx
Entity Core with Core Microservices.pptx
 
Introduction to Redis and its features.pptx
Introduction to Redis and its features.pptxIntroduction to Redis and its features.pptx
Introduction to Redis and its features.pptx
 
GraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdfGraphQL with .NET Core Microservices.pdf
GraphQL with .NET Core Microservices.pdf
 
NuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptxNuGet Packages Presentation (DoT NeT).pptx
NuGet Packages Presentation (DoT NeT).pptx
 
Data Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable TestingData Quality in Test Automation Navigating the Path to Reliable Testing
Data Quality in Test Automation Navigating the Path to Reliable Testing
 
K8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose KubernetesK8sGPTThe AI​ way to diagnose Kubernetes
K8sGPTThe AI​ way to diagnose Kubernetes
 
Introduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptxIntroduction to Circle Ci Presentation.pptx
Introduction to Circle Ci Presentation.pptx
 
Robusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptxRobusta -Tool Presentation (DevOps).pptx
Robusta -Tool Presentation (DevOps).pptx
 
Optimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptxOptimizing Kubernetes using GOLDILOCKS.pptx
Optimizing Kubernetes using GOLDILOCKS.pptx
 
Azure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptxAzure Function App Exception Handling.pptx
Azure Function App Exception Handling.pptx
 
CQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptxCQRS Design Pattern Presentation (Java).pptx
CQRS Design Pattern Presentation (Java).pptx
 
ETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake PresentationETL Observability: Azure to Snowflake Presentation
ETL Observability: Azure to Snowflake Presentation
 
Scripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics PresentationScripting with K6 - Beyond the Basics Presentation
Scripting with K6 - Beyond the Basics Presentation
 
Getting started with dotnet core Web APIs
Getting started with dotnet core Web APIsGetting started with dotnet core Web APIs
Getting started with dotnet core Web APIs
 
Introduction To Rust part II Presentation
Introduction To Rust part II PresentationIntroduction To Rust part II Presentation
Introduction To Rust part II Presentation
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Configuring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRAConfiguring Workflows & Validators in JIRA
Configuring Workflows & Validators in JIRA
 

Recently uploaded

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Recently uploaded (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 

BDD with Cucumber

  • 1. BDD with Cucumber By :- Gaurav Shukla Test Engineer Knoldus Software LLP By :- Gaurav Shukla Test Engineer Knoldus Software LLP
  • 2. Agenda ● Behavior Driven Development ● 3 Amigos ● What is cucumber ● Feature file ● What is gherkins ● Cucumber installation ● Framework Integration ● Cucumber reports
  • 3. What is Behavior-Driven Development ● Behavior Driven development is the process of exploring, discovering, defining and driving the desired behavior of software system by using conversation, concrete examples and automated tests. – Using conversation and concrete examples to explore, discover and illustrate a shared understanding of the problem we need to solve for the stakeholders Then we refine those examples in automated tests, to describe the desired behavior of our solution to drive the development of the system.
  • 5. What is Cucumber ● Cucumber is a most widely open source tool for executable specifications. ● A single source of truth, merges specification and test documentation into one cohesive whole. ● Living documentation, All the specifications always up to date with cucumber automated acceptance tests. ● Product owner and IT don't always understand each other, so cucumber automated specification help to keep business value in mind all the time and encourage teams for closer collaboration with shared understanding of the system. ● Cucumber automated tests protect the teams from costly regressions.
  • 6. ● Cucumber is a way of taking features, which is the combination of scenarios written in plain English language using a simple grammar defined by a language called gherkins. ● Cucumber itself written in Ruby but supports other languages as well like java, scala, C# and many more. ● This feature is share with all the amigos involve in development, developers, tester, business analyst, product owner.
  • 7. ● Glue code : glue code works as a bridge between ubiquitous language into your application that you want to develop, it translate English in your code. – The feature is made up with scenarios and steps, and each steps essentially map to the step definition. – These step could be written in your language of your choice.
  • 9. ● What is Gherkins – Gherkins is the language that cucumber understands, it is a bussiness Readable, domain specific language that lets you describe software behavior with out detailing its implementation. – Gherkins serves two purposes- Documentation and automated testes. – Gherkin’s grammar is defined in the Treetop grammar that is part of the Cucumber codebase. – It exist in different flavors for many spoken language. (60+) – Single Gherkin source file contains a description of a single feature. – Source files have .feature extension.
  • 10. ● Gherkins source File format
  • 11. Cucumber Installation ● Add following library dependencies in build.sbt, "org.scalatest" %% "scalatest" % "3.0.0", "info.cukes" % "cucumber-core" % "1.2.4", "info.cukes" % "cucumber-junit" % "1.2.4", "info.cukes" %% "cucumber-scala" % "1.2.4", "info.cukes" % "cucumber-jvm" % "1.2.4", ● Enable cucumber plugin by adding in plugins.sbt addSbtPlugin("com.waioeka.sbt" % "cucumber-plugin" % "0.1.0")
  • 12. Framework Integration ● Cucumber works with various frameworks available in the market. – Selenium (Web browser automation) – Ruby On Rails (Web application framework) – Spring (Application framework for java platform ) – Watir (Web application testing in Ruby) – Serenity (An open source library for automated acceptance tests.)
  • 13. ● Cucumber Reports – Cucumber can report results in several different formats, using formatter plugins. The available formatters plugins are: ● Pretty : prints the gerkin source with additional colours and stack traces for errors ● HTML: Generates a HTML file, suitable for publishing. ● JSON : Generates a JSON file, suitable for post-processing to generate custom reports. ● Junit : Generates XML files just like Apache Ant’s junitreport task. This XML format is understood by most Continuous Integration servers, who will use it to generate visual reports.
  • 14. Reference ● https://github.com/cucumber/cucumber/wiki/Gherkin ● https://cucumber.io/ ● http://toolsqa.com/cucumber/cucumber-options/ ● https://www.youtube.com/watch?v=MCaXumfckmQ&t=1791s

Editor's Notes

  1. We all are follow agile practices with different roles.We faced different challenge How do you get the various roles in a Scrum team to have a common understanding about a feature? roduct owners talk in terms of user stories/UAT. Business analysts talk in terms of requirements/acceptance criteria. Developers talk in terms of code/unit tests. QA members talk in terms of scenarios/test cases.
  2. Shared understanding of the ysyte, I dont know how to implement it becaue is havent work on this feature,cucumber test cases are written in plain english language and a developer glue his code with it , so this problem has been easily resolved
  3. Ubiquitous language uses in Domain Driven Design for the practice of building up a common, rigorous language between developers and users.