最近,我为一个测试咖啡厅项目克隆、运行npm install和npm 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 |这是我第一次尝试使用测试咖啡厅,所以我不清楚发生了什么。
发布于 2022-01-12 08:06:57
我想你的网站没有运行,这就是为什么在3000端口没有"http://localhost:3000/"网址“的原因。请您检查一下,在执行测试之前,您是否可以在浏览器中打开"http://localhost:3000/"”?TestCafe测试的web资源必须由相应的URL提供,在您的情况下是"http://localhost:3000/"“。
https://stackoverflow.com/questions/70657783
复制相似问题