У меня есть несколько тестов ruby, запущенных в TeamCity (версия 6.0.2), но после обновления до ruby 1.9.2 с 1.8.6 похоже, что он не распознает тестовые тесты как неудачные, так и успешные.
Единственное отличие, которое я вижу, в том, что формат вывода немного изменился, но я не знаю почему?
1.8.6 рабочая версия
[08:01:35]: in directory: C:\BuildAgent\work\5a0dd55bc3e14c2\webtest\watir
[08:01:36]: (in C:/BuildAgent/work/5a0dd55bc3e14c2/webtest/watir)
[08:01:43]: Execute test_all (13m:13s)
[08:01:43]: [Execute test_all] c:/ruby/bin/ruby.exe -I"lib" "c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test_service.rb"
[08:01:48]: [Execute test_all] Starting.. (36 tests)
[08:01:48]: [Execute test_all] TestCreateAccessAddress (41s)
[08:01:48]: [TestCreateAccessAddress] test_create_access_address_viaeuropa (41s)
[08:01:48]: [test_create_access_address_viaeuropa] ruby_qn://TestCreateAccessAddress.test_create_access_address_viaeuropa
[08:01:50]: [test_create_access_address_viaeuropa] [Test Error Output] ERROR: The process "iexplore.exe" not found.
[08:02:30]: [test_create_access_address_viaeuropa] [Test Output] Open new browser Loggin in. SUCCESS: The process with PID 2696 child of PID 5568 has been terminated. SUCCESS: The process with PID 5568 child of PID 832 has been terminated.
.....
[08:14:53]: [Execute test_all] 36 tests, 33 assertions, 0 failures, 2 errors
[08:14:53]: [Execute test_all] Test suite finished: 784.546 seconds
[08:14:56]: [Execute test_all] RuntimeError: Command failed with status (1): [c:/ruby/bin/ruby.exe -I"lib" "c:/ruby/lib/...] Stacktrace: c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `sh' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1029:in `ruby' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:in `ruby' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/testtask.rb:117:in `define' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1112:in `verbose' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/testtask.rb:102:in `define' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `standard_execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `standard_execute' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:260:in `execute' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:90:in `target_exception_handling' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:266:in `execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain' c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `standard_invoke_with_call_chain' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:235:in `invoke' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:90:in `target_exception_handling' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:234:in `invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:311:in `standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:311:in `standard_exception_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:179:in `run' C:/BuildAgent/plugins/rake-runner/lib/rb/runner/rakerunner.rb:40
[08:14:56]: Rake aborted!
[08:14:57]: Process exited with code 1
[08:14:58]: Publishing artifacts
[08:14:58]: [Publishing artifacts] Paths to publish: [teamcity-info.xml]
[08:14:58]: [Publishing artifacts] Sending files
[08:14:22]: Build finished
1.9.2@136 Неисправная версия
3:33:57]: [Updating sources: server side checkout...] Updating C:\BuildAgent\work\5a0dd55bc3e14c2
[13:33:59]: Starting: C:\Ruby192\bin/ruby.exe C:\BuildAgent\plugins\rake-runner\lib\rb\runner\rakerunner.rb --rakefile C:\BuildAgent\work\5a0dd55bc3e14c2\webtest\watir\Rakefile test_tb
[13:33:59]: in directory: C:\BuildAgent\work\5a0dd55bc3e14c2\webtest\watir
[13:34:02]: (in C:/BuildAgent/work/5a0dd55bc3e14c2/webtest/watir)
[13:34:15]: Invoke test_tb (1s)
[13:34:15]: [Invoke test_tb] (first_time)
[13:34:15]: [Invoke test_tb] Execute test_tb (1s)
[13:34:15]: [Execute test_tb] C:/Ruby192/bin/ruby.exe -I"lib" "C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader.rb" "tryggare/test_tryggare.rb"
[13:34:16]: [Execute test_tb] Loaded suite C:/Ruby192/lib/ruby/1.9.1/rake/rake_test_loader
[13:34:16]: [Execute test_tb] Started
[13:34:16]: [Execute test_tb] F.
[13:34:16]: [Execute test_tb] Finished in 0.000000 seconds.
[13:34:16]: [Execute test_tb] 1) Failure:
[13:34:16]: [Execute test_tb] test_should_be_able_to_open_browser(TestTryggare) [tryggare/test_tryggare.rb:11]:
[13:34:16]: [Execute test_tb] expected but was
[13:34:16]: [Execute test_tb] .
[13:34:16]: [Execute test_tb] 2 tests, 2 assertions, 1 failures, 0 errors, 0 skips
[13:34:16]: [Execute test_tb] Test run options: --seed 63773
[13:34:16]: [Execute test_tb] RuntimeError: Command failed with status (1): [C:/Ruby192/bin/ruby.exe -I"lib" "C:/Ruby19...]
Может ли быть виновником рейк-бегуна или драгоценного камня тестового блока?
Цель рейка выглядит такмежду двумя версиями не было изменений
require 'rake'
require 'rake/testtask'
Rake::TestTask.new(:test_tb) do |t|
t.pattern = 'tryggare/**/test_*.rb'
t.verbose = true
t.warning = false
end
Информация, которая может иметь отношение к делу
Ruby 1.9.1 с Test :: Unit gem
http://jamesmead.org/blog/2009-02-02-test-unit-and-minitest-with-different-ruby-versions
Rake Runner использует свой собственный модуль модульных тестов и загружает его с помощью переменной среды RUBYLIB.Вам нужно убедиться, что ваша программа не очищает эту переменную среды, но вы можете добавить к ней свои пути.
http://confluence.jetbrains.net/display/TCD6/Rake