Mobile QA Zone

A Mobile Application Testing Community

What is Gherkin Syntax ?

Views: 15

Reply to This

Replies to This Discussion

Gherkin tests are structured by automation testing services for defining the scenario using simple English language. Below are the steps followed while creating Gherkin:

 

  • The scenarios should be developed using Given, Event and Result. The Gherkin steps are defined using the keywords “Given”, “When” and “Then”.
  • The “Given” should defined pre-requisites and “When” defines the test actions.
  • “Then” declares the verification step and “AND” is used to declare multiple steps between “Given”, “When” and “Then”.
  • “Feature” or “Scenario” tags are implemented with “@” for reusability.
  • Background is executes before every scenario declared in the feature file.

 

Below is the Gherkin Syntax:

 

Background:

Given the following user exists

| First Name | Last Name | Is Admin |CSV file|

| User | U1 | true | CSVfile1 |

And the CSV " CSVfile1" file have valid data

And "User U1" is logged in

And the user is on the "TestingModule" page

 

@TestingModule1
Scenario: Verification of uploaded data on TestingModule page

When the user clicks the "Upload"

And the user selects "Option1" from the "detailed" drop down

And the user clicks "Choose File" and the user select "CSVfile1"

Then the user should see name under the "Name" column

And the user should see emailid under the "Email" column

And the user should see Errors under “Invalid” column

RSS

© 2019   Created by Anurag Khode.   Powered by

Badges  |  Report an Issue  |  Terms of Service

Welcome to Mobile QA Zone, a Next Generation Software Testing Community.Invite your friends to join this community.Write to us to become a featured member.