Google Groups

Transitioning from Cuke4Duke to Cucumber-JVM


Aslak Hellesøy Aug 18, 2011 8:01 AM
Posted in group: Cukes
TL;DR: Cuke4Duke is dead. Viva Cucumber-JVM.

When Cucumber (the original ruby implementation) become somewhat
mature a couple of years ago I was thinking: Cucumber can run on JRuby
as well, and with some glue code it should be possible to write Step
Definitions in various JVM languages such as Java, Groovy, Scala,
Clojure etc. So Cuke4Duke was born.

It has worked well for some, less well for others. Since day 1 it has
had several inherent problems:

1) Hard to install. Cuke4Duke is based on JRuby, the Cucumber gem and
the Gherkin gem. Installing these in a Java environment is hard.
2) Slow. Every time you want to run a feature you have to wait for
JRuby to boot.
3) Hard to use. Maven makes it a little easier perhaps, but Maven
comes with its own warts.
4) Unstable. Consider the blocks that build up Cuke4Duke: JVM, JRuby,
RubyGems, Cucumber gem, Gherkin gem, Maven. For the sake of
simplicity, let's assume that each of those exists in 4 versions. That
means some 15.000 different combinations people might have on their
machines. And then there is Windows/Linux/OS X differences on top of
that.
5) Hard to test. Given the number of different permutations this
speaks for itself.
6) Hard to package and release. A hodge podge of Maven and Rake, plus
dealing with all of the dependencies.

The problems have been getting worse lately, and it's time to retire
the project because of its inherent flaws. As of today I will no
longer maintain Cuke4Duke. Instead I'll spend my time working on a
better replacement.

As some of you may know, I have been working on a pure JVM
implementation of Cucumber for a while. It incorporates the good parts
of Cuke4Duke, but not the bad ones (I hope). I think it's good enough
that some people can start playing with it. Here is where it's at:

* Mostly API compatible with Cuke4Duke
* Gherkin features can remain unchanged
* Step Definitions and Hooks will have to change some import statements
* The Java implementation is tested better than the other JVM
languages like Groovy etc, but they are there too.
* Scala has no support yet, will add that later.
* You can run features with JUnit
* A (JUnit-free) CLI is in progress (handy for e.g. Clojure or other
languages that don't use JUnit)
* It will be a lot faster
* Not a single line of Ruby and no JRuby

There are no docs yet, that will come later. I'm looking for people
who have some small to medium sized Cuke4Duke projects who would like
to try switching over. This will expose what the missing features are,
what needs to be documented etc.

Cucumber-JVM is currently not released anywhere, so you'll have to
build it yourself: https://github.com/cucumber/cucumber-jvm

For those who try - don't expect everything to work. I do need your
help testing it out to make it stabilise faster and get the features
it needs. I'll be here answering any questions you might have. I'm
*very* excited about this project! And we need contributors! Show the
Ruby community that the Java/Groovy/Clojure/Scala people can
contribute to open source too!

Cheers,
Aslak