Share via


az load test

Note

This reference is part of the load extension for the Azure CLI (version 2.41.0 or higher). The extension will automatically install the first time you run an az load test command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Command group to manage load tests.

Command group to manage load test with create, update, delete, list, etc.

Commands

Name Description Type Status
az load test app-component

Command group to manage app components.

Extension Preview
az load test app-component add

Add an app component to a test.

Extension Preview
az load test app-component list

List all app components for a test.

Extension Preview
az load test app-component remove

Remove the given app component from a test.

Extension Preview
az load test create

Create a new load test.

Extension Preview
az load test delete

Delete an existing load test.

Extension Preview
az load test download-files

Download files of an existing load test.

Extension Preview
az load test file

Command group for operations on test files.

Extension Preview
az load test file delete

Delete a file from test.

Extension Preview
az load test file download

Download a file from a test.

Extension Preview
az load test file list

List all files in a test.

Extension Preview
az load test file upload

Upload a file to a test.

Extension Preview
az load test list

List all tests in the given load test resource.

Extension Preview
az load test server-metric

Command group to manage server metrics.

Extension Preview
az load test server-metric add

Add a server-metric to a test.

Extension Preview
az load test server-metric list

List all server-metrics for a test.

Extension Preview
az load test server-metric remove

Remove the given server-metric from the test.

Extension Preview
az load test show

Show details of test.

Extension Preview
az load test update

Update an existing load test.

Extension Preview

az load test create

Preview

Command group 'load test' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a new load test.

az load test create --load-test-resource
                    --test-id
                    [--certificate]
                    [--description]
                    [--disable-public-ip]
                    [--display-name]
                    [--engine-instances]
                    [--env]
                    [--keyvault-reference-id]
                    [--load-test-config-file]
                    [--no-wait]
                    [--resource-group]
                    [--secret]
                    [--split-csv]
                    [--subnet-id]
                    [--test-plan]

Examples

Create a test with load test config file.

az load test create --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-test-id --load-test-config-file ~/resources/sample-config.yaml

Create a test with arguments.

az load test create --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --display-name "Sample Name" --description "Test description" --test-plan sample-jmx.jmx --engine-instances 1 --env rps=2 count=1

Create a test with load test config file and override engine-instance and env using arguments and don't wait for file upload.

az load test create --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-test-id --load-test-config-file ~/resources/sample-config.yaml --engine-instances 1 --env rps=2 count=1 --no-wait

Create a test with secrets and environment variables.

az load test create --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --display-name "Sample Name" --description "Test description" --test-plan sample-jmx.jmx --secret secret_name1=secret_uri1 secret_name2=secret_uri2 --env rps=2 count=1

Create a test with secrets using user assigned Managed Identity to access the Key Vault.

az load test create --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --display-name "Sample Name" --secret secret_name1=secret_uri1 secret_name2=secret_uri2 --keyvault-reference-id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/microsoft.managedidentity/userassignedidentities/sample-mi"

Create a test for a private endpoint in a Virtual Network with split CSV option enabled.

az load test create --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --display-name "Sample Name" --subnet-id "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sample-rg/providers/Microsoft.Network/virtualNetworks/SampleVMVNET/subnets/SampleVMSubnet" --split-csv true

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--test-id -t

Test ID of the load test.

Optional Parameters

--certificate

A single certificate in 'key[=value]' format. The certificate should be stored in Azure Key Vault in PFX format, and the certificate identifier should be provided as the value.

--description

Description of the load test.

--disable-public-ip

Disable the deployment of a public IP address, load balancer, and network security group while testing a private endpoint.

--display-name

Display name of the load test.

--engine-instances

Number of engine instances on which the test should run.

--env

Space-separated environment variables: key[=value] [key[=value] ...].

--keyvault-reference-id

The identity that will be used to access the key vault.

--load-test-config-file
--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--secret

Space-separated secrets: key[=value] [key[=value] ...]. Secrets should be stored in Azure Key Vault, and the secret identifier should be provided as the value.

