Plugin for starting up a Cross Browser Testing tunnel when running tests with Gemini
Based on original source code from https://github.com/Saulis/gemini-browserstack
Works with gemini v1.0.0 or later.
npm install gemini-cbt
- All parameters supported by cbt_tunnels (https://www.npmjs.com/package/cbt_tunnels)
- username (optional) sets the username for CBT. Defaults to environmental variable CBT_USERNAME
- authkey (optional) sets the authkey for CBT. Defaults to environmental variable CBT_ACCESS_KEY
Example configuration for your .gemini.yml
rootUrl: http://localhost:8080/home
gridUrl: http://this.address.is.ignored/so-anything-goes
system:
plugins:
cbt:
username: foo
authkey: bar
quiet: true
tunnelname: foobar
browsers:
win10_edge17:
desiredCapabilities:
browserName: 'MicrosoftEdge'
version: '17'
platform: 'Windows 10'
screenResolution: '1366x768'
record_video: 'true'
record_network: 'true'
macos10_safari11:
desiredCapabilities:
browserName: 'Safari'
version: '11'
platform: 'Mac OSX 10.13'
screenResolution: '1366x768'
You can provide the following environment variables to override the default configs
CBT_USERNAME
- username for crossbrosertesting.com accountCBT_AUTHKEY
- authentication key for crossbrosertesting.com accountCBT_ID
- Add an id to test nameCBT_QUIET
- start tunnel in quiet modeCBT_BUILD
- to associate the tests with a specific build in crossbrowsertesting.comCBT_TUNNEL_NAME
- to create a named tunnelCBT_MAX_DURATION
- max duration for the testCBT_RECORD_VIDEO
- record video for testsCBT_RECORD_NETWORK
- record network data for tests
Here is an example npm run update
command for updating screenshots
CBT_USERNAME=xyz@example.com CBT_AUTHKEY=abcd123xyz CBT_BUILD="`git log --pretty=format:'%h' -n 1` - `date +%r`" npm run update