I have bindings in an external assembly (As per the specflow docs here)
We need this, as we are making a generic library of Step Definitions that can be used in any of our test suites.
It works, however some specflow functionality does not appear to work.
Namely:
All steps are highlighted purple (Indicating that it cannot be matched with a binding)
If you select a step and hit F12 or right-click and select "Go To Step Definition", it says it cannot find a matching binding.
However, the code runs OK, and if you debug it, you can step from the feature file into the step definition file, so it appears that the problem is only with the Specflow plugin, not with the nuget package?
Does anyone know how to fix this?
I uploaded the test SLN used in the video here.
7
votes
Related post - Specflow error: Force regenerate steps possible?
– RBT
4 Answers
12
votes
You need to clear your SpecFlow .cache file in your Temp folder.
In Windows Explorer, go to %TEMP% and then locate and delete your .cache file. It will have a pattern of "specflow-stepmap-[projectname].cache". Restart Visual Studio and the definitions will be recalculated and a new .cache will be created.
1
votes