Closed sduduzog closed 2 years ago
Hi @sduduzog Thanks for sharing the Error Message. Looks like your test session went into the queue, and which is a known limitation with TestCafe. Testcafe only works over the live connection with the browser. And when the test session of Testcafe with the remote grid browser opens the instance more than the available concurrency, the test session goes into the queue. However, Testcafe does not support the queuing mechanism. As you mentioned in point number 1 and 2, this is the expected behavior of Testcafe for the queue. Although, you can create several runners for each browser and run them in series. Here is an example code to run parallel testing over LambdaTest Selenium Grid through a custom Testcafe runner.
const browsers = [ ['lambdatest:Chrome@74.0:Windows 10"', 'lambdatest:Chrome@75.0:Windows 10'], ['lambdatest:Chrome@76.0:Windows 8', 'lambdatest:Chrome@77.0:Windows 8'], ]; const runTest = async browser => { console.log('starting tests'); await createTestCafe('localhost', 1337, 1338) .then(tc => { testcafe = tc; const runner = testcafe.createRunner(); return runner .src(['web-tests/*.ts']) .browsers(browser) .run(); }) .then(async failedCount => { console.log('Tests failed: ' + failedCount); await testcafe.close(); return; }); } const runAllBrowsers = async () => { for (const browser of browsers) { await runTest(browser); } }
Thanks
@sduduzog You can try out the new version of 2.0.10, with a new flag LT_TUNNEL_NUMBER Docs - https://www.lambdatest.com/support/docs/npm-plugin-for-testcafe-integration-with-lambdatest/
This is the error I get when I run tests and are added to the queue