EDIT
Added classes that show:
ScenarioStepContext.StepInfo.Text
and ScenarioStepContext.StepInfo.StepDefinitionType
That should give you what you want.
Original answer This is currently not possible, although I just (yesterday) submitted a migration request that adds this functionality. If you are happy with the creation of specflow itself, then you can clone my repflow fork and switch to the ScenarioStepContext
branch, then open TechTalk.Specflow_VS2013.sln
and build the project yourself.
First you need to specify specflow the new version number for the nuget package. Open the SpecFlow.nuspec
file and edit the version as something larger than the current version (I used 1.9.3.4), then create a solution (you need to install the VS2013 SDK and other VS VS files if you want to create these versions).
Once the solution is built, you will need to install vsix from
\SpecFlow\IdeIntegration\Vs2013Integration\bin\Debug\TechTalk.SpecFlow.Vs2013Integration.vsix
and then add the nuget package from
\SpecFlow\Installer\NuGetPackages\bin\SpecFlow.1.9.3.4.nupkg
.
Once you do this, you can access ScenarioStepContext.StepInfo.Text
and ScenarioStepContext.StepInfo.StepDefinitionType
to be able to mark the items you want with the data for the current step.
We are currently using this, but please raise any issues in PR on the giptub Specflow main page and I will fix them if I can.
source share