增加"pageRequestTimeout"变量的值,启用"retryTestPages"选项

Increase the value of the "pageRequestTimeout" variable, enable the "retryTestPages" option

我最近为测试 Cafe 项目克隆了 运行 npm installnpm run test,我立即收到以下错误:

Increase the value of the "pageRequestTimeout" variable, enable the "retryTestPages" option, or use quarantine mode to perform additional attempts to execute this test.

Error details:
      Failed to find a DNS-record for the resource at "http://localhost:3000/".

  Browser: Chrome 97.0.4692.71 / macOS 10.15.7

     23 |  async getLoginValidationIssue() {
     24 |    return Selector('[data-cy=failed-auth]')
     25 |  }
     26 |
     27 |  async login(username, pwd) {
   > 28 |    await t.typeText('input[name=email]', username)
     29 |    await t.typeText('input[name=password]', pwd)
     30 |    await t.click(this.submitButton)
     31 |    return t;
     32 |  }
     33 |

这是我第一次尝试使用 test Cafe,所以我不清楚发生了什么。

我想您的网站没有 运行,这就是为什么它在“http://localhost:3000/" URL. Could you please check whether you can open the site at "http://localhost:3000/" in your browser before the execution of tests? The web resource tested by TestCafe must be available by the corresponding URL, in your case it is "http://localhost:3000/" .

的 3000 端口不可用的原因