【问题标题】:How to fix long running testcafe tests in CircleCI如何修复 CircleCI 中长时间运行的 testcafe 测试
【发布时间】:2019-06-24 07:57:24
【问题描述】:

我在 CircleCI 2.0 中运行我的 e2e TestCafe 脚本。当我在我的 Mac 上本地运行这些测试时,它们大约需要 3 分钟。当他们通过 CircleCI 运行时,他们通常需要 10 多分钟。

有没有人遇到过这种情况?

我已尝试清除 Circle CI 缓存并使用不同的 docker 映像(即映像:circleci/node:8.9.4-browsers)

【问题讨论】:

    标签: automated-tests e2e-testing circleci testcafe circleci-2.0


    【解决方案1】:

    遇到同样的问题,通过并发运行测试解决了。

    我在 package.json 中的脚本:

    "test": "testcafe -c 5 chrome:headless tests/back-end -r xunit:/tmp/test-results/res.xml"
    

    更多信息在这里: https://devexpress.github.io/testcafe/documentation/using-testcafe/common-concepts/concurrent-test-execution.html

    在付费版本中,您可以为每个作业配置 CPU 和 RAM 资源以使其更快: https://circleci.com/docs/2.0/configuration-reference/#resource_class

    【讨论】:

    • 感谢您的想法。我目前以 2 的并发运行。如果我们做的比这更多,我们就会看到问题出现。我会考虑增加 CPU + RAM,也许这可能会有所帮助。
    猜你喜欢
    • 2016-07-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-01-14
    • 1970-01-01
    • 2021-10-02
    • 1970-01-01
    相关资源
    最近更新 更多