首页 > 解决方案 > 在 bitbucket 上使用 testcafe 运行 e2e 测试

问题描述

所以我用 testcafe 编写了一些 e2e 测试,它们在我的本地机器上完美运行。现在我希望它们在 bitbucket 管道中运行,但我无法让它工作。

我的bitbucket-pipeline.yml长相是这样的

image: testcafe/testcafe

pipelines:
  default:
    - step:
        caches:
          - node
        script:
          - npm ci
          - /opt/testcafe/docker/testcafe-docker.sh 'firefox:headless --no-sandbox --disable-dev-shm-usage' test/**      

我在管道上收到的错误消息:

A request to "http://127.0.0.1:3000/" has failed.
Use quarantine mode to perform additional attempts to execute this test.

You can find troubleshooting information for this issue at "https://go.devexpress.com/TestCafe_FAQ_ARequestHasFailed.aspx".

Error details:
Failed to find a DNS-record for the resource at"http://127.0.0.1:3000/".
Browser: Firefox 78.0 / Linux 0.0

有谁知道是什么导致了这个异常以及如何解决它?

标签: reactjsbitbuckete2e-testingtestcafebitbucket-pipelines

解决方案


推荐阅读