README.md
WDIO Sauce Labs Service
=======================
[![Code Climate](https://codeclimate.com/github/webdriverio/wdio-sauce-service/badges/gpa.svg)](https://codeclimate.com/github/webdriverio/wdio-sauce-service) [![dependencies Status](https://david-dm.org/webdriverio/wdio-sauce-service/status.svg)](https://david-dm.org/webdriverio/wdio-sauce-service)
***
> A WebdriverIO service. It updates the job metadata ('name', 'passed', 'tags', 'public', 'build', 'custom-data') and runs Sauce Connect if desired.
## Installation
The easiest way is to keep `wdio-sauce-service` as a devDependency in your `package.json`.
```json
{
"devDependencies": {
"wdio-sauce-service": "~0.4.4"
}
}
```
You can simple do it by:
```bash
npm install wdio-sauce-service --save-dev
```
Instructions on how to install `WebdriverIO` can be found [here.](http://webdriver.io/guide/getstarted/install.html)
## Configuration
In order to use the service you need to set `user` and `key` in your `wdio.conf.js` file. It will automatically
use Sauce Labs to run your integration tests. If you want to use [Sauce Connect](https://wiki.saucelabs.com/display/DOCS/Sauce+Connect+Proxy)
you just need to set `sauceConnect: true`.
```js
// wdio.conf.js
export.config = {
// ...
services: ['sauce'],
user: process.env.SAUCE_USERNAME,
key: process.env.SAUCE_ACCESS_KEY,
sauceConnect: true,
// ...
};
```
## Options
### user
Your Sauce Labs username.
Type: `String`
### key
Your Sauce Labs access key.
Type: `String`
### sauceConnect
If true it runs Sauce Connect and opens a secure connection between a Sauce Labs virtual machine running your browser tests.
Type: `Boolean`<br>
Default: `false`
### sauceConnectOpts
Apply Sauce Connect options (e.g. to change port number or logFile settings). See [this list](https://github.com/bermi/sauce-connect-launcher#advanced-usage) for more information.
Type: `Object`<br>
Default: `{}`
## Development
All commands can be found in the package.json. The most important are:
Watch changes:
```sh
$ npm run watch
```
Run tests (there are non yet, please help to get unit test - see [here](https://github.com/webdriverio/wdio-sauce-service/issues/1)):
```sh
$ npm test
```
Build package:
```sh
$ npm build
```
----
For more information on WebdriverIO see the [homepage](http://webdriver.io).