我想運行一些使用耙黃瓜測試。當我打電話rake kickoff
(@kickoff是我的特性文件中的標籤)我得到以下錯誤:NoMethodError:未定義的方法初始化爲黃瓜:模塊
rake aborted!
NoMethodError: undefined method `initializer' for Cucumber:Module
/webdata/jenkins/jobs/kickoff_build/workspace/Rakefile:2:in `<top (required)>'
(See full trace by running task with --trace)
我已經運行了捆綁,並安裝所有必要的寶石。
這裏是我的kickoff_build
特徵文件的內容:
@kickoff
Feature: Automated Regression Build
Scenario: As an automation developer, I want to kick off the build
Given the CI server is configured correctly
When the tag in line 1 of this file is called via a rake task
Then this test should run and pass
這裏的內容我Rakefile
:
require 'rubygems'
require 'cucumber'
require 'cucumber/rake/task'
require 'cuke_sniffer'
Cucumber::Rake::Task.new(:kickoff, :build) do |t|
tags = '--tags [email protected] --tags [email protected] --tags [email protected]_defect'
t.cucumber_opts = "--format html --out results/result.html --format pretty #{tags} --format junit --out features/reports"
end
你運行的黃瓜是什麼版本? – Jesper
版本2.0.0測試版3 – FluffyKittens
你運行'bundle exec rake kickoff'還是'rake kickoff'? – Jesper