Aug 06 2008
Cucumber: Next Generation Ruby BDD tool
During his Executable User Stories with RSpec and BDD session at Agile 2008 today,
Aslak Hellesøy presented Cucumber, a new rewrite of RSpec Story Runner. According to Aslak, Cucumber is easier to use than the previous Story Runner. It also supports internationalisation, executing from the command line or rake, has colour coding and better error reporting.
Internationalisation is an interesting addition to this tool as it allows people outside of English-speaking regions to write acceptance tests in their language.
A very interesting novelty of this tool is supplying additional combinations of inputs and expected outputs for a scenario using a simple table syntax appended to the classic RSpec scenario template, very similar to a classic FIT column fixture. This could make writing and maintaining BDD tests a lot easier as you no longer have to copy and paste the scenario descriptions to use different arguments.
When Cucumber does not recognise a step, it will print out a Ruby snippet that could be used to implement the step in the test feature (the glue between scenarios and domain code), which is an interesting addition that makes feature writing easier for developers.
Download Cucumber from http://github.com/aslakhellesoy/cucumber.
other news from Agile 2008 conference
![]() |
![]() |



Cucumber interests me a lot I have to say. Its interesting how it lets you have the power of FIT style column fixtures along with BDD, I like that a lot.
Some of the examples do seem to make real trade-offs in the readability of the steps (description) to allow the step definitions (fixture) to stay relatively clean, but I haven’t yet used it in anger so its difficult to know how it works in practice.