SpecFlow icon indicating copy to clipboard operation
SpecFlow copied to clipboard

Documentation request:

Open infinitejest69 opened this issue 2 years ago • 3 comments

Product:

  • [X] SpecFlow
  • [ ] SpecFlow+ Runner
  • [ ] SpecFlow+ LivingDoc
  • [ ] SpecMap

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

infinitejest69 avatar May 04 '22 07:05 infinitejest69

Are you looking for this? image

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

SabotageAndi avatar May 04 '22 08:05 SabotageAndi

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

infinitejest69 avatar May 06 '22 20:05 infinitejest69

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.

shack05 avatar Jun 01 '22 03:06 shack05

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.

github-actions[bot] avatar Jan 18 '24 00:01 github-actions[bot]