> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# saucelabs/sauce-connect

Encapsulates interactions with Sauce Connect Proxy The source repo for this ORB can be found here: https://github.com/saucelabs-sample-test-frameworks/CircleCI-SauceLabs-ORB


## Commands

### install

| Parameter | Type | Default | Description |
|---|---|---|---|
| `version` | string | 4.5.1 | You can specify which version of Sauce Connect Proxy to use. |

### open_tunnel

| Parameter | Type | Default | Description |
|---|---|---|---|
| `tunnel_identifier` | string |  | This desired capability will let the test job use any shared tunnels available from the specified parent account. i.e. any account that is upstream in the hierarchy. If using a shared tunnel, you must specify both tunnelIdentifier and parentTunnel. |

### close_tunnel

## Jobs

### with_proxy

Use Sauce Connect with a Proxy

| Parameter | Type | Default | Description |
|---|---|---|---|
| `docker` | string | circleci/openjdk:8 |  |
| `tunnel_identifier` | string |  | Name your Sauce Connect tunnel make sure to use the tunnelIdentifier desired capability in your test script |
| `version` | string | 4.5.1 |  |
| `steps` | steps |  | Steps to execute once the Sauce Connect Tunnel is available |

## Examples

### simple_test

Open a named saucelabs tunnel before running mvn verify

```yaml
version: 2.1
orbs:
  saucelabs: saucelabs/connect@volatile
workflows:
  basic_workflow:
    jobs:
      - saucelabs/with_proxy:
          steps:
            - run: mvn verify -B
```

### parallel_tunnels

Open a named saucelabs tunnel before running mvn verify

```yaml
version: 2.1
orbs:
  saucelabs: saucelabs/connect@volatile
workflows:
  browser_tests:
    jobs:
      - saucelabs/with_proxy:
          name: Chrome Tests
          steps:
            - run: mvn verify -B -Dsauce.browser=chrome  -Dsauce.tunnel="chrome"
          tunnel_identifier: chrome
      - saucelabs/with_proxy:
          name: Safari Tests
          steps:
            - run: mvn verify -B -Dsauce.browser=safari  -Dsauce.tunnel="safari"
          tunnel_identifier: safari
```