Skip to end of metadata
Go to start of metadata

After you have everything installed and set up, you can run the WebDriverDemo.php example test that's included with Sausage to make sure everything works. 

Running the demo test on Mac OS X/Linux
vendor/bin/phpunit WebDriverDemo.php 
Running the demo test on Windows
bat vendor\bin\phpunit.bat WebDriverDemo.php 

This starts the PHPUnit test runner and gives it the name of an example test suite that Sausage downloaded. After a few moments you should see that PHPUnit has started. You might not see any output instantaneously, but eventually you will see a series of dots inching across the screen.

Each of these dots represents a test that successfully passed. If a test had an error or if it failed, PHPUnit prints an E or an F respectively.

While the tests are running, navigate to your Sauce Labs tests page. From there you'll be able to see each test as it queues, runs, and finishes. You'll notice that each test has a name -- that information is sent automatically by Sausage at the beginning of each test. Sausage also automatically notifies Sauce of the status of your tests when they complete.

Right now each test runs one at a time because PHPUnit currently doesn't support running multiple tests in parallel, however we've developed a way to do that which we'll describe in one of the later tutorials. For now, take advantage of the serial nature of the tests and click on a running test on your tests page. You'll jump to a detail view where, if you caught the test while it was running, you'll be able to watch Selenium controlling the browser. When the test finishes, the page updates with a video of the test and a list of the various Selenium commands that were sent.

If you don't catch a test while it's running, you can click the test's link on the Sauce Labs tests page to see the test's details and video.

  • No labels