Step-by-step guide for LivingDoc Generator¶
The LivingDoc Generator enables you to generate living documentation in HTML format with no external dependencies.
Step 1 - Installation¶
> Note: This plugin is only required if you want to generate living documentation with test results, otherwise you can skip this plugin installation and only install the command line tool below. In this example we will be generating LivingDoc with test results.
2- Next, open a command prompt and run the following command to install the CLI tool, this is a mandatory installation:
dotnet tool install --global SpecFlow.Plus.LivingDoc.CLI
Step 2 - Generate LivingDoc¶
1- Navigate to the output directory of your SpecFlow project. In this example, the solution was set up in the
2- Now you can run the LivingDoc CLI by using the below command to generate the HTML report.
livingdoc test-assembly SpecFlowCalculator.Specs.dll -t TestExecution.json
>Note: We are generating LivingDoc with test results here, hence why we are using the test-assembly command. Removing
-t TestExecution.json part of the command will allow you to generate LivingDoc without test results.Check feature-data and feature-folder for alternative commands. As mentioned in step 1 the JSON file is generated by insatlling the SpecFlow.Plus.LivingDoc Plugin for your SpecFlow project.
Step 3 - Viewing LivingDoc¶
1- The command-line tool will generate an HTML file titled
LivingDoc.html in the same folder as the output directory of the SpecFlow project. You can manually navigate to this folder and open this file in your favorite browser or use the command-line tool to do it:
Here is sample LivingDoc file: