Test Internal Sites :: Sauce OnDemand
Sauce Connect lets Sauce OnDemand and Sauce Scout users run tests against both private and public servers in a reliable, efficient and secure manner. Even through the public internet.
Sauce Connect creates a secure and reliable tunnel from our cloud to your private network that can only be accessed by you. This eliminates the need to whitelist IPs, open any ports on your firewall or go through any changes in your tests.
Sauce Connect is not only for accessing private servers. If you want all of your test traffic to be secure and reliable, even the Selenium instructions you send to Sauce, you can use Sauce Connect for that too!
Download Sauce Connect
Mac, Linux, BSD, Windows
How it works
Each time you start a Sauce Connect tunnel, a pristine virtual machine is booted in our cloud. Right after, all tests running for the account used to start the tunnel will now transparently navigate and send HTTP requests through this machine. That traffic will then be encrypted and sent through the secure tunnel and into the Sauce Connect script running on your end. Once received, the Sauce Connect script will act as an HTTP proxy, re-issue these requests and encrypt and deliver responses back. No tests other than yours will have access to that machine or tunnel, and as soon as you're done testing, the machine is destroyed and your tests' go back to using the public internet for browsing.
Features
- Ease Of Use
- Using Sauce Connect requires no special URLs or extra configurations to your tests or web server. Just download, run and enjoy!
- Reliability
- We've built a relay engine inside Sauce Connect, which ensures a fully reliable connection even through unreliable channels, such as the public internet.
- Security
- Every bit of information that travels through Sauce Connect is fully encrypted. We take security *very* seriously and will always keep your data safe and secure.
- Efficiency
- Sauce Connect maintains a smart cache in our side of the tunnel, allowing us to pull static content such as images, css or js files only once for all your tests. This considerably reduces traffic through the tunnel and relieves your web server of excess load.
Get Started!
- Download Sauce Connect
- Unzip Sauce-Connect-latest.zip
- On the command line in the directory you unziped Sauce-Connect-latest.zip
into, run:
java -jar Sauce-Connect.jar YOUR-SAUCE-USERNAME YOUR-SAUCE-API-KEY
- When you see Connected! You may start your tests, you're ready to go.
You don't need to run Sauce Connect on the same system that is running your tests and you only need to run one instance of Sauce Connect per account or sub-account.
How about securing Selenium commands?
Sauce Connect makes the connection more secure and reliable between:
- Our cloud browsers and your web server
- Your test scripts and Sauce OnDemand
The first happens automatically as soon as you start Sauce Connect and for all the tests running under your Sauce account.
The second, which is optional, happens by pointing your Selenium scripts to the
IP address of the machine running Sauce Connect and port 4445 (start Sauce
Connect with the -P flag to change the port).
Requirements
Outgoing ports 80 and 443 are open from your network
These are the standard HTTP and HTTPS ports and open by default on most corporate firewalls
Server specs depending on your usage
Sauce Connect does many things on your end, and the amount of resources it requires correlates to the number of parallel tests that your account is running in our service.
CPU and RAM
A standard development machine is enough for a temporary Sauce Connect instance and using our service with 30 tests in parallel or less. As soon as your usage increases and you run more tests on a regular basis, we recommend using a server-like box to host Sauce Connect more reliably.
Our spec requirements are not as stringent, but 4Ghz CPU and 8G RAM are good ballpark numbers.
File descriptors
If you want Sauce Connect to be able to handle a large number of parallel tests, you'll need to have a reasonably high ulimit (4096 or 8192 would be reasonable). If you're running 100 tests in parallel or more, you should also consider placing Sauce Connect in a dedicated server.
On unix-based boxes, you can use ulimit -a to check your
current values (focus on file descriptors). Different platforms have
different ways to change this. For more information, we recommend
google as a good place start.
Troubleshooting
Accessing applications on localhost
Sauce Connect proxies localhost ports 80, 443, 888, 2000, 2001, 2020, 2222, 3000, 3001, 3030, 3333, 4000, 4001, 4040, 4502, 4503, 5000, 5001, 5050, 5555, 6000, 6001, 6060, 6666, 7000, 7070, 7777, 8000, 8001, 8003, 8080, 8888, 9000, 9001, 9090, 9999 so when you use it, your local web apps are available to test as if the cloud was your local machine. Easy!
Do you need a different port? Please let us know!
Starting Sauce Connect from behind a proxy
As the traffic being sent through Sauce Connect is far from regular HTTP (Sauce Connect encrypts everything and uses a more robust protocol to make sure everything makes it to the other end), it can't be sent through HTTP proxies.
If the current environment you're testing with requires you to proxy your
outgoing traffic, you should discuss with your ops team or IT department about
making an exception for outgoing traffic over ports 80 and 443 to
*.saucelabs.com.
This doesn't need to be for the complete network, only for the machine you intend to run Sauce Connect on.
SSL errors
If you see SSL errors in your test videos or screenshots, try adding
-Dhttps.protocols="SSLv3,SSLv2Hello" to your Sauce Connect command
line in the following way:
java -jar -Dhttps.protocols="SSLv3,SSLv2Hello" Sauce-Connect.jar YOUR-SAUCE-USERNAME YOUR-SAUCE-API-KEY
Getting help
Have questions or need help with Sauce Connect? Please ask in our forums!
