SeleniumHQ / selenium-ide

Open Source record and playback test automation for the web.
https://selenium.dev/selenium-ide/
Apache License 2.0
2.81k stars 765 forks source link

Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Timeout #1027

Open jploski opened 4 years ago

jploski commented 4 years ago

🐛 Bug Report

selenium-side-runner aborts with the cryptic error message "Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Timeout" when the run time of a test suite exceeds the timeout specified in .side file for whatever reason (default: 300s). No further information about where the test got stuck is output in this scenario.

As far as I can see, this timeout can't be configured within Selenium IDE and is not documented anywhere. But it can be changed by editing the .side file manually.

To Reproduce

Steps to reproduce the behavior: try selenium-side-runner with a test suite which runs for longer than 5 minutes (or whatever timeout you set in .side file for the test suite). One realistic way to bump into it would be to set the --timeout command-line parameter to be more than the test suite timeout and then try locating an element which does not exist.

Expected behavior

A clear error message mentioning that the "test suite timeout" has been exceeded should appear, along with instructions how to increase this timeout (i.e. edit the .side file). It would be even better if the documentation for the selenium-side-runner command-line --timeout parameter or examples on the selenium-side-runner website also mentioned this additional "hidden" timeout.

Project file reproducing this issue (highly encouraged)

To provoke the error, here I artificially set the test suite timeout to 1s and then try to load cnn.com (which takes more than 1s to load usually):

{
  "id": "a59b61c8-e635-4534-a871-4babd01c161c",
  "version": "2.0",
  "name": "test",
  "url": "http://www.cnn.com",
  "tests": [{
    "id": "ed952e1e-1199-429e-b2c4-da57e29b4c39",
    "name": "01-Test",
    "commands": [{
      "id": "0fa67ecd-8028-4f75-967f-647ceb0d1058",
      "comment": "",
      "command": "open",
      "target": "http://www.cnn.com/",
      "targets": [],
      "value": ""
    }]
  }],
  "suites": [{
    "id": "85acf876-6ce5-4804-b610-fb2d10293e8b",
    "name": "Default Suite",
    "persistSession": false,
    "parallel": false,
    "timeout": 1,
    "tests": ["ed952e1e-1199-429e-b2c4-da57e29b4c39"]
  }],
  "urls": ["http://www.cnn.com/"],
  "plugins": []
}

Environment

OS: Debian Linux 8 Selenium IDE Version: 3.17.0 Selenium SIDE Runner Version: 3.17.0 Node version: v.12.16.2 Browser: Google Chrome Browser Version: 81.0.4044.113 (Official Build) (64-bit)

corevo commented 4 years ago

In Selenium IDE click the hamburger menu next to your suite and change the suite timeout to be longer.

jploski commented 4 years ago

I believe you should not close this, this bug is about the nonsensical error message, not about the inability to set the test suite timeout.

darkartswizard commented 4 years ago

I’m with Jan on this Tomer. Cryptic error messages should be enhanced with detailed data or recommend solutions like you provided about the hamburger icon.

Paul

On Wed, Apr 29, 2020 at 3:00 PM Jan Ploski notifications@github.com wrote:

I believe you should not close this, this bug is about the nonsensical error message, not about the inability to set the test suite timeout.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SeleniumHQ/selenium-ide/issues/1027#issuecomment-621431042, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMDP3YL4DYXYNFGLEWZAF2DRPCBNJANCNFSM4MQZTDIQ .

bianyucheng-eb commented 4 years ago

Excuse me, have you solved this problem now, I have been troubled by this problem for 3 days