What is a feature file in Cucumber test and what are its components?

0 votes
What is a feature file in Cucumber test and what are its components?
Aug 26, 2019 in Selenium by Jagan
157 views

1 answer to this question.

0 votes

Hey Jagan, Feature file is a file consisting conditions and parameters which are required for the execution of Cucumber test code. The following are the components contained by the feature file -  

  • Feature: Describes the current test script which has to be executed.
  • Scenario: Shows the steps and expected outcome for a particular test case.
  • Scenario Outline: Same scenario can be executed for multiple sets of data using scenario outline. 
  • Given: Specifies the context of the text to be executed. By using datatables "Given", step can also be parameterized.
  • When: "When" specifies the test action that has to performed
  • Then: The expected outcome of the test can be represented by "Then"
answered Aug 27, 2019 by Anvi
• 14,050 points

Related Questions In Selenium

0 votes
2 answers

What is a headless browser in automation testing and what are it's benefits?

Hi Sanaya, a headless browser is a web browser ...READ MORE

answered Aug 1, 2019 in Selenium by Abha
• 27,910 points
820 views
0 votes
1 answer

What is Xpath and what are the types of it in Selenium Webdriver?

Hi Piyush, XPath is defined as XML path. It is ...READ MORE

answered May 8, 2019 in Selenium by Pratibha
• 3,690 points
723 views
0 votes
1 answer

What is a Selenium framework and what are the benefits of it?

Hi Disha, Selenium framework is a code structure ...READ MORE

answered May 13, 2019 in Selenium by Abha
• 27,910 points
173 views
0 votes
1 answer

What is a Modular Framework and why it is useful in Selenium webdriver?

Hi Junaid, as the name suggests, Modular ...READ MORE

answered May 12, 2019 in Selenium by Abha
• 27,910 points
3,023 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
2,899 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,237 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,890 points
2,368 views
0 votes
1 answer

What is Log4j and what are its advantages??

Hi Benny, Log4j is a brilliant logging API ...READ MORE

answered May 21, 2019 in Selenium by Anvi
• 14,050 points
291 views
0 votes
1 answer