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.
new Local()
: creates an instance of Local
start(options)
: starts Local instance with options. The options available are detailed below.stop()
: stops the Local instanceisRunning()
: checks if Local instance is running
key
: BrowserStack Access Keyv
: Provides verbose loggingf
: If you want to test local folder rather internal server, provide path to folder as value of this optionforce
: Kill other running Browserstack Localonly
: Restricts Local Testing access to specified local servers and/or foldersforcelocal
: Route all traffic via local machineonlyAutomate
: Disable Live Testing and Screenshots, just test AutomateproxyHost
: Hostname/IP of proxy, remaining proxy options are ignored if this option is absentproxyPort
: Port for the proxy, defaults to 3128 when -proxyHost is usedproxyUser
: Username for connecting to proxy (Basic Auth Only)proxyPass
: Password for USERNAME, will be ignored if USERNAME is empty or not specifiedlocalIdentifier
: If doing simultaneous multiple local testing connections, set this uniquely for different processeshosts
: List of hosts and ports where Local must be enabled for eg. localhost,3000,1,localhost,3001,0logfile
: Path to file where Local logs be saved tobinarypath
: Optional path to Local binary
Testing is possible using PHPUnit.
To run the tests, run the command:
phpunit