문제

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