DevExpress / testcafe

A Node.js tool to automate end-to-end web testing.
https://testcafe.io
MIT License
9.82k stars 670 forks source link

Page hangs when running a test with experimental proxyless and live mode together #7514

Closed ayemelyanenko-chegg closed 1 year ago

ayemelyanenko-chegg commented 1 year ago

What is your Scenario?

Running sample test with experimental proxyless and live mode together

What is the Current behavior?

The page hangs when running experimental proxyless and live mode together

What is the Expected behavior?

The page should not hang when running tests with experimental proxyless and live mode together

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

https://devexpress.github.io/testcafe/example

What is your TestCafe test code?

fixture('Getting Started')
    .page('https://devexpress.github.io/testcafe/example');

test('My first test', async t => {
    await t
        .typeText('#developer-name', 'John Smith')
        .click('#submit-button');
});

Your complete configuration file

module.exports = {
  screenshots: {
    takeOnFails: true,
    fullpage: true,
    pathPattern:
      '${FIXTURE}_${USERAGENT}/${TEST}/${DATE}_${TIME}__${QUARANTINE_ATTEMPT}/${FILE_INDEX}.png',
    path: './testcafe/screenshots',
  },
  clientScripts: [{ module: 'axe-core/axe.min.js' }],
  reporter: [
    {
      name: 'spec-time',
    },
    {
      name: 'slack-errors-only',
    },
    {
      name: 'list',
      output: 'testcafe/reports/report.txt',
    },
    {
      name: 'xunit',
      output: 'testcafe/reports/xunit.xml',
    },
    {
      name: 'html',
      output: 'testcafe/reports/report.html',
    },
  ],
  quarantineMode: false,
  skipJsErrors: true,
  skipUncaughtErrors: true,
  selectorTimeout: 15000,
  assertionTimeout: 15000,
  pageLoadTimeout: 20000,
  speed: 1,
  qrCode: true,
  color: true,
  cache: true,
  stopOnFirstFail: false,
  // eslint-disable-next-line max-params
  filter: function (_, _, _, testMeta, fixtureMeta) {
    const environment = process.env.CHEGG_ENV || 'test';

    if (fixtureMeta.env) {
      if (Array.isArray(fixtureMeta.env)) {
        return fixtureMeta.env.includes(environment);
      }

      return fixtureMeta.env === environment;
    }

    if (!testMeta.env) return true;

    if (Array.isArray(testMeta.env)) {
      return testMeta.env.includes(environment);
    }

    return testMeta.env === environment;
  },
};

Your complete test report

No response

Screenshots

Test hanging with experimental proxyless and live mode together

Screen Shot 2023-02-13 at 4 53 20 PM

Test passing with experimental proxyless and no live mode

Screen Shot 2023-02-13 at 4 54 11 PM

Steps to Reproduce

  1. Run sample test with experimental proxyless and live mode together

TestCafe version

2.3.1

Node.js version

16.17.1

Command-line arguments

yarn testcafe chrome testcafe/tests/sampleTest.ts --experimental-proxyless -L

Browser name(s) and version(s)

Chrome 110.0.0.0

Platform(s) and version(s)

Monterey 12

Other

No response

AlexKamaev commented 1 year ago

Thank you for sharing this information. We are actively working on the --experimental-proxyless functionality, so we are going to research the live mode support as well.

miherlosev commented 1 year ago

Fixed in https://github.com/DevExpress/testcafe/pull/7528.