Testing RubyMine with Cucumber
August 18th, 2009 by yoleWe’ve recently tried to do some dogfooding of our updated Cucumber support and to write some RubyMine tests with it. And we actually liked the result so much that we’re now writing most of our new tests with Cucumber, and slowly accumulating a set of step definitions for testing RubyMine code. Since RubyMine is a Java application, we obviously have to run Cucumber under JRuby, and we also use JRuby for writing the step definitions.

We have our Cucumber tests running as part of our continuous integration build on TeamCity. Since we have a Cucumber formatter that outputs results in the format of TeamCity service messages, we can run Cucumber tests in the same build as our main JUnit tests and aggregate the reporting for passed and failed tests.
Of course, the real use of Cucumber gives us a lot of ideas for features which can be implemented to improve our Cucumber support in RubyMine even more — and eventually, you’ll see them in new EAP builds of RubyMine.
Tags: cucumber, development, test, unit testing

August 20th, 2009 at 5:55 am
This looks pretty awesome! Will you also consider including the Cucumber-support in IDEA please? Perhaps also take a look at Aslak’s cuke4duke-integration?
August 20th, 2009 at 8:56 am
We’ve looked at cuke4duke, and considered implementing completion and navigation between .feature files and steps defined in Java. So far it’s not a high-priority feature for us, but if we do implement it, it will be part of the Ruby plugin for IntelliJ IDEA.
August 27th, 2009 at 10:42 am
Awesome! Is that formatter publicly available?
August 27th, 2009 at 11:18 am
The formatter is available as part of the Rake Runner plugin in TeamCity 5.0 EAP builds.