Rails3.1 中的测试非常慢。有某种解决方案可以更快地加载测试吗?

发布于 2024-12-06 22:30:17 字数 70 浏览 6 评论 0原文

我假设由于资产管道的原因,测试加载速度较慢。我想知道是否有某种宝石或魔法咒语可以用来加快测试加载速度。耙子测试:单位需要永远。

I am assuming that the tests are loading slower because of the asset pipeline. I am wondering if there is some sort of gem, or magical spell that I can use to make the tests load faster. rake test:units takes forever.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

衣神在巴黎 2024-12-13 22:30:17

有很多不同的方法。目前流行的一个是 Spork,它可以避免多次加载整个 Rails 堆栈。

还有并行测试,它并行运行多个测试套件(利用您的多个核心/处理器)机器)。

There's a bunch of different ways. A popular one right now is Spork, which avoids loading the entire Rails stack multiple times.

There's also Parallel Test, which runs multiple test suites in parallel (taking advantage of the multiple cores/processors on your machine).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文