follow me icons

Wednesday, January 19, 2011

Running cucumber test through RubyMine

I have been running my cucumber test using a command line console. I am so used to running it from the console that I did not bother to figure out how to run the cucumber test through the RubyMine ide. However, I was shown by my colleque on how to set it up:

From RubyMine you would need to do the following:
1. Click on File->Settings
2. Click on Ruby SDK and Gems
3. Click on Attach Gems
4. Locate your Cucumber gems and attach it.
5. Click Ok

Next is to configure your cucumber test environment variables.

1. Click on Run->Edit Configurations
2. Add the environment variables on the Environment Variables field

You can also specify which test you want to run on the "Feature file" field.

After that, all you need to do is to click the Run (Shift + F10) button to run your cucumber test from RubyMine.


  1. "Add the environment variables on the Environment Variables field" and what is the "environment variables"? can you show an example?

  2. Hi Michell,

    For my web automation test project, I have a environment variable to set my test URL.

    My environment variable is setup like the article in this url:

    so based on that article, I would set up my environment variables as

    Environment Variables:
    test_env = google_australia

    This will run my test against:

    However, if your project does not have any environment variables, you don't have to set it up in ruby mine just to run cucumber.