--split-csv

Split CSV files evenly among engine instances.

--subnet-id

Resource ID of the subnet to use for private load test.

--test-plan

Path to the JMeter script.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load test delete

Preview

Command group 'load test' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete an existing load test.

az load test delete --load-test-resource
                    --test-id
                    [--resource-group]
                    [--yes]

Examples

Delete a load test.

az load test delete --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-existing-test-id

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--test-id -t

Test ID of the load test.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load test download-files

Preview

Command group 'load test' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Download files of an existing load test.

az load test download-files --load-test-resource
                            --path
                            --test-id
                            [--force]
                            [--resource-group]

Examples

Download all files of a test. The directory should already exist.

az load test download-files --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --path ~/downloads

Download all files of a test by creating the directory if it does not exist.

az load test download-files --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg --path "~/downloads/new folder" --force

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--path

Path of the directory to download files.

--test-id -t

Test ID of the load test.

Optional Parameters

--force

Force run the command. This will create the directory to download files if it does not exist.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load test list

Preview

Command group 'load test' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all tests in the given load test resource.

az load test list --load-test-resource
                  [--resource-group]

Examples

List all load tests in a resource.

az load test list --load-test-resource sample-alt-resource --resource-group sample-rg

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load test show

Preview

Command group 'load test' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show details of test.

az load test show --load-test-resource
                  --test-id
                  [--resource-group]

Examples

Get the details of a load test.

az load test show --test-id sample-test-id --load-test-resource sample-alt-resource --resource-group sample-rg

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--test-id -t

Test ID of the load test.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az load test update

Preview

Command group 'load test' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update an existing load test.

az load test update --load-test-resource
                    --test-id
                    [--certificate]
                    [--description]
                    [--disable-public-ip]
                    [--display-name]
                    [--engine-instances]
                    [--env]
                    [--keyvault-reference-id]
                    [--load-test-config-file]
                    [--no-wait]
                    [--resource-group]
                    [--secret]
                    [--split-csv]
                    [--subnet-id]
                    [--test-plan]

Examples

Update a test with load test config file and don't wait for file upload.

az load test update --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-existing-test-id --load-test-config-file ~/resources/sample-config.yaml --no-wait

Update the display name and description for a test.

az load test update --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-existing-test-id --description "Test description" --display-name "Sample Name"

Update a test with load test config file and override parameters using arguments.

az load test update --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-existing-test-id --load-test-config-file ~/resources/sample-config.yaml --engine-instances 1 --env name=value name=value

Remove the secrets from a test.

az load test update --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-existing-test-id --secret secret_name1=""

Update the Key Vault reference identity to system assigned Managed Identity.

az load test update --load-test-resource sample-alt-resource --resource-group sample-rg --test-id sample-existing-test-id --keyvault-reference-id null

Required Parameters

--load-test-resource --name -n

Name or ARM resource ID of the Load Testing resource.

--test-id -t

Test ID of the load test.

Optional Parameters

--certificate

A single certificate in 'key[=value]' format. The certificate should be stored in Azure Key Vault in PFX format, and the certificate identifier should be provided as the value.Use "" to clear existing certificate.

--description

Description of the load test.

--disable-public-ip

Disable the deployment of a public IP address, load balancer, and network security group while testing a private endpoint.

--display-name

Display name of the load test.

--engine-instances

Number of engine instances on which the test should run.

--env

Space-separated environment variables: key[=value] [key[=value] ...]. Use "" to clear existing environment variables.

--keyvault-reference-id

The identity that will be used to access the key vault. Provide null or None to use the system assigned identity of the load test resource.

--load-test-config-file
--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--secret

Space-separated secrets: key[=value] [key[=value] ...]. Secrets should be stored in Azure Key Vault, and the secret identifier should be provided as the value.Use "" to clear existing secrets.

--split-csv

Split CSV files evenly among engine instances.

--subnet-id

Resource ID of the subnet to use for private load test.

--test-plan

Path to the JMeter script.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.