On our previous post we learn how to setup eclipse and netbeans for Cucumber.
Now here we learn the heart of the cucumber that is known as feature file.
Feature file contains the all business logic or acceptance criteria. But we need to write this using specific language which is know as Gherkins.
Gherkins is basically english like language and it hold some keywords. We need to follow this keywords when we write down the feature file.
Keywords are mentioned below :
Feature : This tag contains the feature description.This tag basically required to describe the functionality of the application in brief. One feature file contains only one Feature tag.
Description : This tag contains the details of the Feature file.
Background : Backgrounds allows you to add some context to all scenarios in a single feature. A Background is like an untitled scenario, containing a number of steps. The difference is when it is run: the background is run before each of your scenarios,
Scenario : This tag specify the scenario name and details to check the feature of the application.
Given : The purpose of Given steps is to put the system in a known state before the user (or external system) starts interacting with the system
When : The purpose of When steps is to describe the key action the user performs.
Then : The purpose of Then steps is to observe outcomes. The observations should be related to the business value/benefit in your feature description. The observations should inspect the output of the system.
And : We can use And steps, allowing our Scenario to read more fluently:
But : We can use And steps, allowing our Scenario to read more fluently:
Scenario Outline : We use this when we need to run the same scenario with different data.
Examples : We supply the data to scenario outline using Example tag.
* : This is actually wild character, it can be used for the alternate of the above mentioned keyword.
We will know the details of each keywords on the later post with example.
Now here we learn the heart of the cucumber that is known as feature file.
Feature file contains the all business logic or acceptance criteria. But we need to write this using specific language which is know as Gherkins.
Gherkins is basically english like language and it hold some keywords. We need to follow this keywords when we write down the feature file.
Keywords are mentioned below :
Feature : This tag contains the feature description.This tag basically required to describe the functionality of the application in brief. One feature file contains only one Feature tag.
Description : This tag contains the details of the Feature file.
Background : Backgrounds allows you to add some context to all scenarios in a single feature. A Background is like an untitled scenario, containing a number of steps. The difference is when it is run: the background is run before each of your scenarios,
Scenario : This tag specify the scenario name and details to check the feature of the application.
Given : The purpose of Given steps is to put the system in a known state before the user (or external system) starts interacting with the system
When : The purpose of When steps is to describe the key action the user performs.
Then : The purpose of Then steps is to observe outcomes. The observations should be related to the business value/benefit in your feature description. The observations should inspect the output of the system.
And : We can use And steps, allowing our Scenario to read more fluently:
But : We can use And steps, allowing our Scenario to read more fluently:
Scenario Outline : We use this when we need to run the same scenario with different data.
Examples : We supply the data to scenario outline using Example tag.
* : This is actually wild character, it can be used for the alternate of the above mentioned keyword.
We will know the details of each keywords on the later post with example.
No comments:
Post a Comment