Search code examples
testingautomationautomated-testse2e-testingtestcafe

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


I recently cloned, ran npm install and npm run test for a test Cafe project and I immediately got the following error:

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 |

This is my first time trying to use test Cafe so I am unclear what is going on.


Solution

  • I suppose that your website doesn't run, and that's why it isn't available at the 3000 port by the "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/" .