LivingDoc not working after Reqnroll Version 3.0.0 #1008
Replies: 7 comments 15 replies
|
LivingDoc was never supported by Reqnroll? It was a SpecFlow/Tricentis product and the intellectual property (IP) and (closed) source code is at Tricentis. |
Maybe contact owners at https://www.nuget.org/packages/databinding.LivingDoc.ExecutionDataCollector/ |
|
I've moved this to a discussion as there multiple discussion topics in the starting post. |
|
Could you please elaborate on this?
|
|
@Moshex Have you tried the Expressium.LivingDoc plugin? That is closer to the original LivingDoc. See https://docs.reqnroll.net/latest/integrations/available-plugins.html#filter=formatter |
|
Issue has been replied on Expression LivingDoc... |
|
Workaround: Restoring step-level "Show Test Output" in LivingDoc after Reqnroll migration After migrating from SpecFlow to Reqnroll, the livingdoc CLI (v3.9.57) strips step-level Outputs from TestExecution.json when embedding it into the HTML. The React UI checks stepResults.some(s => s.outputs.length > 0) to decide whether to show the "Show Test Output" button — so it never appears. Our workaround has three parts:Part 1: Accumulate & replay outputs at scenario level In [AfterStep], we write error details via IReqnrollOutputHelper.WriteLine() and simultaneously accumulate copies into a ScenarioContext list. Then in [AfterScenario], we replay all accumulated lines. This populates the scenario-level Outputs in TestExecution.json — the only field the livingdoc CLI preserves. Why [AfterScenario] and not [AfterStep]? The replay must run exactly once after all steps complete. [AfterStep] fires after every step — including skipped steps after a failure (where TestError remains non-null) — so replaying there would cause duplicates. Part 2: Post-process the LivingDoc HTML After generating LivingDoc.html, we parse it, find the embedded window.featureData = {…}; JSON, match each scenario to TestExecution.json by a composite key, and move the scenario-level outputs onto the failed step: Part 3: The patching logic — move scenario outputs to the failed step The recursive walker tries step-level outputs first. When those are empty (the common case with Reqnroll), it falls back to injecting the scenario-level outputs onto the last failed step, then clears the scenario-level outputs so LivingDoc doesn't show duplicates: Result: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Reqnroll Version
3.3.2
Which test runner are you using?
NUnit
Test Runner Version Number
4.4.0
.NET Implementation
.NET 8.0
Test Execution Method
Visual Studio Test Explorer
Content of reqnroll.json configuration file
{ "$schema": "https://schemas.reqnroll.net/reqnroll-config-latest.json", "bindingAssemblies": [ ], "livingDocExecutionDataCollector": { "enabled": true, "filepath": "TestExecution.json" } }Issue Description
Issue with iReqnrollOutputHelper.WriteLine and AddAttachment in Reqnroll Version 3.0.0 and Higher
Subject: iReqnrollOutputHelper.WriteLine and AddAttachment Not Working in LivingDoc After Reqnroll Version 3.0.0+
Description of the Issue:
After upgrading to Reqnroll version 3.0.0 or higher, the following methods:
no longer work when generating a LivingDoc. Additionally, the "Show Test Output" button is missing from the LivingDoc generated by Reqnroll.
This issue seems to be caused by the changes introduced in version 3.0.0, where new reporting formats and methods were introduced, as documented here: Reqnroll Formatters Documentation.
Impact:
The LivingDoc format is highly valuable to me due to its simplicity and the way it presents test results.
The new reporting introduced in version 3.0.0, while powerful, does not fit my use case as well as LivingDoc does. Losing the "Show Test Output" button and the ability to use the above methods diminishes the effectiveness of reporting for my workflow.
Request:
Additional Notes:
I am aware of the new reporting features introduced in version 3.0.0 (Reqnroll Formatters Documentation), but I still prefer the LivingDoc format for my reports. The ability to use WriteLine and AddAttachment methods with LivingDoc was a crucial part of my workflow.
Please let me know if there is a way to make these methods work again with LivingDoc, or if you can provide information about who maintains the databinding.LivingDoc.ExecutionDataCollector package so I can escalate the issue to them.
Environment:
Reqnroll Version: 3.0.0 and higher
LivingDoc Version: Latest version
NuGet Package: databinding.LivingDoc.ExecutionDataCollector
Test Framework: SpecFlow / NUnit (if applicable)
Platform: Windows/MacOS/Linux (specify)
Steps to Reproduce
Steps to Reproduce:
Link to Repro Project
No response
All reactions