- You need to have set up a Sauce Labs account
- You should have an existing Selenium or Appium test that you want to run on Sauce.
If you've never written a Selenium test script you should read the topic Getting Started with Selenium for Automated Website Testing. If you don't have an existing Selenium or Appium script, you can clone and run one of the example scripts from our Sauce Labs Sample Demonstration Scripts repo in GitHub, but be advised that these are provided as examples only and should not be modified for use in production.
- The website you want to test must be accessible over the Internet for our browsers to be able to reach it.
- If you want to test a native mobile application, the application must be in Sauce Storage or another location where our emulators and simulators can connect to it.
- If the website or application you want to test is behind a firewall or on localhost, you need to set up a secure Sauce Connect Proxy tunnel for us to connect to it.
- Set up your test to connect to the Sauce Labs browser cloud using your account credentials.
- Use the Platform Configurator - Beta to specify the Desired Capabilities of your test.
Desired Capabilities are the mechanism in Selenium and Appium that lets you specify the combination of platform, operating system, and browser that you want to use in your website tests. You can find out more about using Desired Capabilities in the topics under Test Configuration and Annotation, as well as in the Selenium and Appium documentation. You can also check out some Examples of Test Configuration Options for Automated Website Tests and Examples of Test Configuration Options for Mobile Application Tests.
- Make sure your test is set up to report results to your Sauce Labs dashboard.
On its own, Selenium only knows if a test has completed or not. If you want more information, like whether the website passed or failed the test, you need to set up reporting to the Sauce Labs dashboard. As with the case of setting up your authentication credentials, the exact reporting configuration depends on the language you're using in your test script. The scripts in Example Selenium Scripts for Automated Web App Tests include examples of how to enable reporting for each language. You can also use the Sauce Labs REST API to annotate your tests after they have completed, including pass/fail status.