Generating Documentation

Generating living documentation from your Gherkin files with SpecFlow+ LivingDoc requires you to add the SpecFlow+ build step to your build process. This build step parses the Gherkin files in your solution and formats them for display in VSTS. A default build step is included when installing the extension. This build step only generates the documentation; it does not execute any tests or build your solution. You will need to add an [[additional step|SpecFlowPlus-and-TFS-VSTS|]] to build your solution and execute your tests.

Note: You do not need to use TFS to actually build your application. You can simply add a build definition that acquires the sources and generates the documentation.


To add the build step:

  1. Select Build & Release | Builds from the menu in TFS
  2. Click on build in the list (or add a new one).
  3. On the Summary page, click on a recently completed build:
    Build Summary
  4. The build steps are displayed in the left in the next screen:
    Build Steps
  5. Click on Edit build definition to edit the steps.
  6. Add the SpecFlow+ build step to your build to generate the living documentation.
  7. Enter the path to your project (.csproj file) or the folder containing your project in the Project file path field in the SpecFlow+ build step and make sure the step is enabled. SpecFlow+ All feature files in the selected folder and all its sub-folders are included in your living documentation. If you have not referenced a .csproj file and you are not using English as the default language of your Gherkin files, select the language used by your Gherkin files under Project Language. (If you have referenced a .csproj file, this information is read from the app.config file.)
  8. You can also enter a Project Name. This name is used by the root node in the tree. If you do not enter a name here, the name of the Visual Studio project is used instead.
  9. If you want to include Gherkin files from multiple projects, add a separate build step for each of your projects.
    SpecFlow Step


To generate the documentation:

  1. Select Test | SpecFlow+ from the menu.
  2. Choose the build definition containing the SpecFlow+ build step(s).
    Build Summary
  3. Click on Queue build. The build is added to the queue.
  4. Once the build has completed, select Test | SpecFlow+ from the menu to access the feature files.