我无法让ci_reporter生成xml文件。让我列出我的文件:
的Gemfile
group :test do
gem 'ci_reporter'
gem 'minitest'
end
Rake文件
require File.expand_path('../config/application', __FILE__)
application::Application.load_tasks
#require 'ci/reporter/rake/test_unit' # use this if you're using Test::Unit
require 'ci/reporter/rake/minitest' # use this if you're using Ruby 1.9 or minitest
终端输入
rake ci:setup:minitest test
终端输出
$ rake ci:setup:minitest test
rm -rf reports
Run options: --seed 7837
# Running tests:
.
Finished tests in 0.002910s, 343.6426 tests/s, 343.6426 assertions/s.
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
我希望在test/reports/
中看到一个xml文件;然而,那里什么都没有。
答案 0 :(得分:1)
我认为这是Rails 4的一个问题。我可以在这里找到一个解决方法:https://github.com/nicksieger/ci_reporter/issues/106
pbendersky 6个月前评论过
...在您的Gemfile中包含minitest-reporter,并将以下内容添加到test_helper.rb。
test_helper.rb中:
require 'minitest/reporters'
MiniTest::Reporters.use! [MiniTest::Reporters::DefaultReporter.new,
MiniTest::Reporters::JUnitReporter.new]