The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing


External Resources

More Info

Page tree
Skip to end of metadata
Go to start of metadata

This script provides an example of how you might configure your own automated tests to run in the Sauce Labs browser cloud. The sample test uses environment variables for authentication, assigns a tag and build number for test result management, and reports Pass/Fail status to the Sauce Labs dashboard.

What You'll Need

Setup Example Script

The sample test opens the browser, navigates to the saucelabs.demo web app, and then closes the browser.

To run this script against your own app using your Sauce Labs credentials:

  1. Set your authentication credentials as environment variables to connect the test to your Sauce Labs account.
  2. Enter the URL for the web app you want to test in the place of

Once you've been able to run the test against your web app, check out the Platform Configurator to see more of the desired capabilities you can use when testing with Sauce. 

Clone the following script from saucelabs-training on GitHub:

Not found

Could not read the file SauceExamples/Web.Tests/OnboardingTests/InstantSauceTest4.cs

Example Only

The code in this topic is presented as an example only, since your tests and testing environments may require specialized scripting. This information should be taken only as an illustration of how you could set up your tests with Sauce Labs, and is not directly supported by Sauce.

1 Comment

  1. Anonymous

    Why github code reference ( and sample code shown here  are different and using different Test page using Nunit but github not using NUnit.  Why this page is referring code that is not compilable? Is this really live product documentation?