WHAT ARE the layers of cucumber ?
Till now we discussed basic of cucumber.So in order to design a cucumber framework there are main 3 layers.
1) Feature Files
2) Step Definitions
3) Support Library
What is Feature File ?
In every project we will write our scenarios.So in cucumber we will write our scenarios/tests in feature file (sample.feature) using Gherkin keywords.(will discuss more about gherkin in next posts) A feature file will be created using .feature extension to file.
Example:
Let us say an scenario: Navigate to signin page and enter email id.
Let us see how we will write the above in cucumber.
Sample.feature
Feature: Demo on Sign in page
Scenario: Enter email id in sign in page
Given I am on home page
When I click sign in link
And I navigated to sign in page
And I enter my email id
Then I click on continue button
When I click sign in link
And I navigated to sign in page
And I enter my email id
Then I click on continue button
Will write scenarios like above in cucumber.
Step Definitions:
Where we will write our code (code is depended on library what we use like java/ruby/python etc.,.)
We define each and every step by writing code. (will discuss more next posts)
Support Library:
Cucumber framework can design not only using java library and many other like ruby,perl,jruby,scala etc.,.
Please comment below to feedback or ask questions.
No comments:
Post a Comment
Please comment below to feedback or ask questions.