Cucumber, the popular Behaviour-Driven Development tool, brought to your JavaScript stack.
It runs on both Node.js and modern web browsers.
Try it now: http://cucumber.no.de!
Cucumber.js is still a work in progress. Here is its current status.
| Feature | Status |
|---|---|
| Core (scenarios, steps, mappings) | Done |
| Background | Done1 |
| Calling steps from step defs | To do |
| Comments | Done |
| Command-line interface | Done1, 2 |
| Command-line options | To do2 |
| Data tables | Done |
| Doc Strings | Done |
| Failing steps | Done |
| Hooks | To do |
| I18n | To do |
| JSON formatter | To do |
| Pretty formatter | To do2 |
| Scenario outlines and examples | To do |
| Stats collector | To do |
| Step argument transforms | To do |
| Tags | To do |
| Undefined steps | Done |
| Wire protocol | To do |
| World | Done |
- Not certified by Cucumber TCK yet.
- Considered for removal from Cucumber TCK.
| Feature | Status |
|---|---|
| Background | Done1 |
| CoffeeScript support | Done |
| Command-line interface | Done |
- Will be certified by Cucumber TCK.
Cucumber.js was tested on:
- Node.js 0.4, 0.5, 0.6
- Google Chrome
- Firefox
- Safari
A very young example app is now available.
Install the required dependencies:
$ npm link
$ node example/server.js
Then go to localhost:9797.
$ node_modules/.bin/jasmine-node spec
There is a common set of features shared by all cucumber implementations. It's called the Technology Compatibility Kit or TCK. Find more on the Cucumber TCK repository.
The official way of running them is through Cucumber-ruby and Aruba. Ruby and Bundler are required for this to work.
$ git submodule update --init
$ bundle
$ rm -rf doc; ARUBA_REPORT_DIR=doc cucumber features/cucumber-tck -r features
You can then open the generated documentation:
$ open doc/features/cucumber-tck/*.html # might open a lot of files ;)
In addition to that, Cucumber.js is able to run the features for itself too:
$ ./bin/cucumber.js features/cucumber-tck -r features
There are a few other Cucumber.js-dependent features. Execute everything:
$ ./bin/cucumber.js
Alternatively, you can run everything with the help of Rake:
$ git submodule update --init
$ bundle
$ rake
You can display debug messages by setting the DEBUG_LEVEL environment variable. It goes from 1 to 5. 5 will diplay everything, 1 will only print out the critical things.
$ DEBUG_LEVEL=5 ./bin/cucumber.js
It even works with Aruba:
$ rm -rf doc; DEBUG_LEVEL=5 ARUBA_REPORT_DIR=doc cucumber features/cucumber-tck -r features
$ open doc/features/cucumber-tck/*.html # you'll see debug messages in Aruba-generated docs