1. Set up your `SAUCE_USERNAME`, `SAUCE_ACCESS_KEY`&`SAUCE_TUNNEL_IDENTIFIER` environment variables.
These are required. You can find the values for `SAUCE_USERNAME` and `SAUCE_ACCESS_KEY` in `/.circleci/env.sh`. `SAUCE_TUNNEL_IDENTIFIER` can be set to any unique value.
If you are having trouble running Saucelabs tests locally you can contact [Joey Perrott](https://github.com/josephperrott) or [Greg Magolan](https://github.com/gregmagolan) for support.
1. On OSX and Windows, you will also need to set `SAUCE_CONNECT` to the path of your `sc` binary (Sauce Connect Proxy).
The `//tools/saucelabs:sauce_service_setup` target does not start the Sauce Connect proxy but it does start the process that then listens for the start signal from the service manager script.
This signal is sent by the karma wrapper script `//tools/saucelabs:karma-saucelabs` which calls `./tools/saucelabs/sauce-service.sh start`.
This is necessary as the Sauce Connect Proxy process must be started outside of `bazel test` as Bazel will automatically kill any processes spawned during a test when that tests completes, which would prevent the tunnel from being shared by multiple tests.
**Q: How do I get the tests to run on IE? I only see Chromium.**
If you see something like this at the end of your test output, it means you're not actually running SauceLabs:
```
INFO: Build completed successfully, 43 total actions
/packages/core/test:test_web_chromium
```
This is a common error caused by forgetting to prefix your test target with "saucelabs_".
For example, `/packages/core/test:test_web` becomes `/packages/core/test:saucelabs_test_web`.
**Q: How can I tell that the SauceLabs connection was successfully made?**
There is a dashboard at saucelabs.com where you can see active tunnel connections (Angular has an account).
As soon as you actually run the test target (not after the setup task), you should see an active tunnel connection under the SAUCE_TUNNEL_IDENTIFICATION_KEY you entered.
If a tunnel connection is not there, you are not actually connecting with SauceLabs.
Note: It may *look* like the tests are running because of the Bazel output.
The progress Bazel is showing does not mean that SauceLabs is connected.
If the tests are actually running, you should see the "..." test report for passing tests.