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!

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top