Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Navigate to Visual Studio Marketplace and install (cloud instancefor Cloud instances) or download the plugin (for on prem-premises versions).

  2. Update your tests to set build in your capabilities (See Examples below)as shown in the examples.

  3. Add Sauce Labs steps into your build pipeline

    Info

    Once the plugin is installed

  4. two additional steps will be accessible: “Manage Sauce Credentials” & “Stop Sauce Connect”. 
  5. , you will be able to access the steps Manage Sauce Credentials and Stop Sauce Connect, as described in the relevant sections in this topic.

  6. Build as normalClick Sauce Labs tab on .

  7. Click Sauce Labs on the build result page to view a summary of tests that were executed on Sauce.

Examples for Setting Build Capabilities

c#

Code Block
 capabilities.SetCapability("build", Environment.GetEnvironmentVariable("SAUCE_BUILD_NAME"));

Java

Code Block
desiredCapabilities.setCapability("build", System.getEnv("SAUCE_BUILD_NAME"));

Setting Up the Sauce Labs "Manage Credentials" Task for Your Build

The Manage Credentials task is what allows you to authenticate with your Sauce Labs account via VSTS and start Sauce Connect. You need to configure the task to create a new service endpoint that will contain your Sauce Labs username and access key.

...

Note
titleTask Order is Important

If you use the Sauce Connect tasks in your build, you must have your build steps set up so that the Sauce Labs - Manage Credentials task executes first. 

Setting Build capability examples

c#

Code Block
 capabilities.SetCapability("build", Environment.GetEnvironmentVariable("SAUCE_BUILD_NAME"));

Java

Code Block
desiredCapabilities.setCapability("build", System.getEnv("SAUCE_BUILD_NAME"));

Questions? 

Please reach out to help@saucelabs.com