Sausage is built on PHPUnit, and includes a set of classes and libraries that make it easy for you to run Selenium tests on Sauce Labs. Sausage offers many features for working with Sauce Labs, like automatic pass/fail reporting and test naming. Sausage comes bundled with Paratest (for running your tests in parallel) and optionally Sauce Connect (for testing locally-hosted sites with Sauce). You don't have to use either PHPUnit or Sausage to run tests on Sauce, but Sausage will help optimize your testing experience.
What You'll Need
- The SAUCE_USERNAME and SAUCE_ACCESS_KEY specific to your Sauce Labs account
Create a project directory where you will download and install Sausage, for example
- Save the file givememysausage.php to your project directory.
Using the command prompt, navigate to your project directory and run
givememysausage.php. You can also set your Sauce username and credentials at the same time.
This downloads Sausage and all its dependences, as well as the demo test
WebDriverDemo.php, which may take a few minutes. The setup checks for a number of requirements and if any are not met, notification messages are displayed on your screen. If there are any issues, fix them and then run the installation command again.