无限循环自动测试 [英] Autotest inifinitely looping

查看:59
本文介绍了无限循环自动测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Rails 项目中使用 autotest 时遇到问题,当测试失败时(即,我修改了一个测试文件并且 autotest 自动运行测试),autotest 会不断尝试运行测试(每次都失败)当然,因为文件还没有被修改),而不是等到文件再次保存.随着咆哮通知,当我试图修复代码以使测试通过时,这可能会非常烦人.它不会一直发生,但大部分时间都会发生.有没有其他人遇到过这个问题并知道解决方案?谢谢.

I've run into a problem using autotest with a Rails project, that when a test fails (ie, I modified a test file and autotest automatically runs the test), autotest continously tries to run the test (failing each time of course since the file hasn't yet been modified), instead of waiting until the file is saved again. And with growl notification on, this can be extremely annoying while I'm trying to fix the code to get the test to pass. It doesn't happen all the time, but most of the time. Has anyone else run into this and know the solution? Thanks.

推荐答案

我找到了解决方案.可能与 OSX(在 Leopard 上运行)更改文件夹中的 .DS_Store 文件或其他临时文件有关.将以下内容添加到我的 .autotest 可以解决问题(这也可以防止自动测试查看由 Ferret 生成的索引文件夹).

I found the solution. Probably has to do with OSX (running this on Leopard) changing the .DS_Store file in the folder or another temp file. Adding the following to my .autotest did the trick (this also prevents autotest looking at the index folder generated by Ferret).

Autotest.add_hook :initialize do |at|
  %w{.git vendor index .DS_Store ._}.each {|exception| at.add_exception(exception)}
end

这篇关于无限循环自动测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