I cannot work out how to run tests in parallel in Rubymine. I'm using the parallel_tests gem, which I can get to work from the terminal but cannot work out how to get it working using Rubymines interface. I want to do this so that I can use Rubymines tools to ease test running and debuging
I've got a super simple example project, with the following step definition:
Then /^I run test (.*) for feature (.*)$/ do |test, feature|
delay = 1 + rand(5)
puts "Running Feature #{feature} Test #{test}. Next output in #{delay} seconds"
sleep delay
end
This is called by two different features, each one identifies which feature is calling it and increments 'test' by 1. The purpose of this is simply to help me see that the code is being executed at the same time. When run from the terminal I get the following output, which is more or less as expected:
Feature: First feature
Feature: Second feature
Scenario: First scenario # features/feature_two.feature:3
Then I run test 1 for feature 2 # features/step_definitions/parallel_test_steps.rb:1
Running Feature 2 Test 1. Next output in 3 seconds
Scenario: First scenario # features/feature_one.feature:3
Then I run test 1 for feature 1 # features/step_definitions/parallel_test_steps.rb:1
Running Feature 1 Test 1. Next output in 5 seconds
Then I run test 2 for feature 2 # features/step_definitions/parallel_test_steps.rb:1
Running Feature 2 Test 2. Next output in 3 seconds
Then I run test 2 for feature 1 # features/step_definitions/parallel_test_steps.rb:1
Running Feature 1 Test 2. Next output in 4 seconds
...
However, I'm having trouble getting this to work in Rubymine. To get the aforementioned result the command used is bundle exec parallel_cucumber features/
, I cannot work out how to set up a run configuration which performs this. I'm aware of the "Run the script in context of the bundle (bundle exec)" option, however this just prepends "bundle exec" before the regular run command, which does not behave as desired.