Closed CNIstrate closed 3 days ago
The scenario title does currently append the variant (browser in your case). e.g.
Could you provide more details?
Hi!
TestExecution.json:
Generated .cs file:
Packages:
This is how it looks in living doc.
It says the test ran 3 times, but I cannot see the results for all of them.
I guess if the scenario name can be adapted to include the browser name in ScenarioInfo, it will also show show all runs in LivingDoc.
Hi @criistra, I have publshed a pre-release version to cater for the above. Please could you give it a go and let me know if it solves your problem?
dotnet add package SpecFlow.Contrib.Variants --version 3.9.90-pre.2
Hi @TotalTest, now the browser is added in the ScenarioInfo and it's also displayed in the TestExecution.json file.
The new problem is that LivingDoc does doesn't know how to match the scenario title from the .feature file with the scenario names from the TestExecution.json.
For example, if the scenario title from the .feature file is "Some scenario title" and the scenario title from the TestExecution.json is "Some scenario title: Chrome", livingdoc won't match them to have results, so the .html is generated without test execution results.
Removing the additional ": {browser.name}" from the TestExecution.json file for each scenario will lead back to the old issue in which the results are not displayed separately for each browser.
I can live with it, I will skip using LivingDoc and rely on the .TRX file which displays all results properly in Azure, for each browser.
I do not think there is something else that can be done from your side. I believe it's ok to revert those changes if it doesn't help on your side with something else.
Thank you!
Yeah it seems living doc doesn't take scenario names from the generated code behind files so it won't know about the variants.
I think it's still correct to have these changes in as the scenario info does actually represent the test.
Having multiple browsers will output the given browser number of results in the report .json file. Due to the scenario title not being different between browsers, the report will only contain the first result for the first browser mentioned in tags.
Is there any way to incorporate the browser from the tag, for example, @ Browser:Chrome -> Chrome_{Scenarion_Title), in the scenario title?
Thanks!