Skip to content

InputOutput/browserstack-local-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

browserstack-local-php

Build Status

Setup

Installation is possible using Composer.

If you don't already use Composer, you can download the composer.phar binary:

curl -sS https://getcomposer.org/installer | php

Then install the library:

`php composer.phar require browserstack/local:dev-master`

Install all depenedencies: php composer.phar install

Test the installation by running a simple test file, check out example.php in the main repository.

API

Constructor

  • new Local(): creates an instance of Local

Methods

  • start(options): starts Local instance with options. The options available are detailed below.
  • stop(): stops the Local instance
  • isRunning(): checks if Local instance is running

Options

  • key: BrowserStack Access Key
  • v: Provides verbose logging
  • f: If you want to test local folder rather internal server, provide path to folder as value of this option
  • force: Kill other running Browserstack Local
  • only: Restricts Local Testing access to specified local servers and/or folders
  • forcelocal: Route all traffic via local machine
  • onlyAutomate: Disable Live Testing and Screenshots, just test Automate
  • proxyHost: Hostname/IP of proxy, remaining proxy options are ignored if this option is absent
  • proxyPort: Port for the proxy, defaults to 3128 when -proxyHost is used
  • proxyUser: Username for connecting to proxy (Basic Auth Only)
  • proxyPass: Password for USERNAME, will be ignored if USERNAME is empty or not specified
  • localIdentifier: If doing simultaneous multiple local testing connections, set this uniquely for different processes
  • hosts: List of hosts and ports where Local must be enabled for eg. localhost,3000,1,localhost,3001,0
  • logfile: Path to file where Local logs be saved to
  • binarypath: Optional path to Local binary

Test

Testing is possible using PHPUnit.

To run the tests, run the command: phpunit

About

PHP bindings for BrowserStack Local

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%