سؤال

I cannot get ci_reporter to generate xml files. Let me list my files:

Gemfile

group :test do
    gem 'ci_reporter'
    gem 'minitest'
end

Rakefile

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

Terminal input

rake ci:setup:minitest test

Terminal output

$ 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

I'm expecting to see an xml file in test/reports/; however, there is nothing there.

هل كانت مفيدة؟

المحلول

I think that this is an issue with Rails 4. I was able to find a workaround here: https://github.com/nicksieger/ci_reporter/issues/106

pbendersky commented 6 months ago

...include minitest-reporters in your Gemfile and add the following to test_helper.rb.

test_helper.rb:

require 'minitest/reporters'
MiniTest::Reporters.use! [MiniTest::Reporters::DefaultReporter.new,
                          MiniTest::Reporters::JUnitReporter.new]
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top