Installation: http://rubygems.org/gems/ci_reporter
sample rakefile
require 'rake/testtask' require 'ci/reporter/rake/test_unit' # use this if you're using Test::Unit ENV['CI_REPORT'] = 'test/reports' test = Rake::TestTask.new do |t| t.test_files = FileList['test/test.rb'] t.verbose = true end task "ci:set:testunit" => :test
commone line :
jruby --1.8 -S rake ci:setup:testunit test
NOTE: ci_reporter只能和ruby 1.8.x集成使用,1.9好像有问题 -- Test::Unit::UI::TestRunnerMediator类 在1.9下被移除了。
延伸思考:
以后可以使用JRuby来书写java的单元测试,并与Jenkins和CruiseControl的工具集成起来