Feature : Feature defines the logical test functionality you will test in this feature file.
Feature: LogIn Action Test
Or
Feature: LogIn Action Test
Description: This feature will test a LogIn and LogOut functionality
Or
Feature: LogIn Action Test
This feature will test a LogIn and LogOut functionality
Background : Background keyword is used to define steps that are common to all the tests in the feature file.
Scenario: Each Feature will contain a number of tests to test the feature. Each test is called a Scenario and is described using the Scenario: keyword.
Given : Given defines a precondition to the test.
When : When keyword defines the test action that will be executed.
Then : Then keyword defines the Outcome of previous steps.
And : And keyword is used to add conditions to your steps.
But : But keyword is used to add negative type comments.
* : This keyword is very special. This keyword defies the whole purpose of having Given, When, Then and all the other keywords. Basically Cucumber doesn’t care about what Keyword you use to define test steps, all it cares about what code it needs to execute for each step. That code is called a step definition
——————————————————–
Feature: LogIn Action Test
Description: This feature will test a LogIn and LogOut functionality
Scenario: Successful Login with Valid Credentials
* User is on Home Page
* User Navigate to LogIn Page
* User enters UserName and Password
* Message displayed Login Successfully