0

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

Timothy Rajan
  • 1,947
  • 8
  • 38
  • 62

5 Answers5

2

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

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

Sam Holder
  • 32,535
  • 13
  • 101
  • 181
  • I agree, it will be this. – AlSki Apr 08 '15 at 20:20
  • I am not sure what specflow plugin you are mentioning here. I have installed Specflow plugin ( as a nuget ) and specrunner also. Else, I believe I will be not able to create feature files..... – Timothy Rajan Apr 08 '15 at 20:25
  • 1
    Specflow has 2 parts, the nuget package and the [visual studio extension](https://visualstudiogallery.msdn.microsoft.com/9915524d-7fb0-43c3-bb3c-a8a14fbd40ee). Make sure you have the extension installed and that it is enabled (Tools->Extensions then check the list) – Sam Holder Apr 09 '15 at 05:43
0

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.

  • I tried all options which are listed above and some not listed. The last option worked - uninstall and reinstall visual studio. – Timothy Rajan Apr 14 '15 at 02:59
0

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

Timothy Rajan
  • 1,947
  • 8
  • 38
  • 62
0

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.

saurabh
  • 1,730
  • 2
  • 15
  • 13
0

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.