All Collections
Test Reports and Automation
Test reports with SpecFlow+ LivingDoc
Test reports with SpecFlow+ LivingDoc
Alan Parkinson avatar
Written by Alan Parkinson
Updated over a week ago

To generate a report using SpecFlow+ LivingDoc the following packages are required in your project.

<PackageReference Include="BoDi" Version="1.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />
<PackageReference Include="SpecRun.SpecFlow" Version="3.9.31" />
<PackageReference Include="SpecFlow.Plus.LivingDocPlugin" Version="3.9.57" />

You'll also need the SpecFlow+ Living Doc command line tool found here.

Ensure you have a Default.srprofile file in the root. This will be generated by SpecFlow when you initiate the project.

Once you have your features/steps defined in your project (see examples here), you can execute the tests to generate the SpecFlow test execution report.

dotnet test

This will output a report to bin/Debug/netcoreapp3.1/TestExecution.json.

The final step is to combine test execution with Living Doc and produce a final report that we can upload to Behave Pro.

~/.dotnet/tools/livingdoc feature-folder ./ --output-type JSON -t bin/Debug/netcoreapp3.1/TestExecution.json

Once completed, you'll see a new JSON file in the root called FeatureData.json, this can be taken to the next step and uploaded to Behave Pro.

Did this answer your question?