Sharing job results

  • 1 February 2021
  • 0 replies

Userlevel 1
Badge +2

I’ve worked at Sauce Labs for over 8 years now.  Before I was the Manager of Developer Relations, I worked in our Support department, and one of the most common questions we dealt with (besides Sauce Connect being broken) was


How do I share this test with someone else?


By default, tests (or jobs, as we call them) on Sauce Labs are only visible to the person who created them, their Sauce Labs team-mates, other members of their Sauce Labs team, and their organisational admin. Oh, and a few Sauce Labs personnel as well (such as Support and your CSM).

This is fine if you’re only sharing jobs with someone who also uses Sauce Labs, but what if you’re showing results to your manager, or a colleague who doesn’t use Sauce themselves? Is that do-able?

Yes, my friend, yes it is. In fact, there are three ways to do it!


Sharing Job Results by changing visibility

What is visibility?

🚈Read more about job visibility and how to change it in this article.

Your first option is to change the job’s visibility.  Visibility is explained more in the article above, but the short version is that the different settings let you selectively choose which people can access your job, and what they can see.


How to change visibility

To share your job permanently with anyone who has the link, open the Job Details page, click the arrow next to the visibility setting (Usually called ‘Team’), and choose ‘Share’.  That’s it!  Anyone with a Sauce Labs account and the link can now see your job.

Changing a job’s visibility to “Share”.

You can also change visibility using the REST API, or using desired capabilities.  Check out our full visibility guide to learn more.


When not to change Job visibility

There are three reasons why you might not want to change job visibility.  Firstly, you might only want to share a job for a period of time, and you’d have to remember to change the visibility back to what it was before.


Secondly, if you are either very, very, very paranoid about security, or have very strong compliance requirements.  When a job has the “Share” visibility, it’s available to anyone with the link.

Sauce Labs jobs use unique identifiers for each job.  There is an approximately 1 in 5316911983139663491615228241121378304 chance that someone could guess the unique identifier of a specific job.  To put it in perspective, someone could try to guess your job ID tens of trillions of times a year and still be more likely to be hit by a meteorite then to guess it.

What’s more likely is that someone in your company could have the Job ID from your CI server, test logs or a log repository.  If you’re not OK with the people who have access to that data also having access to the job itself, you might not want to use ‘Share’ visibility.


Thirdly, even with ‘Share” visibility, viewers still need a Sauce Labs account.  This is inconvenient for staff and often not really possible with 3rd party tools (like test management software).


If any of these match your situation, you might want to try….


Authenticated Links

Authenticated links provide users without Sauce Labs accounts access to a specific job.  By using authenticated links, you can leave your job visibility set to Team or Private, and still allow others to view your job.  If all a user has is the Job ID, they’ll still need the authenticated link to access it.


Users with the authenticated link can view and download screenshots, logs and videos.  They can’t change the job’s name, status, or any other metadata.


Use the REST API

The REST API is a great solution when all you need to share is the video and screenshots, a single log file, or even just the status of a test.

You’ll have to either write some code or use an API tool (might I humbly suggest API Fortress?) to interact our API.  Then, you can use the Get Job Details Asset Name method to discover what assets are available, and the Get Job Asset Files method to download them.


0 replies

Be the first to reply!