Question

Is there any way to programmatically change options for the runtime object which is used for cucumber feature execution?

In Ruby + Cucumber: How to execute cucumber in code? it is described how to run tests from ruby script, but in addition to that I need to change some runtime options like profile, etc.

Looking at the source code a can see that there is a runtime.configure method, but I do not know which option to pass in to change anything.

Any help regarding this issue is much appreciated!

Was it helpful?

Solution

Create a Rake file like the one below and pass your options

require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'

Cucumber::Rake::Task.new :features do |t|
  t.cucumber_opts = "*.feature -f json -o cucumber.json"
end
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top