Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js BDD. Cucumber, gherkin, or cucumis? [closed]

I want to start using BDD for one of my Node.js projects. Looking at the Node.js wiki, I find at least 3 modules: Cucumber, gherkin, and cucumis that all support the gherkin language. Which ones do you recommend?

like image 515
abendigo Avatar asked Mar 20 '12 17:03

abendigo


People also ask

Does Cucumber work with JavaScript?

Cucumber. js is available as an npm module. It works with both Node. js and browsers.

What is Gherkin in JavaScript?

Gherkin is the Domain Specific Language (DSL) that is used for writing Cucumber tests. It allows for test scripts to be written in a human readable format, which can then be shared between all of the stakeholders in the product development. Gherkin files are files that contain tests, written in the Gherkin language.


2 Answers

Cucumber.js is the official port of Cucumber. It is supported by the Cucumber community and aims at being as compatible as possible with its brothers (Cucumber-ruby, Cucumber-jvm). It's strongly tested through the same gherkin feature suite as Cucumber-ruby and Cucumber-jvm.

Cucumber.js is supported in both Node.js and browser environments. It uses the official Gherkin parser, just like Cucumber-ruby.

I'm not really familiar with Cucumis but the only advantage of it over Cucumber.js is that it supports parallel scenario execution. We are considering such a feature on Cucumber.js but it needs some more thinking as it has implications end-users must fully understand.

The gherkin NPM package is not usable as is, it's only supplying the gherkin parser.

The Cucumber.js's README displays a development status table that can help you decide wether it's ready for your needs or not.

If you need support with Cucumber.js, shout in #cucumber on Freenode, ping us on Twitter or write to the Cukes list.

If you're interested, Cucumber.js will be presented during the CukeUp! conference in London on April 4th.

like image 153
jbpros Avatar answered Sep 19 '22 19:09

jbpros


You could also look at Yadda. It's a BDD framework with a Gherkin-like syntax (not 100% compatible) which piggybacks on your existing test runner (e.g. mocha, jasmine, casper, qunit). The reports are therefore formatted in the same way as your unit tests.

like image 31
cressie176 Avatar answered Sep 19 '22 19:09

cressie176