What are Features and Step Definitions in Cucumber?

Features: File with “.feature” extension are called features file. A Feature file will contain one feature with one or more Scenarios. A line started with Keyword “Feature” in Feature file is the test feature that cucumber going to execute. Each Scenario in Feature contains number of steps written using Gherkin language.
Step Definitions: Each step in a Scenario mapped to Step definition. When Cucumber executes a Step Scenario it looks for a matching Step Definition to execute. Each step definition is a piece of code defined for certain task. Each step definition is attached with a reference pattern, which is used for map between steps in scenario and step definitions.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s