LivingDoc in AzDo release pipeline

The SpecFlow+LivingDoc Azure DevOps build task is not limited to only the build pipeline as described here. The build task can also be added later in the release pipeline.

Use Case

There are a number of ways to build, test and generate LivingDoc in Azure DevOps. The general configurations remain the same with file path changes depending on your solution.


In the below example, the solution is built, archived and then uploaded in the build pipeline:

Build Pipeline

In the release pipeline, the archived source files are extracted and the tests are executed. The SpecFlow build step is added as the last step after test execution:

Release Pipeline

Configuring the SpecFlow build step in the release pipeline is no different to doing it in the build pipeline.

There are 3 sources to pick from to parse the documentation data:

Feature folder - The folder containing the feature files.

> Note If you pick feature folder as your source and would like to display the execution results, you MUST provide the test project root folder.

Test Assembly - Relative or absolute path to the test assembly. Glob patterns are supported e.g.: MyProject/**/MyProject.dll

Feature Data - Relative or absolute path to the feature data JSON file. Glob patterns are supported e.g.: MyProject/**/FeatureData.json

In this example we used the test-assembly.

If you want to include test execution results in LivingDoc you must specify the Test Execution JSON paths. It has to be an absolute or relative path to the Test Execution JSON files generated by the SpecFlow.Plus.LivingDocPlugin. Glob patterns are supported e.g.: MyProject/**/TestExecution.json

If you have been running your tests in parallel using SpecFlow+Runner or any other Runner, adding a * at the end of the JSON file name will include them all in the generated LivingDoc. This is the case in the example build task shown above.