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.

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 "Unit Testing Project" 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. You can choose to remove the UnitTestX.cs file, as it is not required.
  3. Add SpecFlow+ Runner to your specification project using NuGet:
    1. Right-click on your specification project (e.g. “MyProject.Specs”) and select Manage NuGet Packages for Solution.
    2. Search for “SpecRun” and install SpecRun for SpecFlow. The latest version is installed automatically, although you can choose to install an earlier version if needed.
      Alternatively, you can install the package from NuGet's console (Tools | NuGet Package Manager | Package Manager Console) as follows:
      PM> Install-Package SpecRun.SpecFlow
  4. Installing SpecFlow+ Runner automatically downloads the SpecFlow runtime from NuGet and adds it to your specifications project.

Registering SpecFlow+

For details on registering SpecFlow+ Runner, see Registering SpecFlow+.