首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >增加"pageRequestTimeout“变量的值,启用"retryTestPages”选项

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

Stack Overflow用户
提问于 2022-01-10 19:14:17
回答 1查看 308关注 0票数 0

最近,我为一个测试咖啡厅项目克隆、运行npm installnpm run test,并立即得到以下错误:

代码语言:javascript
复制
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 |

这是我第一次尝试使用测试咖啡厅,所以我不清楚发生了什么。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-01-12 08:06:57

我想你的网站没有运行,这就是为什么在3000端口没有"http://localhost:3000/"网址“的原因。请您检查一下,在执行测试之前,您是否可以在浏览器中打开"http://localhost:3000/"”?TestCafe测试的web资源必须由相应的URL提供,在您的情况下是"http://localhost:3000/"“。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70657783

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档