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.22k stars 752 forks source link

How to read data from Excel in Hooks? #2695

Open astamatov opened 1 year ago

astamatov commented 1 year ago

Link to Feature Request

No response

Implementation Idea

Hi all,

I have an issue with reading data in Hooks. I can read them in the Steps, but how can I do that in Hooks? This matters, because for an example based on a ID parameter in the Excel file, I want to do some cleanup for that specific test. But I cannot access parameters in the Hooks. Is there a way to do this? Thanks in advance!

Best regards, Aleksandar

astamatov commented 1 year ago

It look like it can be done by reading arguments from ScenarioInfo. Sorry for opening this, you can close it.