SpecFlow Runner Installation

SpecFlow+ Runner and SpecFlow+ Excel are distributed as NuGet package. Both components require SpecFlow to be installed as well. SpecFlow is also available as a NuGet package of its own, but installing one of the SpecFlow+ packages automatically installs the SpecFlow NuGet package as well.

The installation of SpecFlow and SpecFlow+ Runner is described in detail in the Getting Started guide for SpecFlow. The installation of the SpecFlow components is also covered in the SpecFlow documentation.

Details on installing SpecFlow+ Excel can be found here.

Information on installing SpecFlow+ LivingDoc can be found here.

Installation and Setup

Installing SpecFlow consists of two steps:

  1. Install the IDE integration
  2. Set up your Visual Studio project to work with SpecFlow

Installing the IDE Integration Packages

Select Tools | Extensions and Updates from the menu in Visual Studio, switch to the Online search on the left and enter “SpecFlow” in the search field at the top right.
ExtensionsAndUpdatesDialog

Click on the Download button to install the extension.

Setting Up your SpecFlow Project

Once you have installed the Visual Studio integration, you need to set up your solution to use SpecFlow. SpecFlow tests are usually placed in separate projects in your solution. The quickest way to set up a project is add the NuGet package to your project. For a detailed project setup guide, see the Setup SpecFlow Projects page.

To set up your specification project:

  1. Add either a "Unit Testing Project" (Full Framework) or "MSTest Test Project" (.NET Core) to your solution (e.g. "MyProject.Specs").
    Note: Creating a “Unit Test Project” is the recommended procedure, as it reduces the number of steps required to set up your project.
  2. Remove the class file (UnitTestX.cs), as it is not required.
  3. Right-click on your specification project (e.g. “MyProject.Specs”) and select Manage NuGet Packages for Solution.
  4. Install the following packages (use the search field to filter the search results):
    • SpecFlow
    • SpecFlow.Tools.MsBuild.Generation
    • SpecRun.SpecFlow

Microsoft .NET Test SDK 15 is also required. If you have not installed this package already, please install it as well.

Registering SpecFlow+

For details on registering SpecFlow+ Runner, see SpecFlow.Plus.License Commands.