Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Extension of PHPUnit_Selenium providing Sauce OnDemand integration for PHPUnit.

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 PHPUnit Adding the missing driver March 08, 2013
Octocat-spinner-32 Tests
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 autoupdate_package.py
Octocat-spinner-32 get_release.py
Octocat-spinner-32 package.xml
Octocat-spinner-32 pearsauce.bat
Octocat-spinner-32 pearsauce.php
Octocat-spinner-32 phpunit.xml.dist
Octocat-spinner-32 publish
Octocat-spinner-32 sauce.bat
Octocat-spinner-32 sauce.php
README.markdown

PHPUnit_Selenium_SauceOnDemand

Sauce OnDemand integration for PHPUnit.

This package extends the PHPUnit_Selenium extension and provides additional setter functions for Sauce OnDemand specific options.

Additional setters are:

public function setUsername($username);
public function setAccessKey($accessKey);
public function setOs($os);
public function setBrowserVersion($browserVersion);
public function setJobName($jobName);
public function setPublic($public);
public function setTags($tags);
public function setPassed($passed);
public function setRecordVideo($recordVideo);
public function setRecordScreenshots($recordScreenshots);
public function setSauceAdvisor($sauceAdvisor);
public function setSingleWindow($singleWindow);
public function setUserExtensionsUrl($userExtensionsUrl);
public function setFirefoxProfileUrl($firefoxProfileUrl);
public function setMaxDuration($maxDuration);
public function setIdleTimeout($idleTimeout);
public function setBuild($build);
public function setCustomData($customData);

Multiple browser configurations are also possible:

class WebTest extends PHPUnit_Extensions_SeleniumTestCase_SauceOnDemandTestCase
{
    public static $browsers = array(
        array(
            'name'           => 'Firefox 3.6 on Windows',
            'username'       => 'your-saucelabs-username',
            'accessKey'      => 'your-saucelabs-access-key',
            'os'             => 'Windows 2003',
            'browser'        => 'firefox',
            'browserVersion' => '3.6.'
        ),
        array(
            'name'           => 'Google Chrome on Windows',
            'username'       => 'your-saucelabs-username',
            'accessKey'      => 'your-saucelabs-access-key',
            'os'             => 'Windows 2003',
            'browser'        => 'googlechrome',
            'browserVersion' => ''
        ),
        array(
            'name'           => 'Internet Explorer 8 on Windows',
            'username'       => 'your-saucelabs-username',
            'accessKey'      => 'your-saucelabs-access-key',
            'os'             => 'Windows 2003',
            'browser'        => 'iexplore',
            'browserVersion' => '8.'
        )
    );
}

Installation

You can install PHPUnit_Selenium_SauceOnDemand via the Sauce Labs PEAR channel. Run this from your command line:

pear channel-discover saucelabs.github.com/pear
pear install saucelabs/PHPUnit_Selenium_SauceOnDemand

The above process will install PHPUnit_Selenium_SauceOnDemand as a PEAR library.

Something went wrong with that request. Please try again.