1

我已经安装了 Watir 1.7.1、Ruby 1.9.2、ci_reporter 1.6.4、测试单元 2.2.0。

由于 Ruby 1.9.2 没有 testunit,所以我单独安装了 testunit。

当我运行脚本时,ci_reporter 不会在运行测试的目录中创建“test/reports”文件夹。当我执行脚本时,脚本运行良好,但未创建文件夹。

文件夹“test/reports”是自己创建的,还是“test/reports”文件夹应该是 testunit 的一部分。

以下是我正在运行的简单测试,请看代码片段:

gem 'test-unit'
require 'test/unit/ui/console/testrunner.rb'
require 'ci/reporter/rake/test_unit_loader.rb'
require 'watir'

class My_Test < Test::Unit::TestCase

  def test_me
    browser = Watir::IE.start('http://www.google.com')
    assert(browser.link(:text, 'About Google').exists?)
    browser.close
  end

end

ruby 1.9.2 是否支持 ci_reporter 1.6.4?

谁能帮我举一个例子,说明 ci_reporter 如何创建报告以及报告的存储位置?

4

2 回答 2

1

根据蒂芙尼的回答和她提供的链接,我认为你的问题的答案是“不”。目前不支持'

我也赞同使用 1.8.7 的建议,这是我已经使用了一段时间的,它与 watir 配合得很好。

于 2011-03-30T16:10:38.717 回答
1

我认为大多数人仍在使用 ruby​​ 1.8.7 和 Watir。我还在 1.8.7 上,我每天都使用 ci_reporter 和 Watir,没有任何问题。

您有机会在 1.8.7 环境中尝试您的代码吗?我刚刚发现这篇博文表明 ci_reporter 尚未更新为可与 ruby​​ 1.9.2 一起使用: http ://www.larkware.com/posts/fix-ci-reporter-for-test-unit-2-dot- 0

于 2011-03-31T22:40:48.333 回答