CI::Reported not generating xml's for Ruby Test::Units?

好久不见. 提交于 2020-01-15 05:11:25

问题


I am trying to use CI::reporter to generate report of ruby unit tests. My rakefile:

require 'rake'

require 'rake/testtask'
require 'rake/packagetask'
require 'rake'
require 'rake/testtask'
require 'rake/packagetask'
#require 'spec/version'
#require 'spec/rake/spectask'
#require 'rcov'
gem 'ci_reporter'
require 'ci/reporter/rake/test_unit'  #http://juretta.com/log/2008/11/11/hudson_test_drive_part_1_rails/
require 'ci/reporter/rake/rspec'

task :test do
  ruby "test/test1.rb"
end

My test1.rb file:

require 'test/unit'

class Test1 < Test::Unit::TestCase

  def test_add
    s = 1 + 1
    assert_equal(2, s)
  end

end

The command I am running:

rake ci:setup:testunit test CI_REPORTS=results

The command's output:

sgoyal@sgoyal-macbook:~/tmp/rake_test/ ==> rake ci:setup:testunit test CI_REPORTS=results
(in /Users/sgoyal/tmp/rake_test)
rm -rf results
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby test/test1.rb
warning: Insecure world writable dir /data in PATH, mode 040777
Loaded suite test/test1
Started
.
Finished in 0.000235 seconds.

1 tests, 1 assertions, 0 failures, 0 errors

Now in the command output, it is 'rm -rf'ing the result directory, so CI is definitely getting called, but I see no results directory.

来源:https://stackoverflow.com/questions/6038305/cireported-not-generating-xmls-for-ruby-testunits

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!