Endjin - Home

CucumberJS Visual Studio Test Runner

by Matthew Adams

Since my last post, I've built a Visual Studio Extension provides basic support for discovering and running CucumberJS tests with Node.JS, in the Visual Studio Test Environment.

It borrows heavily from the Chutzpah test runner, but is nowhere near as complete!

Getting Started

1) Install node.js and NPM
2) Globally install cucumberjs using npm

Install globally with

npm install -g cucumber

(Full instructions for installing Cucumber can be found here )

3) Create a Visual Studio Project for your specs

4) Add a Features folder in the project

5) Add a file to contain your feature, with the extension .cucumber

This is really important; in order to avoid collisions with SpecFlow, we have to use a different file extension

6) Add your step definitions

Features

  • Automatic discovery of newly added tests
  • Automatic updating of modified tests
  • Test timings

Known Issues

  • It doesn’t support traits
  • Pretty printing isn’t all that pretty
  • It doesn’t support debugging (anyone wants to help out with this, it’d be more than welcome)
  • Discovering the node package install location would be better done by executing the NPM config command rather than building the expected default install location
  • About the author

    Matthew was CTO of a venture-backed technology start-up in the UK & US for 10 years, and is now a Founder of Endjin Ltd, which provides technology strategy, experience and development services to its clients who are seeking to take advantage of Microsoft Azure and the Cloud. You can follow Matthew on twitter.