CucumberJVM: 00 - Gherkin Language

Basic Gherkin Feature Model

Feature: User can create an article

Scenario: user logs in
Given user is on HomePage
When user navigates to LoginPage
And user enters UserName and Password
Then message displayed Login Successful

Scenario: user creates a new article
Given user is logged in and on HomePage
When user clicks CreateArticleLink
And user enters ArticleTitle
And user enters ArticleBody
And user neters ArticleTags
And user clicks NewArticleSubmitButton
Then message is displayed Article Created Successfully
And NewArticlePage title is MyNewArticle

Feature Keyword

  • Defines the functionality the test targets
  • Multiple scenarios can be created to cover this functionality
Feature: User can create an article
Feature: User can create an article

This feature will ensure a user can login and the product handles invalid credentials correctly
Feature: User can create an

SpecFlow: C# BDD Framework Runner Example(

SpecFlow+ Getting Started

This section guides you through the process of installing SpecFlow and SpecFlow+ Runner1 and setting up a simple project in Visual Studio. The getting started guide for SpecFlow+ Excel can be found here.

The sample project is intentionally kept very simple and consists of a basic “calculator” that adds two numbers and returns the result. You will define a test scenario to automate the testing of the calculator’s code.

This guide contains the following sections:

UB: Ubuntu 18.04 LTS Desktop VM Setup

VirtualBox Setup

  • Ubuntu 18.04 LTS Desktop
  • ISO: ubuntu-18.04-desktop-amd64.iso
  • OS: Linux_x64
  • Memory: 2G
  • Video: 128M
  • USB:3.0
  • HDD: 10G

Install net-tools

sudo apt install net-tools

Install OpenSSH server

sudo apt install openssh-server

sudo apt install openssh-client

Install firewall config tools

sudo apt install firewalld

gcc install

Required for VBox Guest Additions


CucumberJVM: 05 - More Logic with Examples:, driver.switchTo() and action.moveToElement()

Another feature file with more test data

Feature: Free CRM Create Contacts

Scenario Outline: Free CRM Login Test Scenario

Given user is already on Login Page
When title of login page is Free CRM
Then user enters "<username>" and "<password>"
Then user clicks on login button
Then user is on home page
Then user moves to new contact page
Then user enters contact details "<firstname>" and "<lastname>" and "<position>"
Then close the browser

    | username | password | firstname | lastname | position |
    | naveenk  | test@123 | ucFirst1  | ucLast1  | manager  |
    | naveenk  | test@123 | ucFirst2  | ucLast2  | qa       |

Definitions implementation


Subscribe to