Testcafe: Concurrency no longer works in 1.8.3 (works fine in 1.8.2)

Created on 20 Mar 2020  路  11Comments  路  Source: DevExpress/testcafe

What is your Test Scenario?

I want to run tests using the -c flag for concurrency.

What is the Current behavior?

Multiple browser windows open, while only 1 of them runs tests. The remaining windows show the "TestCafe CONNECTED" message.

What is the Expected behavior?

All browser windows should be running the tests.

What is聽your web application and聽your TestCafe聽test code?

N/A

Steps to Reproduce:

  1. Run testcafe -c 4 -q --reporter list chrome anytest.js

Your Environment details:

  • testcafe version: 1.8.3
  • node.js version: v12.14.1
  • command-line arguments: testcafe -c 4 -q --reporter list chrome anytest.js
  • browser name and version: Chrome 80, Firefox 75
  • platform and version: Windows 10
  • other: TestCafe version 1.8.2 works as expected
level 2 Auto-locked bug

Most helpful comment

Here's an example that shows a regression in concurrency between versions 1.8.2 and 1.8.3. All tests run in a single window on 1.8.3.


const fixtures = () => {

  fixture`f0`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f1`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f2`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f3`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f4`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f5`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f6`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f7`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f8`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

}

fixtures()

All 11 comments

Hello,
I was not able to reproduce the issue using this the following tests (and cli command as you mentioned):

fixture`f1`
    .page`http://example.com`;

for (let i = 0; i < 20; i++) {
    test('test', async t => {
        await t.click('h1');
    });
}

fixture`f2`
    .page`http://example.com`;

for (let i = 0; i < 20; i++) {
    test('test', async t => {
        await t.click('h1');
    });
}

Could you please check my tests on your side?

If they work, we would really appreciate it if you share your tests. They will help us reproduce and investigate the issue.

Your test worked fine, @AlexKamaev. Thank you for providing an example. I don't believe we're doing anything strange with our tests, and will check with the team to see if we can provide something for you.

Here's an example that shows a regression in concurrency between versions 1.8.2 and 1.8.3. All tests run in a single window on 1.8.3.


const fixtures = () => {

  fixture`f0`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f1`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f2`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f3`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f4`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f5`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f6`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f7`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

  fixture`f8`
    .page`http://example.com`;

  test('test', async t => {
      await t.click('h1');
  });

}

fixtures()

I am facing the same issue. Fixtures were running in parallel till v 1.8.2. Since upgrading to 1.8.3, fixtures run sequentially in a single window. Providing --concurrency n, does open n windows, but all the fixtures run sequentially only in 1 of the browsers.
Here is a sample repo to reproduce the same: https://github.com/siddharthdhar/testcafe.poc

In my case problems started with version 1.7.0 - on 1.6.1 my tests run 35min - on 1.8.3 2h28min

@paulh-adion

Hello,

Thank you for the additional information. We reproduced the issue. We will examine it and check for a suitable solution.

@AdaskoTheBeAsT

Hello,

That is strange. We cannot say whether your case is related to the original issue.
Feel free to share with us your minimal project.

@Farfurix
Hi,

I will try to prepare some minimal sample

For me it stopped working after upgrading from 1.7 to anything about 1.7. We are running tests inside docker.

in my case version 1.8.4 fixed issue with performance

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AndreyBelym picture AndreyBelym  路  3Comments

multivoltage picture multivoltage  路  3Comments

xalvarez picture xalvarez  路  3Comments

inikulin picture inikulin  路  3Comments

Lukas-Kullmann picture Lukas-Kullmann  路  3Comments