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

Ability to tell the browser to connect to a specific host and port. #96

Merged
merged 1 commit into from Jan 10, 2020

Conversation

@eugeneware
Copy link
Contributor

eugeneware commented Sep 20, 2014

When using the testling command to test browsers running in Virtual Machines (ie. IE), the URL that gets generated is always localhost. This will resolve to localhost in the VM, which obviously won't work.

This PR allows you to override the hostname that is provided to the browser when it is launched, as well as the port too.

I'm using testling with the iectrl command line tool to automatically launch IE in a VirtualBox VM, and then to pass it the URL, like so:

# run test in ie9 and then close the browser (10.0.2.2 is the host IP that ievms initializes)
$ browserify test/ie.js | testling --host=10.0.2.2 -x 'iectrl open -s 9'; iectrl close

It's also useful to be able to hard code the port if you are continually debugging a test, so you can just refresh the browser with the same port rather than use the randomly assigned ports.

# listen on port 9000
$ browserify test/ie.js | testling --host=10.0.2.2 --port 9000 -u
http://10.0.2.2:9000/__testling?show=true
…ort.

Fixes #78. Closes #115.
@eugeneware

This comment has been minimized.

Copy link
Contributor Author

eugeneware commented Sep 20, 2014

Someone else has requested the --port option too in #78

@ljharb

This comment was marked as resolved.

Copy link
Collaborator

ljharb commented Jan 10, 2020

@eugeneware would you mind checking "allow edits" on the RHS of this PR?

@eugeneware

This comment was marked as resolved.

Copy link
Contributor Author

eugeneware commented Jan 10, 2020

@ljharb done!

@ljharb ljharb force-pushed the eugeneware:custom_host_port branch 3 times, most recently from 9d339a1 to 907c514 Jan 10, 2020
@ljharb
ljharb approved these changes Jan 10, 2020
Copy link
Collaborator

ljharb left a comment

Thanks!

@ljharb ljharb merged commit 907c514 into substack:master Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.