Cucumber.js: Cuke up your JavaScript!

by Julien Biezemans

Short:

Cucumber, originally written in Ruby by Aslak Helles√ły, is a popular Behaviour-Driven Development automation tool. It is used to execute specifications expressed as examples.

The Cucumber ecosystem saw several ports flourish during the last two years. This session is an introduction to Cucumber.js, the official native JavaScript implementation.
Through the development of a simple Node.js web application, I'll demonstrate how to use Cucumber.js and its major features.

Not comfortable with Node.js? Don't be afraid, Cucumber.js can be used on top of any stacks (Ruby/Rails, .NET, PHP, Java, you name it). All the concepts, techniques and syntax you'll learn during this session will be useful to you.

Goal of the session: Knowledge of the existence of Cucumber.js and the basics to get started with it on a real project
Intended audience: Developers and testers (see Personas)
Experience level: Some experience with test automation is a plus but not a requirement.
Session Type: presentation + project development simulation
Topic: Technology and Technique
Duration: 60 min
Max participants: N/A
Laptops required: No


Detailed Description

We're now living the golden age of JavaScript. An increasingly number of people are seeing it as a complete programming language. Therefore, agile development practices are now being adapted and applied to JavaScript code production.

Behaviour-Driven Development is a second-generation agile methodology with a strong focus on communication. In BDD, specifications are expressed through examples in the form of scenarios.

Originally written in Ruby, Cucumber is popular a tool for automating and validating a system against its scenarios.

A year ago, native JavaScript BDD solutions similar to Cucumber were almost inexistant. Yet the need for it was manifest. It didn't take me long before I started hacking on a port of the virtual cucurbitaceae and joined the Cucumber core team.

Cucumber.js is a native JavaScript implementation of Cucumber. It is a strict and robust port that can run on any JavaScript environment. It runs on Node.js as well as within any browsers, making it virtually serviceable against everything producing JavaScript and HTML (Node.js, Ruby on Rails, PHP, .Net, etc.).

This is an introduction to Cucumber.js. After briefly exposing the history and goals of the project, through an example Node.js application, I'll demonstrate how to write features and scenarios, step definitions, hooks, support code, how to invoke Cucumber.js from both Node.js and browser environments.

Not comfortable with Node.js? Don't be afraid, Cucumber.js can be used on top of any stacks (Ruby/Rails, .NET, PHP, Java, you name it). All the concepts, techniques and syntax you'll learn during this session will be useful to you.

Created: 13/07/12 22:49 -- Modified: 18/11/12 17:26
Back to program