Timothy Rajan
Timothy Rajan

Reputation: 1957

Specflow Options in context menu is greyed out in Visual studio

I am using Specflow to write test in BDD style format. Unfortunately today morning in my visual studio, I am not able to see the options to create the step files. Even F12 is not working. Those statements which do not have a step file definition will be in Purple previously. But today it is in Black even though there is no step file definition.

Please see attachment enter image description here Could anyone please help me as what I am missing

Thanks

Upvotes: 0

Views: 2620

Answers (5)

Adam Nijiati
Adam Nijiati

Reputation: 1

It is the same thing I experienced before.

The solution was to delete all the files inside bin/Debug folder and restart your visual studio. Hopefully this could help you resolve the issue as it can be extremely annoying.

Upvotes: 0

saurabh
saurabh

Reputation: 1810

I faced the same issue in Visual Studio ultimate 2013 as well and it annoyingly took 3-4 hours to resolve it.

I followed the steps mentioned here - http://www.specflow.org/documentation/Troubleshooting-Visual-Studio-Integration/ and tried to delete the "specflow-stepmap-SpecFlowProject-607539109-73a67da9-ef3b-45fd-9a24-6ee0135b5f5c.cache" file but it still didn't work.

Similar steps are mentioned here as well - http://brantleytec.blogspot.com.au/2014/08/specflow-force-step-definition-rebinding.html

After deleting the cache file, when I reopened Visual Studio and the solution, the cache file never got recreated.

However what worked for me was reloading the project. It worked perfectly fine after that.

So here is what I suggest - Delete the cache files and then reload the project.

Upvotes: 0

Timothy Rajan
Timothy Rajan

Reputation: 1957

I tried all options which are listed above and some not listed. The last option worked - uninstall and reinstall visual studio.

Upvotes: 0

Sam Holder
Sam Holder

Reputation: 32946

sounds to me like you have not got the Specflow visual studio extension installed.

Are you on the same machine? Have you disabled extensions?

Upvotes: 2

VaraPrasad Pakalapati
VaraPrasad Pakalapati

Reputation: 177

I am not sure what exactly you are looking for. If possible please post complete image of the right click options you are getting.

Scenario steps which do not have step defs will be in pink colour. Once step defs are coded colour will change to black colour.

Image link: http://i61.tinypic.com/2whgjdd.png

If you want to create step def for steps, right click on the step and find Generate Step Definitions or Go To Step Definition options at the bottom. Click any of the option to create step defs.

Image link: http://i59.tinypic.com/2cdihqr.png

Note: Unfortunately I am unable to post images here due to lack of reputation. I am adding links to view the images.

Upvotes: 0

Related Questions