Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 2.76 KB

README.md

File metadata and controls

54 lines (41 loc) · 2.76 KB

phpunit-browserstack

PHPUnit Integration with BrowserStack

BrowserStack Logo

Prerequisites

  1. Make sure that you have PHP installed on your system. You can download and install PHP using following commands in the terminal:
  • MacOS:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    brew install php
  • Windows:
    sudo apt-get install curl libcurl3 libcurl3-dev php
    Note: For Windows, you can download PHP from here. Also, refer to this documentation for ensuring the accessibility of PHP through the Command Prompt.
  1. Download composer in the project directory (Linux/MacOS, Windows).

    Note: To use the composer command directly, it either should have been downloaded in the project directory or should be accessible globally which can be done by the command below:

    mv composer.phar /usr/local/bin/composer

Setup

Running your tests

  • To run tests, run: composer test
  • To run local tests, run: composer local

Understand how many parallel sessions you need by using our Parallel Test Calculator

Notes

  • You can view your test results on the BrowserStack Automate dashboard

  • To test on a different set of browsers, check out our platform configurator

  • You can export the environment variables for the Username and Access Key of your BrowserStack account

    export BROWSERSTACK_USERNAME=<browserstack-username> &&
    export BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
    

Additional Resources