The Wayback Machine - https://web.archive.org/web/20200909234832/https://github.com/DevExpress/testcafe-browser-provider-browserstack/issues/74
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

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

Open
hex0cter opened this issue Apr 30, 2019 · 5 comments
Open
Labels

Comments

@hex0cter
Copy link

@hex0cter hex0cter commented Apr 30, 2019

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

@miherlosev miherlosev transferred this issue from DevExpress/testcafe May 2, 2019
@miherlosev
Copy link

@miherlosev miherlosev commented May 2, 2019

Hi @hex0cter

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

@ckzgraphics
Copy link

@ckzgraphics ckzgraphics commented Jul 25, 2019

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

@AndreyBelym
Copy link
Collaborator

@AndreyBelym AndreyBelym commented Jul 26, 2019

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?

@hex0cter
Copy link
Author

@hex0cter hex0cter commented Feb 26, 2020

That is correct @AndreyBelym

@miherlosev
Copy link

@miherlosev miherlosev commented Feb 26, 2020

@hex0cter

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

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