No Real Device Cloud Support
The following information does not currently work for RDC on Sauce Labs.
You can generate a sharable link to your test results that limits who can view the results by requiring a login or authentication (auth) token. These links will allow recipients to view the results of that test, but the they will not appear on their dashboard.
You can also change the visibility of a test (e.g., Public, Private, or Team) directly on the Test Results page. For more information, see Sharing the Results of Sauce Labs Tests.
What You'll Need
When generating a shareable link, you'll need to know your specific data center. All examples on this page use the US West 1 data center endpoint, app.saucelabs.com. If you're using a different data center, such as EU Central 1, your link should be edited accordingly (e.g., Data Center Endpoints for more info.). See
Linking to Tests that Require a Login to View
You can create links to your tests that will only work if you're logged in with the account that ran the test.
In Selenium, when a client requests a new browser session, the server returns a session ID, which is used to identify that session throughout the test. The session ID is stored as a member variable of the instantiated Selenium object and named
session_id, depending on the client library. Sauce uses that session ID as the test ID for accessing test results.
To directly access a specific job, you will first need to note the session ID locally, usually by writing it to a log file. You can then use it to create a URL with the following format and replace
YOUR_TEST_ID with the session ID:
As previously mentioned, all examples on this page use the US West 1 data center endpoint. If you're using a different data center, such as EU Central 1, your link should be edited accordingly (e.g., Data Center Endpoints for more info.). See
Linking to Tests that Don't Require a Login to View
You can also create sharable links that are based on authentication (auth) tokens, meaning the recipient won't have to log in and use your credentials.
Auth tokens are generated on a per-test basis and grant viewers access using an hmac-based algorithm. You can also find hmac implementations for different programming languages.
The digest algorithm to use is MD5. The message and key used to generate the token should be the following:
The following is an example in Python for generating the token in the Python interpreter for a test with id:
Once the auth token has been obtained, you can use it to build a link in this format: .
Support for Secondary Accounts
If you want to authenticate as another user, just prefix the auth token with your user name, followed by a colon.
Setting Your Test Links to Expire
You can extend the links generated with authentication tokens to make them work temporarily for a specific date or specific hour, based on the parameters that you set.
During the hmac generation, set the key like this:
The date range can take two formats:
YYYY-MM-DD. These should be set in UTC time and will only work during the date or hour you set.