testcafe-browser-provider-browserstack icon indicating copy to clipboard operation
testcafe-browser-provider-browserstack copied to clipboard

closeBrowser is not called in browserstack when the test is in the queue

Open hex0cter opened this issue 6 years ago • 5 comments

What is your Test Scenario?

Running some test on browserstack when the allowed parallel tests have reached it upper limit.

What is the Current behavior?

Browser is not closed when trying to kill a test that is in the queue.

What is the Expected behavior?

Browser should be closed regardless whether the test is running or in a queue.

What is your web application and your TestCafe test code?

Any simple test should be fine.

Steps to Reproduce:

  1. Prepare some tests written in testcafe, link the dependency of testcafe-browser-provider-browserstack to this updated repo.
  2. Prepare a test account in browserstack
  3. Run some tests and make sure it browserstack reaches its subscription limitation.
  4. Start a new test, for example
$ yarn testcafe browserstack:ie my-test.js
yarn run v1.10.1
$ /Users/daniel.han/git/.../node_modules/.bin/testcafe browserstack:ie tests/functional/my-test.js
⠙
Daniel Han >>>>>>>>> init
⠴
Daniel Han >>>>>>>>> isValidBrowserName ie
⠦
Daniel Han >>>>>>>>> openBrowser y_KXdxg http://10.3.222.225:56298/browser/connect/y_KXdxg ie

At this monent the new test will be saved into a queue of browserstack (due to a bug in browserstack the size of queue can be infinite, but don't bother about that for now)

  1. Kill the test by killall node Normally when the you kill a running job, closeBrowser will be called. But in this case, when the job is in the queue, it will not be called. As a result the test will be hanging on browserstack for 30 minutes until the whole session times out.

For more information about the debugging code please check out here: https://github.com/hex0cter/testcafe-browser-provider-browserstack

hex0cter avatar Apr 30 '19 15:04 hex0cter

Hi @hex0cter

Thank you for the example. It helped us debug your use case. We need some time to investigate it more deeply.

miherlosev avatar May 02 '19 09:05 miherlosev

@miherlosev - Do we have any update on this thread?

ckzgraphics avatar Jul 25 '19 14:07 ckzgraphics

Unfortunately, we need to heavily rewrite our browser handling pipeline to fix this issue. Could you please share more details about this issue? If I understood correctly, it happens only if you cancel a TestCafe session that waits for a browser from BrowserStack?

AndreyBelym avatar Jul 26 '19 09:07 AndreyBelym

That is correct @AndreyBelym

hex0cter avatar Feb 26 '20 08:02 hex0cter

@hex0cter

Thank you for the provided information. We will continue working on this issue.

miherlosev avatar Feb 26 '20 14:02 miherlosev

This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.

github-actions[bot] avatar Dec 10 '22 02:12 github-actions[bot]

We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you.

github-actions[bot] avatar Dec 21 '22 01:12 github-actions[bot]