Tag: BDD

In this post we will discuss about working with FindInSet method of Specflow 2.1 (earlier versions don’t have this method).

FindInSet of Specflow v2.1

With Specflow v2.1, we now have a very handy method to verify an Specflow Table against an collection, which comes very handy while working with large set of data collection and verifying the same against an feature file specflow table something like this

In our last post we discussed working with multiple data using DataTable and Custom classes of DataTable, in this post we will discuss working with cucumber hooks and how helpful it is to initialize and teardown different test artifacts

Cucumber hooks

If you are from Specflow background, you might have noticed there are different types of hooks available like

But unfortunately in cucumber for Java we only have two hooks

@After

@Before

Limitation in cucumber for Java

In Specflow, you can call hooks for each and every steps, features, scenario, scenario block or whole test run, but its not possible with cucumber for Java

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.

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

In this post we will discuss about Pickles, an opensource tool for generating documentation for Specflow feature files.

What is Pickles

Pickles is an open source living documentation generator that works on feature files written in the Gherkin language, popularized in tools like Cucumber and SpecFlow.

Pickles can be incorporated into your build process to produce living documentation in a format that is more accessible to your clients. Gherkin language files are written in plain text and stored in your source folder

Pickles supported output formats

Pickles can produce output in different formats:

ØStatic HTML: a set of HTML files with minimal JavaScript

ØDynamic HTML: a JavaScript-rich single page app with integrated search

ØWord: Microsoft Word

ØExcel: Microsoft Excel

ØJSON: a custom JSON format

Installing Pickles via Nuget

The command to install Pickles from Nuget of Visual studio IDE is 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.

In this post we will discuss working with Specflow+Excel plugin of Specflow. We have already discussed a lot about Specflow and their features which you can checkout from here as articles and here as videos

Specflow+Excel

SpecFlow+ Excel is a SpecFlow plugin that allows you to define requirements and example sets in Excel files. These requirements can be used in a same way as normal plain text Gherkin feature files.

There are two ways to use the Excel files to extend your specifications:

Define an entire feature file in Excel using the worksheets as scenarios