How to generate single Specflow LivingDoc for all my Test projects
Hi,
We have different test projects under single solution(WPF application). How to generate single Specflow LivingDoc for all these tests projects.
We have assemblies like RegressionTest1.dll, RegressionTest2.dll, RegressionTest3.dll, and other test dlls.
Thank you.
-
You can merge multiple TestExecution.json together: https://docs.specflow.org/projects/specflow-livingdoc/en/latest/Guides/Merging-Multiple-test-results.html
0 -
Thank you.
But below reference link will work for only on single test project(on single test assembly) when we are running tests in parallel.
In my case, we have different test projects under single solution(WPF application) and we need to generate single Specflow LivingDoc for all these tests projects(on multiple test assemblies) .
My assemblies like -
RegressionTests.dll,
IntegrationTests.dll,
FutureTests.dll
SmokeTests.dll
and other test dlls.
Is it any way to generate single Specflow LivingDoc for all these tests projects(multiple test assemblies).
1 -
Ah, multiple projects. I missed that.
Have a look at https://support.specflow.org/hc/en-us/community/posts/7922259558161/comments/7946595265041
I just created an example on how to create on living doc with multiple projects.
0 -
Thank you very much Andreas Willich. Nice example. I should try this approach.
I was tried different ways in Azure DevOps pipeline to generate single Specflow LivingDoc for all Test projects. Finally, got below output.
0 -
Nice. How did you do it?
0 -
Andreas Willich, I missed to reply your comment.
In Azure DevOps pipeline(yml file), created task per project like below -
- task: SpecFlowPlus@0
displayName: Generate SpecFlow+ LivingDocs - IntegrationTests
inputs:
generatorSource: 'TestAssembly'
testAssemblyFilePath: $(System.ArtifactsDirectory)\Tests\IntegrationTests.dll
projectName: 'IntegrationTests'
testExecutionJson: '..\**\*TestExecution_*.json'
workItemPrefix: 'WI'
projectLanguage: 'en'
output: $(System.ArtifactsDirectory)\Tests\LivingDoc_IntegrationTests.html
continueOnError: true
condition: always()
- task: SpecFlowPlus@0
displayName: Generate SpecFlow+ LivingDocs - RegressionTests
inputs:
generatorSource: 'TestAssembly'
testAssemblyFilePath: $(System.ArtifactsDirectory)\Tests\RegressionTests.dll
projectName: 'RegressionTests'
testExecutionJson: '..\**\*TestExecution_*.json'
workItemPrefix: 'WI'
projectLanguage: 'en'
output: $(System.ArtifactsDirectory)\Tests\LivingDoc_RegressionTests.html
continueOnError: true
condition: always()In my project, "TestExecution.json" files are generating with in the same folder. So, I was generated "TestExecution.json" files dynamically otherwise it will replace with latest file.
below sample "specflow.json" file to generate "TestExecution.json" files dynamically.
0
Please sign in to leave a comment.
Comments
6 comments