Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b2021b3441

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
bin
example
features
lib
spec
.gitignore
.gitmodules
.npmignore
.travis.yml
Gemfile
Gemfile.lock
Guardfile
History.md
LICENSE
README.md
Rakefile
cucumber.yml
package.json

README.md

Cucumber.js Build Status

Cucumber brought (natively) to your JavaScript stack.

It can run basic fatures inside both Node.js and web browsers.

It still needs a lot of work. Only a few feature elements are supported at the moment.

Prerequesites

  • Node.js 0.4.8 (tested on 0.4.7 too)
  • npm 1.0.6

Works on

  • Node.js 0.4, 0.5, 0.6
  • Google Chrome 13.0.772.0 (dev)
  • Firefox 4.0.1
  • Safari 5.0.5

And probably lots of other browsers.

Setup for using in Node.js and running tests

Install the required dependencies:

$ npm link

Play with it!

$ node example/server.js

Then go to localhost:9797.

Run tests

Specs

$ node_modules/.bin/jasmine-node spec

Features & documentation

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

Rake

Alternatively, you can run everything with the help of Rake:

$ git submodule update --init
$ bundle
$ rake

Debug messages

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
Something went wrong with that request. Please try again.