Cloud-based Load Test task
Azure Pipelines | Azure DevOps Server 2019 | TFS 2018 | TFS 2017 | TFS 2015
The cloud-based load testing service is deprecated. More information about the deprecation, the service availability, and alternative services can be found here.
Use this task in a build or release pipeline to run a load test in the cloud, to understand, test, and validate your app's performance. The task uses the Cloud-based Load Test Service based in Microsoft Azure and can be used to test your app's performance by generating load on it.
In Microsoft Team Foundation Server (TFS) 2018 and previous versions, run and release pipelines are called definitions, runs are called builds, service connections are called service endpoints, stages are called environments, and jobs are called phases.
The agent must have the following capability:
- Azure PowerShell
# Cloud-based load test # Run a load test in the cloud with Azure Pipelines - task: CloudLoadTest@1 inputs: #connectedServiceName: # Optional #testDrop: '$(System.DefaultWorkingDirectory)' loadTest: #activeRunSettings: 'useFile' # Optional. Options: useFile, changeActive #runSettingName: # Required when activeRunSettings == ChangeActive #testContextParameters: # Optional #testSettings: # Optional #thresholdLimit: # Optional #machineType: '0' # Options: 0, 2 #resourceGroupName: 'default' # Optional #numOfSelfProvisionedAgents: # Optional
|Azure Pipelines connection||The name of a Generic service connection that references the Azure DevOps organization you will be running the load test from and publishing the results to.
- Required for builds and releases on TFS and must specify a connection to the Azure DevOps organization where the load test will run.
- Optional for builds and releases on Azure Pipelines. In this case, if not provided, the current Azure Pipelines connection is used.
- See Generic service connection.
|Test settings file||Required. The path relative to the repository root of the test settings file that specifies the files and data required for the load test such as the test settings, any deployment items, and setup/clean-up scripts. The task will search this path and any subfolders.|
|Load test files folder||Required. The path of the load test project. The task looks here for the files required for the load test, such as the load test file, any deployment items, and setup/clean-up scripts. The task will search this path and any subfolders.|
|Load test file||Required. The name of the load test file (such as myfile.loadtest) to be executed as part of this task. This allows you to have more than one load test file and choose the one to execute based on the deployment environment or other factors.|
|Number of permissible threshold violations||Optional. The number of critical violations that must occur for the load test to be deemed unsuccessful, aborted, and marked as failed.|
|Control options||See Control options|
- Cloud-based Load Testing
- Source code for this task
- Build your Visual Studio solution
- Cloud-based Load Testing Knowledge Base
This task is open source on GitHub. Feedback and contributions are welcome.
Q & A
How do I use a Test Settings file?
The Test settings file references any setup and cleanup scripts required to execute the load test. For more details see: Using Setup and Cleanup Script in Cloud Load Test
When should I specify the number of permissible threshold violations?
Use the Number of permissible threshold violations setting if your load test is not already configured with information about how many violations will cause a failure to be reported. For more details, see: How to: Analyze Threshold Violations Using the Counters Panel in Load Test Analyzer.
Do I need an agent?
You need at least one agent to run your build or release. Get an agent for Linux, macOS, or Windows.
I'm having problems. How can I troubleshoot them?
I can't select a default agent pool and I can't queue my build or release. How do I fix this?
See Agent pools.
I use TFS on-premises and I don't see some of these features. Why not?
Help and support
- Report problems through the Developer Community.