Site Loader
Auckland, New Zealand
In this post we are going to discuss about cucumber for Java implementation, well, from this post, we are starting an all new series of Cucumber with Selenium video series as well as posts as a discussion.

Introduction

BDD – Behavioral Driven Development is based on Test Driven Development (TDD) and it aims to bridge the gap between Business analyst and developers. BDD not only bridges the gap between business analyst and developers but also between
  • Manual QA with Automation testers (who write BDD)
  • Manual QA with Developers
BDD seems to be like a plan text, but they have their own syntax based on certain tools (which we will discuss next)

BDD Supported tools

There are many tools available to support BDD, some most famous tools are
  • Cucumber
  • Jbehave
  • Nbehave
  • SpecFlow
All the above tools are used in conjunction with many different platforms and languages like JAVA, C#, Ruby, Python, Jruby etc But all the above tools have one language in common, which is Gherkin

Gherkin

  • Gherkin is the format for Cucumber specification.
  • It is a business readable, Domain specific language which will let anybody to understand the software behavior easily (effortlessly), since they are PLAIN TEXT.
  • Gherkin has some spaces and indentation to define structure.
  • Gherkin has very few syntax which make the parser (the tool which uses Gherkin) to behave based on the structure.
  • The syntax of Gherkin is very simple and are pretty readable as plain text

Gherkin Syntax

Here are few syntax of Gherkin
  1. Feature
  2. Background
  3. Scenario
  4. Given
  5. When
  6. Then
  7. And
  8. But
  9. Scenario outline
  10. Examples
  11. Scenario Templates
It looks something like this

Here is the complete video of the above discussion Thanks for reading the post and watching the video!!! Please leave your comments and let me know if there is anything I should update in this post. Thanks, Karthik KK  

Post Author: Karthik kk

Leave a Reply

Your email address will not be published. Required fields are marked *