Testing RubyMine with Cucumber

August 18th, 2009 by yole

We’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: , , ,

4 Responses to “Testing RubyMine with Cucumber”

  1. Ole Christian Rynning Says:

    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?

  2. yole Says:

    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.

  3. jacob Says:

    Awesome! Is that formatter publicly available?

  4. yole Says:

    The formatter is available as part of the Rake Runner plugin in TeamCity 5.0 EAP builds.

Leave a Reply