automated-tests - 如何修复 CircleCI 中长时间运行的 testcafe 测试

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

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

有人遇到过这种情况吗?

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

最佳答案

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

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

关于automated-tests - 如何修复 CircleCI 中长时间运行的 testcafe 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54450713/

相关文章:

ruby-on-rails - CircleCI gem 缓存

Selenium 与 HtmlUnit?

java - 在自动化测试中使用来自查看页面源的信息

typescript - Testcafe:出现错误:无法隐式解析测试运行

testing - 咖啡厅 : Unhandled Promise rejection in First test makes second test pass even when It has to be failed by throwing Unhandled Promise Rejection

Istanbul 尔和 Circle-CI

python - 在 CircleCI 上运行 pytest-qt

javascript - 如何断言 HTML 元素是 Playwright 中的有效链接?

java - 使用 "Assert in selenium"验证 Facebook 登录

javascript - Protractor 中的 AngularJS E2E 测试失败