In order to use SpecFlow+ LivingDoc, you need to sign-up for a free personal SpecFlow account. SpecFlow+ LivingDoc is free of charge and will remain free forever. For more details on how to sign up for a free SpecFlow account and its benefits, visit our blog.
SpecFlow+ LivingDoc is an Azure DevOps extension for SpecFlow that allows you to view your Gherkin feature files directly in Azure DevOps.
What is SpecFlow?
SpecFlow is an open source BDD/ATDD tool that allows .NET development teams to define, manage and execute automated acceptance tests. These tests are defined using the human-readable Gherkin syntax. Because these tests are written in a natural language, they can easily be understood by all stakeholders. SpecFlow provides the glue that binds these human-readable specifications to the application code, allowing tests to be executed automatically. SpecFlow+ is a series of free extensions to SpecFlow that add additional features. SpecFlow+ includes SpecFlow+ Runner, a dedicated test runner for SpecFlow, SpecFlow+ Excel, which allows specifications or example data to be defined in Excel, and of course SpecFlow+ LivingDoc.
What is SpecFlow+ LivingDoc
SpecFlow+ LivingDoc is an Azure DevOps extension that allows you to view the Gherkin files in your solution from within Azure DevOps. The Gherkin files are formatted for readability, including Gherkin syntax highlighting, colour-coding and tables for example data.
Formatting includes the following:
You can also search your living documentation and link feature files to Azure DevOps work items using tags.
Generating Documentation with SpecFlow+ LivingDoc
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 Azure DevOps. 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 Azure DevOps to actually build your application. You can simply add a build definition that acquires the sources and generates the documentation.
For more information on building your documentation, refer to the documentation here.
The number of scenarios in a project can grow very quickly, so finding the right feature file is important. SpecFlow+ LivingDoc allows you to search within the entire documentation, or restrict the search to titles, descriptions, steps and tags.
Feature and scenario titles matching the search term are displayed in blue. Other nodes that contain the search criteria are displayed in black in the feature explorer. Nodes displayed in grey do not contain the search term, but at least on child or parent item contains the search term. All other nodes (i.e. with no hits) are hidden in the tree.
Previewing Scenarios with Data Values
Gherkin scenarios often use tables to store a series of test values that are referenced using placeholders in the Gherkin steps. You can see the placholder (“<project template”>) and a table containing the possible values of the placeholder in the following screenshot:
Use the preview check box in the first column to substitute the placeholders with the values in the corresponding row in the table:
You can use markdown code to embed images in your feature files. These images will then be displayed when viewing the feature file in Azure DevOps.
When embedding images, the path to the image can be specified as a relative or absolute path. You can also embed images stored externally, such as on a website. Paths are relative to the location of the feature file.
Embedding an image in the same directory as the feature file
Embedding an image in a sub-directory
Embedding an image with an absolute reference
Embedding an image relative to the parent directory
Embedding an external image
You can find an overview about our latest releases and new features here in our changelog.