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 Plugin for VSTS users can easily pass Sauce Labs authentication credentials as a part of the VSTS build process, Launch & Stop Sauce Connect Proxy, and embed the report around the statuses of executed tests.
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.
Navigate to Visual Studio Marketplace and install (for Cloud instances) or download the plugin (for on-premises versions).
Update your tests to set
build in your capabilities as shown in the examples.
Add Sauce Labs steps into your build pipeline
Once the plugin is installed, you will be able to access the steps Manage Sauce Credentials and Stop Sauce Connect, as described in the relevant sections in this topic.
Build as normal.
Click Sauce Labs on the build result page to view a summary of tests that were executed on Sauce.
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.
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.
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.