如何阻止TDDium自动运行脚本/黄瓜功能

时间:2013-07-07 04:50:38

标签: ruby rspec continuous-integration cucumber integration-testing

我正在使用TDDium来持续运行我的测试。

每次我使用tddium.yml配置文件运行它时都会运行:

:tddium:
  :timeout: 90
  :postgresql: false
  :test_pattern:                                
    - spec/**_spec.rb        

  :mysql: 
    :adapter: mysql2
    :config:
      :adapter: mysql2
      :database: <%= ENV['TDDIUM_DB_NAME'] %>
      :username: <%= ENV['TDDIUM_DB_USER'] %>
      :password: <%= ENV['TDDIUM_DB_PASSWORD'] %>
      :database: <%= ENV['TDDIUM_DB_NAME'] %>

如您所见,我正在指定:test_pattern:

即使我的.feature目录中有一组features个文件,我也不希望它自动运行它们。

如何阻止TDDium这样做?

我认为通过指定:test_pattern:而不包括.feature模式,它会跳过它们。

我尝试过运行tddium suite --edit,这就是发生的事情:

bonsai-2 project$ tddium suite --edit
... Detected ruby ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2]
... Detected bundle Bundler version 1.3.5
... Detected gem 1.8.24
... Configured test pattern from tddium.yml:

 - spec/**_spec.rb

>>> To change the pattern:
    1. Edit tddium.yml
    2. Run `tddium suite --edit` again.

>>> To set up Hosted CI, enter a git URL to pull from. 
    You can also set a git URL to push to after tests pass.

>>> Set both pull and push URLs to 'disable' to disable hosted CI completely.

Enter git URL to pull from (default 'ssh://git@github.com/etagwerker/project.git') or enter 'disable': 
Enter git URL to push to (default '') or enter 'disable': disable
Custom Campfire room for this suite (current: '') or enter 'disable': disable
Custom HipChat room for this suite (current: '') or enter 'disable': At Work
Updated suite successfully.

任何其他想法都会有所帮助。

谢谢!

2 个答案:

答案 0 :(得分:1)

我建议禁用Tddium的自动测试映射(即set:test_pattern to none)

:tddium:
   :test_pattern: 'none'

然后,您可以通过:tests configuration手动调用测试。

答案 1 :(得分:0)

如果您从未运行过当前分支的测试套件,Tddium将简单地选择测试模式并使用它。如果您已为当前分支配置了套件,则最简单的解决方案是运行tddium suite --edit