Skip to content

Windows fixes #101

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

Merged
merged 2 commits into from
Jul 12, 2015
Merged

Conversation

nording
Copy link

@nording nording commented Dec 9, 2014

Changed to BrowserStackLocal.exe instead of the jar-file.
The tunnel process is now killed when the tests are complete.
Before when using the jar-file the tunnel processes still were alive in the background after the test were completed. Which created problem the next time you ran the tests, your worker then never received the "Acknowledge" state,

Added path fix for Windows, it now works with "/" on Windows in the "test_path" config.

Fixed the Process signals to work on Windows, before you never got to the method "cleanUpAndExit" in cli.js because of how Process.kill works on Windows. It now runs "cleanUpAndExit" before exiting the process as expected.

…process is now killed when the tests are complete.

Added path fix for Windows, it now works with "/" on Windows in the "test_path" config.
Fixed the Process signals to work on Windows.
@@ -120,7 +120,7 @@ function launchServer() {
}

function launchBrowser(browser, path) {
var url = 'http://localhost:' + serverPort.toString() + '/' + path;
var url = 'http://localhost:' + serverPort.toString() + '/' + path.replace(/\\/gi, '/');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all you're replacing is a backslash, you don't need to ignore case, right? Could drop the i flag.

@jzaefferer
Copy link
Contributor

Did a test run with this branch on OSX, didn't notice any regressions. Also did a code review. Didn't notice anything serious, mostly style issues.

PS: Looks like this replaces the two branches, win_binary and windowsexe. Can delete those.

@nording
Copy link
Author

nording commented Dec 11, 2014

I have updated the code with the styling and regexp fixes.

@jzaefferer
Copy link
Contributor

Looks good to me.

This was referenced Jun 5, 2015
@jzaefferer
Copy link
Contributor

I tested this on Windows 7 with the following browserstack.json (after running git submodule update --init), executing node bin\cli.js:

{
  "username": "<username>",
  "key": "<key>",
  "test_framework": "qunit",
  "test_path": ["tests/external-repos/underscorejs/test/index.html"],
  "browsers":   [{
    "browser": "firefox",
    "browser_version": "15.0",
    "device": null,
    "os": "OS X",
    "os_version": "Snow Leopard"
  }]
}

It passes on OSX, but on Windows gets stuck forever after outputting "Launching 1 worker(s) for 1 run(s)".

@Sanox @bgaillard could one of you look into that?

@jzaefferer
Copy link
Contributor

About five seconds after posting that the runner timed out. Looking at browserstack.com/automate, it seems like the test passed, but it failed to post the result back to the runner. Since the same test passed on OSX, it might be a Windows specific problem.

Also tried with "firefox_latest" (dunno why I was using such an old config with FF15), now some tests fail, but the runner still times out eventually.

@nording
Copy link
Author

nording commented Jun 22, 2015

I have seen the time out issue on Linux as well.
When it happens it's always browsers on OS X that causes it.
I have seen it with Firefox and Safari on OS X Yosemite and OS X Mavericks.
When I check browserstack.com/automate the screenshot just show a blank page.

But I have found a workaround for browser sessions that is showing a blank page and eventually will time out. The workaround is to join that session via the link "Interactive session" and reload the browser page, then it runs the tests and report the result back.

Maybe there is a browserstack issue with OS X that causes it?

@jzaefferer
Copy link
Contributor

I've contacted the BrowserStack team to ask for help.

@nakula
Copy link
Contributor

nakula commented Jul 2, 2015

yep, onto it

@nakula
Copy link
Contributor

nakula commented Jul 2, 2015

i ran underscorejs tests 10 times, and I could reproduce stuck safari in 10th time. Let me dig more.

@nakula
Copy link
Contributor

nakula commented Jul 3, 2015

so I have run some 100 tests on safari8,safari7 post that one test and not able to reproduce at all. I am using 32bit windows machine. Any particular way to reproduce it?

@nakula
Copy link
Contributor

nakula commented Jul 4, 2015

@Sanox @jzaefferer you guys face this quite a lot, or was one off? + I don't think this is related to this pull request per se. what do you suggest?

@jzaefferer
Copy link
Contributor

I just repeated the test I described above, with "test_path": ["tests/external-repos/underscorejs/test/index.html"], and "firefox_latest" as the only browser. I get "Launching 1 worker(s) for 1 run(s)", then nothing happens. Looking at /automate I see that the test finished running (failed), but apparently it doesn't report back.

I also connected to the worker and reloaded the page with developer tools open, but didn't see any errors logged on the console.

I also tried to run the QUnit testsuite via its browserstack.json, with a global install (from the Sanox repo; also tried regular install, same result), but that just outputs two line breaks and nothing else, exiting pretty much immediately.

I'm testing with node v0.10.24 (npm 1.3.21) on Windows 7 64-bit, Java SE is 1.8.0_40-b26.

@nakula if you're still unable to reproduce any of the issues, it might be good to just merge this PR and do a release, then see if anyone who's actually using Windows still has problems.

@nakula
Copy link
Contributor

nakula commented Jul 11, 2015

I think original issue was: page gets stuck at loading the page and hence the blank screenshot. On reloading the page via Automate dashboard - makes it work.

Now, since this happens pretty rarely but in those cases we never get "worker - Acknowledged" in verbose as well. Do you think we can put retry in these cases? reload the url and see if it works?

I will make separate issue for implementing it and merge this meanwhile.

Now, issue you reported above looks different. Can you re-run in verbose mode once? I have seen that issue when downloaded binary for BrowserStack local is not able to run for some issue.

9ikhan added a commit that referenced this pull request Jul 12, 2015
@9ikhan 9ikhan merged commit 1527a3e into browserstack:master Jul 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants