grunt-webdriver
Advanced tools
Comparing version
@@ -5,3 +5,3 @@ module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
// Configuration to be run (and then tested). | ||
@@ -26,3 +26,3 @@ webdriver: { | ||
name: 'grunt-webdriver test', | ||
build: process.env.TRAVIS_BUILD_NUMBER || '008' | ||
build: process.env.TRAVIS_BUILD_NUMBER | ||
} | ||
@@ -49,3 +49,3 @@ } | ||
options: { | ||
desiredCapabilities: { | ||
desiredCapabilities: { | ||
browserName: 'phantomjs' | ||
@@ -52,0 +52,0 @@ } |
{ | ||
"name": "grunt-webdriver", | ||
"description": "grunt-webdriver is a grunt plugin to run selenium tests with Mocha and WebdriverIO", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"homepage": "https://github.com/webdriverio/grunt-webdriver", | ||
@@ -38,3 +38,3 @@ "author": { | ||
"sauce-tunnel": "^2.2.3", | ||
"selenium-standalone": "^4.4.0", | ||
"selenium-standalone": "^4.4.2", | ||
"deepmerge": "^0.2.7", | ||
@@ -41,0 +41,0 @@ "hooker": "^0.2.3", |
@@ -58,6 +58,5 @@ # grunt-webdriver [](https://travis-ci.org/webdriverio/grunt-webdriver) | ||
#### example using [Sauce Labs](https://saucelabs.com) | ||
#### Example using [Sauce Labs](https://saucelabs.com) | ||
If you specify a `tunnel-identifier` within your `desiredCapabilities` object, the task | ||
will automatically try to establish a tunnel connection via [Sauce Connect](https://saucelabs.com/docs/connect). | ||
To use a cloud service like [Sauce Labs](https://saucelabs.com) make sure you define `host` and `port` properties like in the example below as well as authenticate yourself with your username and key. | ||
@@ -75,4 +74,33 @@ ```js | ||
version: '27', | ||
platform: 'XP' | ||
} | ||
}, | ||
login: { | ||
tests: ['test/spec/login/*.js'] | ||
}, | ||
form: { | ||
tests: ['test/spec/form/*.js'] | ||
} | ||
// ... | ||
}, | ||
}) | ||
``` | ||
#### Example using [Sauce Connect](https://saucelabs.com/docs/connect) | ||
If you specify a `tunnel-identifier` within your `desiredCapabilities` object, the task | ||
will automatically try to establish a tunnel connection via [Sauce Connect](https://saucelabs.com/docs/connect). With the `tunnel-flags` property you can pass [command line options](https://docs.saucelabs.com/reference/sauce-connect/#command-line-options) to the created Sauce Tunnel. | ||
```js | ||
grunt.initConfig({ | ||
webdriver: { | ||
options: { | ||
user: SAUCE_USERNAME, | ||
key: SAUCE_ACCESS_KEY, | ||
desiredCapabilities: { | ||
browserName: 'chrome', | ||
version: '27', | ||
platform: 'XP', | ||
'tunnel-identifier': 'my-tunnel' | ||
'tunnel-identifier': 'my-test-tunnel', | ||
'tunnel-flags': [ '-vv', '-l sauce_connect_tech_support.log' ] | ||
} | ||
@@ -258,1 +286,2 @@ }, | ||
* 2015-04-26 v0.5.1 better handling of different environments - closes [webdriverio/webdriverio#506](https://github.com/webdriverio/webdriverio/issues/506) | ||
* 2015-06-04 v0.5.2 update selenium-standalone dependency |
@@ -0,1 +1,3 @@ | ||
'use strict'; | ||
var Mocha = require('mocha'), | ||
@@ -23,4 +25,3 @@ SauceLabs = require('saucelabs'), | ||
var that = this, | ||
done = this.async(), | ||
var done = this.async(), | ||
base = process.cwd(), | ||
@@ -48,3 +49,3 @@ options = this.options({ | ||
var queue = grunt.task._queue.filter(function(task) { | ||
return typeof task.placeholder === 'undefined' | ||
return typeof task.placeholder === 'undefined'; | ||
}); | ||
@@ -150,4 +151,4 @@ | ||
cb.apply(null, args); | ||
} | ||
} | ||
}; | ||
}; | ||
@@ -373,3 +374,3 @@ async.waterfall([ | ||
grunt.fail.warn(err); | ||
} | ||
}; | ||
@@ -376,0 +377,0 @@ if(sessionID) { |
Sorry, the diff of this file is not supported yet
27864
3.62%829
76.38%285
11.33%Updated