Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cucumber js in visual studio 2013

Is there a project with similar goals as Specflow is to cucumber in Visual Studio, but for cucumberjs?

I'm considering a unit testing / bdd framework for Visual Studio. Cucumberjs seems like the obvious choice as I am using Specflow to test the c#. However cucumberjs requires nodejs to be installed.

Chutzpah runs things like jasmine, qunit etc in Visual Studio. Is there a way to do the same for cucumberjs? Perhaps nodejstools for visualstudio with a mixture of something else?

There is a Feature request: Cucumber-js support for Chutzpah, but it's work in progress.

(Chutzpah was moved to github, so the issue was lost)

A new Chutzpah feature request on github for cucumber-js support

There is an interview with a cucumber core member saying (below) which sounds promising:

"Support for Cucumber.js is being added to popular IDEs like Jetbrains Webstorm 8 and Visual Studio."

like image 780
Alex KeySmith Avatar asked Mar 04 '14 14:03

Alex KeySmith


People also ask

How do I run cucumber feature code in Visual Studio?

Cucumber-Quick is a VSCode extension that helps you to run cucumber scenarios and features directly from VSCode editor. You can simply right-click on any feature file and choose the option from the context menu to run a specific scenario or the whole feature file.

Can we use cucumber with JavaScript?

In the JavaScript world, there is a module called Cucumber. js that allows you to do this. It works by allowing you to define JavaScript code that it can connect to the various steps defined inside of your Gherkin files.


2 Answers

As per David Leitner's reply, I've created a step-by-step guide to setting up cucumberjs in Visual Studio.

http://blogs.endjin.com/2015/10/step-by-step-guide-to-setting-up-cucumberjs-in-visual-studio-2015/

like image 139
Matthew Adams Avatar answered Oct 04 '22 17:10

Matthew Adams


I've done this by using the Visual Studio Task Runner Explorer. (You have to add it if you use VS 2013, with 2015 it's already included.)

This Extension is a task runner for Grunt and Gulp directly within Visual Studio 2013. It is now possible to define a Grunt task, like this one which runs your cucumberjs Features.

like image 27
David Leitner Avatar answered Oct 04 '22 19:10

David Leitner