Using the CLI tool

There are three ways to execute and configure LivingDoc commands depending on where you have stored your feature file data:

Commands

  • Feature-folder : Generates living documentation from feature files from the file system.
  • Test-assembly : Generates living documentation from a compiled SpecFlow test assembly.
  • Feature-data : Generates living documentation from pre-parsed features stored in a feature data JSON file.

Synopsis

  livingdoc -h|--help
  livingdoc --version

  livingdoc <COMMAND> [-h|--help] [command-options] [arguments]

Generating with test results

Note : You must have the LivingDoc Plugin Setup to generate LivingDoc with test results.

Here are the list of commands to use to quickly generate LivingDoc with test results from different sources which you have stored your feature file data:

Generate the Living Documentation from SpecFlow test assembly:

livingdoc test-assembly C:\Work\MyProject.Specs\bin\Debug\netcoreapp3.1\MyProject.Specs.dll -t C:\Work\MyProject.Specs\bin\debug\netcoreapp3.1\TestExecution.json

Generate the Living Documentation from feature files:

livingdoc feature-folder C:\Work\MyProject.Specs -t C:\Work\MyProject.Specs\bin\debug\netcoreapp3.1\TestExecution.json

Generating without test results

Here are the list of commands to use to quickly generate LivingDoc without test results from different sources which you have stored your feature file data:

Generate the Living Documentation from SpecFlow test assembly:

livingdoc test-assembly C:\Work\MyProject.Specs\bin\Debug\netcoreapp3.1\MyProject.Specs.dll

Generate the Living Documentation from feature files:

livingdoc feature-folder C:\Work\MyProject.Specs

Simple Options

There are a number of options with SpecFlow+LivingDoc command-line tool depending on where you have stored your feature file data. Please check the relevant page for each method for more information.

Here are a few simple and handy ones:

Generate the Living Documentation with a custom title/header:

livingdoc feature-folder C:\Work\MyProject.Specs --title "BookShop"

Generate the Living Documentation for a specific output path:

livingdoc feature-folder C:\Work\MyProject.Specs --output C:\Temp\MyReport.html
NOTE: If the directory given in the “–output” path does not already exist, LivingDoc CLI will automatically create the output directories in the given output path.

Generate the Living Documentation with work item prefix and work item URL template:

livingdoc feature-folder C:\Work\MyProject.Specs --work-item-prefix WI --work-item-url-template https://dev.azure.com/specflow/BookShop/_backlogs/backlog/BookShop%20Team/Stories/?workitem={id}