testcafe icon indicating copy to clipboard operation
testcafe copied to clipboard

"runExecutionTimeout" fails the test execution even if it is active

Open wombatka opened this issue 3 years ago • 5 comments

What is your Scenario?

According to docs: image However when i set runExecutionTimeout in my configuration file- the execution is terminated, even if testcafe is actively executing actions

What is the Current behavior?

runExecutionTimeout terminates active execution

What is the Expected behavior?

runExecutionTimeout should terminate idle or inactive executions

What is your public website URL? (or attach your complete example)

example.js :

import {Selector, t} from "testcafe"

fixture example .beforeEach(async () => { await t.maximizeWindow()

    await t.navigateTo(`https://gojs.net/latest/samples/minimalBlob.html`);
})

test('E1', async t => { for(let i = 0; i < 45; i ++){ await t.click(Selector("button").withText("View the code for this sample in-page")) console.log(clicking for the ${i} time); await t.wait(500); } })

What is your TestCafe test code?

package.json:

"name": "testcafeexample", "version": "1.0.0", "description": "", "main": "example.js", "scripts": { "test": "testcafe chrome example.js" }, "author": "", "license": "ISC", "dependencies": { "testcafe": "1.19.0", "testcafe-reporter-spec-time": "^4.0.0" } }

Your complete configuration file

.testcafrc.json : { "assertionTimeout": 10000, "selectorTimeout": 3000, "runExecutionTimeout": 10000, "skipJsErrors": true, "reporter": [ { "name": "spec-time" } ] }

Your complete test report

No response

Screenshots

image

Steps to Reproduce

1.use the attached files: example.js, package.json, testcaferc.json 2.run npm install 3.run npm test The test is clicking a button every 500ms . after 10 seconds of clicking the test will fail with:

  1. Run timeout of 10000ms exceeded. According to docs this should occur only if execution is idle or unresponsive.

TestCafe version

1.19.0

Node.js version

v14.16.0

Command-line arguments

npm test

Browser name(s) and version(s)

Version 103.0.5060.114 (Official Build) (64-bit)

Platform(s) and version(s)

Ubuntu 20

Other

No response

wombatka avatar Jul 14 '22 06:07 wombatka

Hi @wombatka

It's a documentation issue. We will fix it. The runExecutionTimeout option specifies the maximum test run execution time. After the runExecutionTimeout elapses, the tests will be terminated regardless of their state.

miherlosev avatar Jul 15 '22 07:07 miherlosev

ok. I suppose same documentation issue concerns test-execution-timeout. It says that the timeout will occur in case the test is unresponsive. But timeout occurs regardless test state. It would be nice to have a timeout in case of inactivity lack of browser response as well. I am facing problems with my tescafe project as the browser freezes and test executions is endless

wombatka avatar Jul 15 '22 07:07 wombatka

We will fix the issue with test-execution-timeout too.

It would be nice to have a timeout in case of inactivity lack of browser response as well. I am facing problems with my tescafe project as the browser freezes and test executions is endless

This behavior is unexpected. We want to know why it happens. Could you please share an example that illustrates the issue?

miherlosev avatar Jul 18 '22 08:07 miherlosev

I try to find out the reproductions steps for the freezing issue, but it is really random. Definnitelly conneted somehow with clicking some elements- after some click , the browser and testcafe just freezes until i manually reload the browser- then tests start to execute again .I will post reproduction steps as soon as i find them. seems to be occurring on versions 1.18.5- 1.20-rc1. Not occurring on 1.18.2

wombatka avatar Jul 18 '22 11:07 wombatka

Thank you for your cooperation.

miherlosev avatar Jul 20 '22 11:07 miherlosev

The documentation has been updated, it may take a while for the website to reflect the changes.

titerman avatar Oct 19 '22 11:10 titerman