Writing first SpecFlow test in Visual Studio

You can create new testing project as shown in below image.

New Unit testing project using C#.Net in Visual Studio

New Unit testing project using C#.Net in Visual Studio

After that you will have to add a SpecFlow library reference using NuGet Package Manager. Just right click on references in your project and then click on Manager NuGet Packages.

Managing NuGet Packages in Visual Studio

Managing NuGet Packages in Visual Studio

Below image shows how to add the SpecFlow library reference in your testing project in Visual Studio IDE.

Install SpecFlow dll library in Visual Studio

Install SpecFlow dll library in Visual Studio

Once the SpecFlow dll is added in the project, you can right click on the project directory and create a new feature file as shown in below image.

Adding feature file in Visual Studio

Adding feature file in Visual Studio

Here is the sample feature file.

Sample feature file in SpecFlow

Sample feature file in SpecFlow

You may also like...