SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.23k stars 752 forks source link

Documentation request: #2593

Closed infinitejest69 closed 7 months ago

infinitejest69 commented 2 years ago

Product:

What is missing: How do you access the information about a scenario outline? i am using Extent reporting to output my test results but i can see a way in scenario context or feature context to get the details of a scenario outline. ideally i would like to be able to output the examples table or at least a row and also have some flag to indicate this scenario is a scenario outline.

This might already be possible but the documentation around scenario context is limited but i don't see the fields in the scenario context object

SabotageAndi commented 2 years ago

Are you looking for this? image

from https://docs.specflow.org/projects/specflow/en/latest/Bindings/ScenarioContext.html#scenariocontext-scenarioinfo

infinitejest69 commented 2 years ago

There is nothing in ScenarioContext.ScenarioInfo that identifies the scenario is part of a scenario outline as far as i can tell. i guess i could use tags and identify each scenario outline with a tag to allow me to better add it to a report, also will have to pass the table into some context to be able to print that out?

does ScenarioContext contain any decerning property to identify a scenario as being part of a scenario outline

shack05 commented 2 years ago

As stated in the docs ScenarioContext.ScenarioInfo is a dictionary containing each of the arguments of the scenario example. The dictionary will not contain any items if the scenario does not have any examples.

github-actions[bot] commented 6 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.