Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Using Identified Tunnels with Sauce Connect

Anthony Woo edited this page May 13, 2014 · 3 revisions

Identified Tunnels?

Using identified tunnels, you can start multiple instances of Connect that will not collide with each other and will not make your tests' traffic transparently tunnel through. This allows you to test different localhost servers or access different networks from different tests (a common requirement when running tests on TravisCI.)

Starting an Identified Tunnel

Simply start Sauce Connect using the -i flag (or --tunnel-identifier) and provide your own unique identifier string, eg

java -jar Sauce-Connect.jar YOUR-SAUCE-USERNAME YOUR-SAUCE-API-KEY -i "NameRankAndSerialNumber"

You can also set connect_options in your test config to start an identified tunnel

Sauce.config do |c|
  c[:start_tunnel] = true
  c[:connect_options] = { "i" => "NameRankAndSerialNumber" }
end

Making your Scripts use an Identified Tunnel

# spec/spec_helper.rb or wherever your test config is
Sauce.config do |c|
  c["tunnel-identifier"] = "NameRankAndSerialNumber"
end

More Information

For more information, check out Sauce Labs' Sauce Connect page.