- SpecFlow Tutorial
- SpecFlow - Home
- SpecFlow - Introduction
- Test Driven Development
- Behaviour Driven Development
- SpecFlow - Visual Studio Installation
- Visual Studio Extension Installation
- SpecFlow - Project Set Up
- Other Project Dependencies
- SpecFlow - Runner Activation
- SpecFlow - HTML Reports
- SpecFlow - Binding Test Steps
- SpecFlow - Creating First Test
- Configure Selenium Webdriver
- SpecFlow - Gherkin
- SpecFlow - Gherkin Keywords
- SpecFlow - Feature File
- SpecFlow - Step Definition File
- SpecFlow - Hooks
- SpecFlow - Background Illustration
- Data Driven Testing with Examples
- Data Driven Testing without Examples
- Table conversion to Data Table
- Table conversion to Dictionary
- Table with CreateInstance
- SpecFlow - Table with CreateSet
- SpecFlow Useful Resources
- SpecFlow - Quick Guide
- SpecFlow - Useful Resources
- SpecFlow - Discussion
SpecFlow - Binding Test Steps
Test Steps in Feature File
To access the steps in the Feature File, go to the SpecFlow project within the Solution Explorer. Then click on the Features folder. The Feature File shall be displayed.
A Feature File is useful for documenting the expected characteristics of an application in a format which is in plain text and can also be used for automation. The keywords Given, Then, When, and so on are used in SpecFlow to describe scenarios in Gherkin language.
Test Step Binding
The above Feature file has been added by default by the SpecFlow project. It also produces test methods that shall run scenarios defined within the feature file. Right-click on any line on the after the Scenario keyword. Then click on the Go To Definition option.
Visual Studio identifies the corresponding step definition to this step. In this example, it opens the class CalculatorStepDefinitions and moves to the GivenTheFirstNumberIs method.