testcafe: TestCafe hangs on loading page and freezes execution when executing concurrently
What is your Scenario?
Concurrently run 5 fixtures that execute a single test. Visiting https://uk.zwift.com results in TC hanging indefinitely and preventing the remainder of test execution.
What is the Current behavior?
TestCafe hangs on page load
What is the Expected behavior?
Pages are loaded concurrently as expected
What is your public website URL? (or attach your complete example)
https://github.com/vlads11/TC-PageLoadError
- npm install
- testcafe chrome ./Tests/* -c 5 --skip-js-errors
This may need to be triggered a few times but it consistently reproduces
What is your TestCafe test code?
Test Code provided https://github.com/vlads11/TC-PageLoadError ----- this single fixture is duplicated 5 times to reproduce the error in question.
import { Selector } from “testcafe”; import { test } from ‘testcafe’;
let homeURL = ‘https://uk.zwift.com’;
//slice0 let slice0 = Selector(‘[class='image-with-text-overlay__banner columns one-whole image-crop-none']’)
fixture Shopify HowZwiftWorkspage
.page(‘about:blank’)
.beforeEach(async t => {
await t.navigateTo(homeURL);
})
test(‘Slice0 Get Started Button goes to Create Account page’, async t => { await t.click(slice0); })
Your complete configuration file
default
Your complete test report
No response
Screenshots
Recording of issue can be seen here: https://github.com/vlads11/TC-PageLoadError/blob/main/ScreenRecording.mov
Steps to Reproduce
- Navigate to https://uk.zwift.com with a concurrent session count of 3 or higher
- Notice page hang and never completes loading.
TestCafe version
1.18.6
Node.js version
v16.14.2
Command-line arguments
testcafe chrome ./Tests/* -c 5 --skip-js-errors
Browser name(s) and version(s)
Chrome 101
Platform(s) and version(s)
macOS 12.3.1 but also happens in Linux
Other
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 3
- Comments: 30 (2 by maintainers)
To provide an update: We tried a number of things and finally had some progress by running tests via testcafe runner in groups. We had the same situation as @alienintheheights mentioned - 200+ tests and it was hanging in random places without any logs. We split the tests in two almost equal size groups and they still hang from time to time but not so often - say 1-2 in 20, while before it was 9 hangs from 10 runs. It’s not ideal but at least it doesn’t fully block our work. We are yet to experiment splitting the tests in more groups. Hope this helps.
Also running into this. Our tests consistently hang, though the point at which they do varies (we have around 300 tests that run nightly). No concurrency. Running latest, 2.6.1, on node 16.13.2.
When it gets stuck, strace on the /node_modules/.bin/testcafe process shows this over and over:
Those pids correspond to defunct instances of Google chrome. New ones have been spawned in its place.
Meanwhile the node_modules/testcafe/lib/cli process is looping the following POST to /messaging
Don’t know if that helps. We had the same outcome on older versions too.
This is our .testcaferc.json
Hi - we are seeing similar problem on firefox and without concurrency, too.