previousnext / browserstack
PHP Library for using Browerstack API.
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:console
Requires
- ksenzee/browserstack-screenshots-php: dev-master
- symfony/console: v2.5.3
Requires (Dev)
- herrera-io/phar-update: ~1.0
- kherge/box: ~2.4
- phpunit/phpunit: 4.4.*@dev
- satooshi/php-coveralls: v0.6.1
This package is not auto-updated.
Last update: 2021-02-01 13:48:00 UTC
README
Overview
Symfony console task for BrowserStack with Phing integration.
Installation
Install the dependencies with Composer:
require "previousnext/browserstack": "dev-master"
Now you are ready to rock!
Usage
Configuration file
BrowserStack requires a set of browsers. We require a set of URL's to screenshot.
So we use a configuration file.
An example of the configuration file looks like the following:
{
"paths": [
"about",
],
"browsers": [
{ "os": "Windows", "os_version": "7", "browser_version": "19.0", "browser": "firefox" },
{ "os": "Windows", "os_version": "7", "browser_version": "20.0", "browser": "firefox" },
{ "os": "Windows", "os_version": "7", "browser_version": "10.0", "browser": "ie" },
{ "os": "Windows", "os_version": "7", "browser_version": "9.0", "browser": "ie" },
{ "os": "Windows", "os_version": "7", "browser_version": "8.0", "browser": "ie" },
{ "os": "Windows", "os_version": "7", "browser_version": "28.0", "browser": "chrome" }
]
}
The Symfony command will pick up this file in the current running directory.
Command
Basic usage:
$ bin/BrowserStack snapshot --username="USERNAME" --password="PASSWORD" --domain="DOMAIN"
Override config file location
$ bin/BrowserStack snapshot --username="USERNAME" --password="PASSWORD" --domain="DOMAIN" --config="PATH TO CONFIG"
Tunnel
$ bin/BrowserStack snapshot --username="USERNAME" --password="PASSWORD" --domain="DOMAIN" --tunnel
Phing
Authentication
Setup local configuration eg. Secret credentials, domain and tunnel support.
browserstack.user=secret
browserstack.pass=secret
browserstack.domain=http://foo.com
browserstack.tunnel=true
Usage
Make sure to check why Phing tasks are available via phing -L
phing browserstack:snapshot