我最近克隆、運行npm install和npm run test測驗 Cafe 專案,我立即收到以下錯誤:
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,所以我不清楚發生了什么。
uj5u.com熱心網友回復:
我想您的網站沒有運行,這就是為什么它在“ http://localhost:3000/” URL 的 3000 埠上不可用的原因。請在執行測驗之前檢查您是否可以在瀏覽器中打開“ http://localhost:3000/”站點?TestCafe 測驗的 Web 資源必須通過相應的 URL 可用,在您的情況下是“ http://localhost:3000/”。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/411808.html
標籤:
