I am trying to learn specflow and right now. Currently I have 2 feature files.
In the second feature file, I am reusing a step from the first feature file.
Specflow automatically recognizes the step from the first feature file and when specflow generated the steps for my second feature, it was smart and did not regenerated the step I am reusing.
But this step is a Given step and it initializes a member field of the feature class.
Without using scenario context, how can I reuse a step from another feature file that initialize a member of the class ?
Edit
For example, if you have a Given I am logged in that is used in several feature file. This "Given" creates a user object which is logged and store it as a member in .cs feature file.
When you use the same Given in another .feature, Specflow does not regenerate it in the correspond .cs file. When you debug the a scenario which is using it, it executes it from the first .cs file.
But I can't access the member of the first .cs feature file. I am planning to use a static member but perhaps there is another solution ?
Thanks a lot.