previousnext/browserstack

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP Library for using Browerstack API.

0.0.3 2014-10-08 01:07 UTC

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