Cloud Load Test Support in mstest.exe command line and XAML Builds

As part of TFS 2015, we have added two tasks to help users run load test as part of the new Build System. You can read about it here https://www.visualstudio.com/en-us/news/tfs2015-vs.aspx#loadtest. We have also enabled mstest.exe commandline to execute a run against the cloud load test service. To execute load tests against the cloud load test service, the user would need to specify the account url, and the alternate credentials in the test settings file. To learn how to setup alternate credentials for your account, please refer to the link  https://www.visualstudio.com/en-us/integrate/get-started/auth/overview

 Option #1: Provide the non-encrypted alternate credentials and account url in test settings

 <Properties>

          <Property name=”TestSettingsUIType” value=”LoadTest” />

          <Property name=”AccountUrl” value=”https://<accountname>.visualstudio.com” />

          <Property name=”AlternateCredentialsUserName” value=”<alternate or secondary username>” />

           <Property name=”AlternateCredentialsPassword” value=”<alternate password>” />

  </Properties>

</TestSettings> 

Option #2: Provide the encrypted alternate credentials and accounturl in testsettings file

 You can also provide an encrypted password in the testsettings file. The only additional requirement being the certificate used to encrypt the password should be available on the machine/build agent the load test is being executed from. The certificates need to be present either in the user store or the machine store (StoreLocation.CurrentUser,  StoreLocation.LocalMachine). You can use the code snippet (present as an attachment Encrypt.cs) in a UT project and execute the UT to get the encrypted password.

 <Properties>

           <Property name=”TestSettingsUIType” value=”LoadTest” />

           <Property name=”AccountUrl” value=”https://<accountname>.visualstudio.com” />

           <Property name=”AlternateCredentialsUserName” value=”<alternate or secondary username>” />

           <Property name=”AlternateCredentialsPassword” value=”<encrypted alternate password>” />

            <Property name=”AlternateCredentialsEncryptionThumprint” value=”<encryption certificate thumprint>” />

 </Properties>

</TestSettings>

Commandline Execution of the Load Test

Specify the testsettings file with the above information to execute the load test from thecommandline.

Mstest.exe /testcontainer:<loadtestfileName> /testsettings:CloudSettings.testsettings

NOTE: These values mentioned in the test settings specific for mstest commandline and not applicable for Visual Studio IDE experience.

XAML Build Integration

For the customers using the XAML build and using the mstest activity to run load tests as part of build, providing the testsettings that has the alternate credentials and the account information in the build definition would trigger the run against the cloud load test service. The activity will succeed if the load test run reaches completion and fail if the load test run aborts or errors out. 

More details about setting up a build definition can be found here : https://msdn.microsoft.com/en-us/library/ms181715(v=vs.120).aspx

If you have questions or feedback on this, you can reach out to us at vsoloadtest@microsoft.com.

Cloud-based Load Testing can be used for performance and load testing of your application by generating load from Azure. If you are new to Cloud-based Load  Testing then the following links should help you:

Introduction to Cloud Load Testing with VSO (video)

Getting started guide

Additional resources

Customer Stories / Case Study

 

If you have a feature request for us or an improvement you’d like to see, please log them on our UserVoice page

 

Encrypt.cs