How to write test case steps in feature file?

How to write test case steps in cucumber

Below are some important keywords which are used to write test step in feature file.

Given: -
“Given” talk about precondition.

When: -
“When” talk about action. So whichever action user want to perform can be mentioned in When keyword.

Then: -
Then talk about result of that action. Expected behavior should be mentioned here which is expected after taking action.

And or *: -
“And” keyword talk about condition which will connect two steps.

But: -
But is used for writing negative steps in the scenario.

Step in Feature file

Feature: This is my first feature

Background:
Given Launch the website

@test
Scenario Outline: I want to launch shoping url

Given user logged in to website

When click on home page link

Then user should navigate to home page

But user able to see the large text:
"""
Below are the list of items which can be selected
user can select any value
"""

* the list are given below:
|Laptop|
|Kitchen|
|home_Appliances|

And user click on check box "yes"

Some related topics :-










No comments:

Post a Comment