Testing RubyMine with Cucumber

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.

This entry was posted in Feature and tagged , , . Bookmark the permalink.

8 Responses to Testing RubyMine with Cucumber

  1. 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.

  5. Matt Wynne says:

    Thanks for sharing this guys, there’s nothing like the taste of dogfood eh?

    I’d love to hear more about how you wire your step definition code up to the IDE itself. Are you using a library like WindowLicker?

  6. Oleg Shpynov says:

    Hello Matt,

    We don’t use any GUI testing tools for RubyMine testing, however we have lots of the functional tests which cover most of the business logic. They perform actions like refactorings, typing in editor and so on without GUI.


  7. Haroon says:

    It will be really usefull if we can have cuke4duke integration with IntelliJ, is there any ETA to implement that feature?

  8. Dennis.Ushakov says:

    I’ve filed a feature request http://youtrack.jetbrains.net/issue/RUBY-7247. Feel free to watch the progress and vote for it

Leave a Reply to Ole Christian Rynning Cancel reply

Your email address will not be published. Required fields are marked *