我将 Jenkins v1.467 用于多个 ruby 管理脚本(不是 rails)的持续集成。我注意到当我在本地运行它时,输出看起来很正常,但是当我看到 jenkins 日志时,它没有打印单元测试输出。
詹金斯输出
[SEACE API - Build and Unit Test] $ rake TESTOPTS=-v
/usr/local/bin/ruby -w -I"lib" -I"/usr/local/lib/ruby/1.9.1" "/usr/local/lib/ruby/1.9.1/rake/rake_test_loader.rb" "test/parser-test.rb" "test/url-mapper-test.rb" -v
=> Execute Unit Tests
在本地运行
TestMapper:
test_map_all: /Users/lmayorga/GitRepositories/seaceapi/src/mapper.rb:44:in `map_attributes': warning: URI.escape is obsolete
/Users/lmayorga/GitRepositories/seaceapi/test/url-mapper-test.rb:26:in `test_map_all': warning: URI.escape is obsolete
.: (0.000954)
test_no_parameters: /Users/lmayorga/GitRepositories/seaceapi/src/mapper.rb:44:in `map_attributes': warning: URI.escape is obsolete
/Users/lmayorga/GitRepositories/seaceapi/test/url-mapper-test.rb:34:in `test_no_parameters': warning: URI.escape is obsolete
.: (0.000633)
TestParser:
test_contains_bases_link: .: (3.745998)
test_contains_name: .: (3.204862)
test_contains_region: .: (3.062733)
test_contains_valid_date: .: (3.188995)
test_get_all: .: (3.231105)
我认为我的 Rake 文件测试任务看起来还不错。
Rake::TestTask.new(:test) do |t|
t.warning = true
t.verbose = true
t.test_files = FileList['test/*-test.rb']
end
我在这里错过了什么吗?