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?
Cucumber. js is available as an npm module. It works with both Node. js and browsers.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With