Configuring the Build Step in DevOps¶
To add the build step in Azure DevOps:
1 - Select Pipelines | Pipelines from the menu in Azure DevOps.
2 - Locate the desired pipeline from the list (or add a new one) and select Edit.
3 - The current tasks are displayed under the Tasks tab
4 - Click on the plus icon next to your agent to add a new build step.
5 - Look for “Specflow” in the search bar and add the SpecFlow+ LivingDoc build step to your build:
Once you add the SpecFlow + LivingDoc build step you will be prompted to setup the build configuration:
6 - Enter the path to your feature files in the Feature folder. All feature files in the selected folder and all its sub-folders are included in your living documentation.
7 - 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 by default.
8 - If you want to include test execution results in the report 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.:
Important: In order to correctly display the execution results, you MUST provide the Test Project Root folder and not a subfolder (e.g. not the Features folder) in the Feature folder parameter.
9 - Select the language used by your Gherkin files under Project Language. This is optional because in most cases the language can be auto- detected. You can read more about language options here.
10 - If you have added links to Azure DevOps work items to your feature files using tags, enter the prefix used to identify the work items here.
For example, if you enter “DEVOPS_WI:” as the work item prefix and define the tag “@DEVOPS_WI:1234” in your feature file, the tag will link to work item #1234 when displayed in LivingDoc.
11 - If you are interested in your Unused Step Definitions, enter your Binding Assembly paths (newline delimited). If your Bindings are in the same Test Assembly as your feature files, enter the path to your Test Assembly. Glob patters are supported e.g.:
12 - Make sure the step is enabled under Control Options.
Once you have defined your build, you are ready to by queuing the build.
If you want to include Gherkin files from multiple projects, add a separate build step for each of your projects.