DevExpress/testcafe

Error when executing tests with Firefox browser

Closed this issue · 8 comments

Are you requesting a feature or reporting a bug?

  • Bug report

What is the current behavior?

  • Error with the following message when running tests with Firefox browser:
    message: The Firefox 55.0.0 / Linux 0.0.0 browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.

Note:

  • Issue is reproducing on both environments:
    • on local machine
    • Travis CI

What is the expected behavior?

  • Tests expected to be passed for popular browser like Chrome, Firefox, Safari
  • Tests expected to be passed when executing on multiply browsers
  • The same behavior should be applied for local machine execution and cloud services

How would you reproduce the current behavior (if this is a bug)?

  • In my cases there is no stable steps to reproduce and issue is quite random but it failed 3 from 5 times on my local machine and each time when executing in Travis CI

Provide the test code and the tested page URL (if applicable)

Tested page URL:
https://www.adtechmedia.io/

Test code

import config from '../../config.cfg';
import libs from '../../libs.cfg';
import Home from '../../poms/pages/home.po';
import RequestDemoModal from '../../poms/forms/demo-modal.po';

fixture`Check "Request a Demo" form submit`
  .page`${config.www_base_host}`
 
test('Check user can submit "Request a demo" form with valid email address', async t => {
  const home = new Home();
  const requestDemoModal = new RequestDemoModal();

  await t
    .click(home.requestDemoModal, { speed: 0.5 })
    .expect(Selector('#modal').with({
      selectorTimeout: 5000,
      visibilityCheck: true,
    }).visible).ok();

  await t
    .typeText(requestDemoModal.emailField, libs.chance.email())
    .typeText(requestDemoModal.nameField, libs.chance.name())
    .click(requestDemoModal.submitButton, { speed: 0.5 });

  await t
    .expect(Selector(requestDemoModal.responseText).with({
      selectorTimeout: 5000,
      visibilityCheck: true,
    }).visible).ok()
    .expect(Selector(requestDemoModal.responseText).innerText).contains('Thank you for the interest in AdTechMedia WordPress Plugin');
});

Specify your environment

  • environment
    • local machine
    • Travis CI
  • operating system:
    • macOS Sierra
  • testcafe version:
    • v0.16.2
  • node.js version:
    • v6.10.3
    • v8.0.0

Hello @avozicov, are you running tests only in Firefox or together in the same time with some other browsers?

Hello @AndreyBelym , sorry I forgot to mention that I am running tests in the same time with Chrome browser. (on local and in Travis CI)

  • Chrome version 60.0.3112.90
  • Firefox version 54.0.1 (64-bit)

Have you monitored resource usage (especially memory) during tests? I would suggest you to try running just one browser, and monitor memory usage. On Linux you can add this:

while true; do free; sleep 3; done &

before testcafe ... in your test command.

@AndreyBelym

I have monitored the resource usage with Firefox browser on my local machine and the result is
~ 4.5gb from 8gb available for memory
When I am running both Firefox and Chrome browsers the memory is encreased up to 5gb from 8gb available

Unfortunately I am not able to perform monitoring for Travis build execution but as far as I know there is at least 16gb memory available

Hello @AndreyBelym ,
I have monitored resource usage for Travis execution, please refer to attachment for more details.

screen shot 2017-08-15 at 18 55 12

Try to use the latest TestCafe version (testcafe@0.19.2) and let us know about your results.

@miherlosev got it, I will come back with updates ;)
thank you!

I will close the issue because no activity has been encountered for a long time.
Feel free to reopen the issue if the problem persists and you can provide an example to reproduce it.