Living Doc Multiple Project Dlls
Hi,
I have a single dotnet solution file with multiple SpecFlow test projects within it. I'd like to be able to use LivingDoc to create an aggregated view of the results. Is this possible?
I've been able to generate the output I want using the command line like below
livingdoc feature-folder dotnet\test --test-execution-json xxx.json yyy.json --binding-assemblies xxx.dll yyy.dll --

-
Most of the times the folder from where you execute the command and the path to the folder are not 100% correct.
Is the posted command the real one? Because you say that the feature files are in a subfolder, but the TestExecution.jsons and the binding assemblies are in the folder you are currently in.
That doesn't match.
As said in the documentation:
> If you also want to see test results in your living documentation, you MUST provide the Test Project Root folder and not a subfolder.
0 -
Hi Andreas Willich,
You are correct these are not the real paths, I psuedo coded them for easy digestion.
I wasn't sure if it was possible to achieve what I want. To be clear I want a single LivingDoc.html that aggregated multiple spec flow projects. The MUST provide the Test Project Root folder could well be the issue.I can't provide a single test project root folder because there are multiple test projects.
My solution is structured like below. 2 projects marked in Red, they share a common root folder but it is not a project root. The test execution json and binding assemblies sit in the bin\debug folders of the individual projects. I can move the files around to suit living doc but I can't get away from the fact I'll have 2 projects each with their own dll and test execution json.
Is that clearer?
The real command would be closer to
livingdoc feature-folder dotnet\test --test-execution-json dotnet\test\InvRisk.Derivative.Specs\bin\Debug\netcoreapp3.1\InvRisk.Derivative.Specs.json dotnet\test\InvRisk.Derivative.Reporting.Specs\bin\Debug\net6.0\InvRisk.Derivative.Reporting.Specs.json --binding-assemblies dotnet\test\InvRisk.Derivative.Specs\bin\Debug\netcoreapp3.1\InvRisk.Derivative.Specs.dll dotnet\test\InvRisk.Derivative.Reporting.Specs\bin\Debug\net6.0\InvRisk.Derivative.Reporting.Specs.dll
0 -
I created an example for your case and how you can merge it into one living documetation.
It is here: https://github.com/SpecFlowOSS/SpecFlow-Examples/tree/master/LivingDoc/MergeMultipleProjects
The important part is the PowerShell script: https://github.com/SpecFlowOSS/SpecFlow-Examples/blob/master/LivingDoc/MergeMultipleProjects/RunAndMerge.ps1
What it does is to adjust the TestExecution.jsons that the paths match so you can run the `livingdoc feature-folder` command from the root of the folder structure.
0
Please sign in to leave a comment.
Comments
3 comments