Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel Run is not working #27

Open
sunilphilip14 opened this issue Apr 17, 2019 · 6 comments

Comments

@sunilphilip14
Copy link

commented Apr 17, 2019

Hi,

I have tried running using the param '--parallel' and enabling concurrency in TestCafe but I'm getting an error saying:

Error: listen EADDRINUSE: address already in use :::1338

Is this an issue with TestCafe/CucumberJS?

Cheers
S

@rquellh

This comment has been minimized.

Copy link
Owner

commented Apr 22, 2019

This is an issue with my implementation. In the hooks file under the test runner I am setting the port number. The issue is once one test finishes it takes awhile for the test controller to "release" the port, but my test doesn't wait for the release it just starts the next port through the iterator. My guess is this is where it's tripping up. I probably need to wrap the runner in a promise, but I haven't looked into it.

@sunilphilip14

This comment has been minimized.

Copy link
Author

commented Apr 23, 2019

Thanks @rquellh It would be really appreciated if you could check it sometime. We have a lot of tests and usually takes around 2+ hrs to finish. Parallel run is something we would be needing in the near future to handle the growing number of tests.

@garlapatiVijay

This comment has been minimized.

Copy link

commented May 30, 2019

@rquellh Thanks for the comment. Do we have any estimated fix date that we can rely on for the fix? I unfortunately raised similar kind of issue #30

Thanks for the support.

@sunilphilip14

This comment has been minimized.

Copy link
Author

commented May 30, 2019

Hi @garlapatiVijay , in hooks.js, I changed 'createTestCafe('localhost', 1338 + iteration, 1339 + iteration)' to 'createTestCafe('localhost')' thereby removing the forced port assignment. This will assign the port randomly. I was able to run upto 3 parallel tests but the unlinking of test.js file needs to be handled correctly. I haven't had a chance to clean up the code yet.

Note: I'm using cucumber parallel option and NOT the TestCafe concurrency

@garlapatiVijay

This comment has been minimized.

Copy link

commented May 30, 2019

Hi @garlapatiVijay , in hooks.js, I changed 'createTestCafe('localhost', 1338 + iteration, 1339 + iteration)' to 'createTestCafe('localhost')' thereby removing the forced port assignment. This will assign the port randomly. I was able to run upto 3 parallel tests but the unlinking of test.js file needs to be handled correctly. I haven't had a chance to clean up the code yet.

Note: I'm using cucumber parallel option and NOT the TestCafe concurrency

Thank you for the update @sunilphilip14.

It works fine with createTestCafe('localhost') and in my case I'm trying to execute using NPM run command with the keyword concurrently in windows.

@glitchassassin

This comment has been minimized.

Copy link

commented Jul 22, 2019

I've created a pull request with the steps I took to make this run in parallel. It's still not perfect, however:

  1. Sometimes the TestCafe controller times out during the Before hook.
  2. Sometimes TestCafe fails to destroy the temporary Chrome profile during the After hook, saying the lockfile is in use.

When this happens, the Scenario currently being run is recorded as Undefined.

Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.