Skip to end of metadata
Go to start of metadata

Visual Studio Team Services (VSTS) enables continuous delivery by speeding up the testing cycle while increasing the quality of mobile and desktop applications. With Sauce for VSTS you can easily authenticate on Sauce Labs as a part of the VSTS build process. You can also use it to launch Sauce Connect Proxy for testing applications on localhost or behind a firewall. 

Team Server 2015 Version 2 Required

You must have Team Foundation Server 2015 Update 2 installed to use Sauce Labs with VSTS. Previous versions will not be able to install the new extension format.  

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.

  1. In your VSTS dashboard, click Build.
  2. Under Build Definition, choose an appropriate template for your project. 
  3. Configure your Source Settings for the project. 
  4. Click Create.
  5. Click Add Build Step
  6. Under Test, search for and add Sauce Labs - Manage Credentials.
  7. Under Add build step, select Sauce Labs - Manage Credentials.
  8. Next to the Sauce Labs Credentials menu, click Manage.
    This will open the Services tab.
  9. Click New Service Endpoint
  10. Select New Sauce Labs Credentials
  11. For Connection Name, enter an appropriate name.
  12. For User name and API Token, enter your Sauce username and access key.
  13. Click OK.
  14. Go back to the build steps for your project, and make sure that under Control Options for the Manage Credentials task, the Enabled option is selected 

Using Sauce Connect

Sauce Connect is a tunneling application that established a secure connection between applications or sites under test in your local network or machine, and the virtual machines running browsers in the Sauce Labs testing cloud. It is not necessary to set up Sauce Connect to run tests with the Sauce Labs browser cloud, you only need to use it if the application or site under test is not publicly accessible over a network. Check out the topics under Sauce Connect Proxy for more information. 

If you want to use Sauce Connect with VSTS, you need to both Enable Sauce Connect in your Manage Credential task and add the Sauce Labs - Stop Sauce Connect task to your build. These will start up a Sauce Connect tunnel when your build begins, and then close the tunnel when it finishes.

  1. In your Manage Credentials task, click Enable Sauce Connect.
  2. Select whether the task should Always run and/or Continue on error.
  3. In your build definition, search for and add Sauce Labs - Stop Sauce Connect.
  4. Make sure that the Sauce Labs - Stop Sauce Connect task is enabled.
    We recommend that you set this task to Always run so there are no extra Sauce Connects tunnels stay running after your job ends.

Task 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. 



  • No labels
Write a comment…