【问题标题】:Rake wont load Selenium 2 unit tests anymoreRake 不再加载 Selenium 2 单元测试
【发布时间】:2012-01-23 10:22:56
【问题描述】:

我曾经能够通过“rake test:units”在 Ruby on Rails 中启动我所有的 Selenium2 WebDriver 测试。但是最近,我的测试用例再也找不到了。我没有收到任何通知或错误消息。跟踪,测试在 'Execute test:units' 之后才结束

它仍然可以通过调用 'rake test:unit TEST=test/unit/foo_bar' 或使用 'ruby [path]' 来启动文件来手动启动。

测试本身仍然可以正常工作,所以我不知道为什么自动测试不再启动。我可能违反了一些命名约定?一切都是这样命名的:

File: foo_bar.rb
Class: FooBar
Method: test_foo_bar

我还使用了一些额外的自写需求,存储在 test/unit/helpers 中。可能还有其他问题来源吗?

谢谢。

【问题讨论】:

    标签: ruby-on-rails-3 unit-testing rake selenium-webdriver


    【解决方案1】:

    仅供参考:这是非常规的命名。

    File: foo_bar_test.rb
    Class: FooBarTest
    Method: test_foo_bar
    

    做对了。现在一切都以“rake test/units”重新启动。

    【讨论】:

      猜你喜欢
      • 2019-03-13
      • 2013-12-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多