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.
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:
- Select Build & Release | Builds from the menu in TFS
- Click on build in the list (or add a new one).
- On the Summary page, click on a recently completed build:
- The build steps are displayed in the left in the next screen:
- Click on Edit build definition to edit the steps.
- Add the SpecFlow+ build step to your build to generate the living documentation.
- Enter the path to youyr 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.
- 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.
- If you want to include Gherkin files from multiple projects, add a separate build step for each of your projects.
To generate the documentation:
- Select Test | SpecFlow+ from the menu.
- Choose the build definition containing the SpecFlow+ build step(s).
- Click on Queue build. The build is added to the queue.
- Once the build has completed, select Test | SpecFlow+ from the menu to access the feature files.