【问题标题】:rails distributed parallel testsrails 分布式并行测试
【发布时间】:2011-11-13 19:43:07
【问题描述】:

如何在同一网络上通过 SSH 连接的双核机器上运行并行测试?

https://github.com/grosser/parallel_tests 对本地工作人员运行良好,但无法在多台机器上运行

https://github.com/qxjit/deep-test - 我运行它时没有运气,示例中有一行像

t.distributed_hosts

引发错误

对于 Hydra,我遇到了一个永远等待 ssh 工作人员的问题

我尝试了 Buffet 的 alpha 版本,创建了一个测试 repo 并运行它,但没有成功

fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git

我只想运行标准单元/集成/功能测试

根本没有花哨的东西。

【问题讨论】:

  • 构建您自己的并行/分布式测试设置可能是一个相当大的挑战。我们非常幸运地使用了一个名为 TDDium (tddium.com) 的服务来为您管理这个,使用像 Heroku 这样的 git 远程服务器来接受批量运行的代码。我强烈推荐他们。
  • 与 Winfield 一样徒劳无功,我们使用 CircleCi (circleci.com) 并行化我们的测试并取得了巨大成功。
  • 为什么parallel_tests不适合多机?深度测试会抛出什么错误?
  • 不知道,两年多了……
  • 您可以只运行自己的 Travis 或 Jenkins 设置并在 push 上运行,还是您想要 Guard/Autotest 风格的远程测试?

标签: ruby-on-rails unit-testing testing parallel-processing


【解决方案1】:

您也可以使用 Shippable http://www.shippable.com 持续服务进行并行测试

【讨论】:

    【解决方案2】:

    如果您愿意在托管 CI 服务上运行测试,那么有很多不错的选择。在这里不按特定顺序列出一些:

    1. Travis CI (there is pro version for private repos)
    2. 信号量(Heroku 插件存在)parallelism even on the free plans
    3. Tddium(上面已经提到过)
    4. Codeship(Heroku 插件存在,不确定是否支持开箱即用)
    5. 圈子CI(Parallelism on paid plans)
    6. Snap-CI(Pipeline parallelism 允许您更好地控制,但需要进行一些配置。此外,他们将来可能会添加更多开箱即用的支持)

    我已经在我的项目中尝试了所有这些不同的级别,并且它们都运行良好。差异主要在于服务的定价方式。如果您不介意为订阅付费,最好依靠这些服务,而不是尝试处理将测试拆分为流程的麻烦。当然,例外情况是,如果您以足够大的规模进行操作,这可能证明在这种情况下节省成本是合理的。

    要记住的其他几点:

    • 同一进程中的并行性仍然可以在足够强大的机器(具有更多内核)上为您提供良好的结果,而无需付出太多努力应该是您的第一选择,除非您已经没有选择余地。
    • 如果您的最终目标是加快测试速度,请查看 Travis-CI 通过更好的文件系统和内存数据库提供的一些好处。 (我不确定这个)
    • 如果您仍打算自行设置,您应该查看 GoCD,并结合使用 TestLoadBalancer(前面提到过)。
    • 请记住,如果您尝试解决的问题是在足够大的项目上不断增长的测试套件,您可能希望积极开始考虑在逻辑上拆分您的测试套件并实际加速它们,因为并行性只会设法延迟最终长时间运行的测试套件的问题并不能完全解决。

    【讨论】:

      【解决方案3】:

      我认为 git 配置有问题。检查你的 git 配置

      试试这个链接

      Whats the best way to work with Github and multiple computers?

      【讨论】:

        【解决方案4】:

        试试http://test-load-balancer.github.io/,我在过去取得了巨大的成功。

        【讨论】:

          【解决方案5】:

          虽然与如何在网络中的多台机器上运行parallel_tests没有特别的关系,但这里是我遇到的问题以及我在使用parallel_test时如何解决它们。

          tests getting killed in the middle of a run using parallel_tests

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2013-07-27
            • 1970-01-01
            • 1970-01-01
            • 2016-10-10
            • 2016-09-05
            • 1970-01-01
            相关资源
            最近更新 更多