Skip to content

Instantly share code, notes, and snippets.

@kylenstone
Created August 17, 2013 12:26
Show Gist options
  • Save kylenstone/6256676 to your computer and use it in GitHub Desktop.
Save kylenstone/6256676 to your computer and use it in GitHub Desktop.
Small bash script to configure Browserstack and open a new test window in a browser
#!bin/bash
# BrowserStack SSH Tunnel Setup
# Find key by logging into BrowserStack --> finding command line setup info
KEY=[YOUR_KEY_HERE]
# Add internal hosts here
INTERNAL_HOSTS=stgwebus
# Change argument to add +1 internal host: ${host}.[hostname].com,80,0,${host}.example.com,443,1
for host in ${INTERNAL_HOSTS[@]} ; do
TUNNEL_OPTIONS="${TUNNEL_OPTIONS}${TUNNEL_OPTIONS:+,}$"{host}.example.com/us/",80,0"
done
open 'http://www.browserstack.com/start#os=Windows&os_version=8&browser=IE&browser_version=8.0&url=stgwebus.example.com&resolution=1280x1024&speed=2'
java -jar BrowserStackTunnel.jar $KEY $TUNNEL_OPTIONS
@kylenstone
Copy link
Author

subdirectory on URL (e.g. server.example.com_/us/_) is not fully working. This would be helpful because it avoids spawning a browser window with a test URL that must immediately be further specified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment