tests
Creates, updates, deletes, gets or lists a tests resource.
Overview
| Name | tests |
| Type | Resource |
| Id | azure.developer_loadtesting.tests |
Fields
The following fields are returned by SELECT queries:
- get_test
- list_tests
| Name | Datatype | Description |
|---|---|---|
autoStopCriteria | object | Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. |
baselineTestRunId | string | Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs. |
certificate | object | Certificates metadata. |
createdBy | string | The user that created. |
createdDateTime | string (date-time) | The creation datetime(RFC 3339 literal format). |
description | string | The test description. |
displayName | string | Display name of a test. |
engineBuiltInIdentityIds | array | Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned. |
engineBuiltInIdentityType | string | Type of the managed identity built in load test engines. Known values are: "SystemAssigned" and "UserAssigned". (SystemAssigned, UserAssigned) |
environmentVariables | object | Environment variables which are defined as a set of pairs. |
estimatedVirtualUserHours | number | Estimated virtual user hours for the test. |
inputArtifacts | object | The input artifacts for the test. |
keyvaultReferenceIdentityId | string | Resource Id of the managed identity referencing the Key vault. |
keyvaultReferenceIdentityType | string | Type of the managed identity referencing the Key vault. |
kind | string | Kind of test. Known values are: "URL", "JMX", and "Locust". (URL, JMX, Locust) |
lastModifiedBy | string | The user that last modified. |
lastModifiedDateTime | string (date-time) | The last Modified datetime(RFC 3339 literal format). |
loadTestConfiguration | object | The load test configuration. |
metricsReferenceIdentityId | string | Resource Id of the managed identity referencing the metrics. |
metricsReferenceIdentityType | string | Type of the managed identity referencing the metrics. Known values are: "SystemAssigned" and "UserAssigned". (SystemAssigned, UserAssigned) |
passFailCriteria | object | Pass fail criteria for a test. |
preferences | object | Preferences for the test. |
publicIPDisabled | boolean | Inject load test engines without deploying public IP for outbound access. |
secrets | object | Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. |
subnetId | string | Subnet ID on which the load test instances should run. |
testId | string | Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required. |
| Name | Datatype | Description |
|---|---|---|
autoStopCriteria | object | Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window. |
baselineTestRunId | string | Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs. |
certificate | object | Certificates metadata. |
createdBy | string | The user that created. |
createdDateTime | string (date-time) | The creation datetime(RFC 3339 literal format). |
description | string | The test description. |
displayName | string | Display name of a test. |
engineBuiltInIdentityIds | array | Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned. |
engineBuiltInIdentityType | string | Type of the managed identity built in load test engines. Known values are: "SystemAssigned" and "UserAssigned". (SystemAssigned, UserAssigned) |
environmentVariables | object | Environment variables which are defined as a set of pairs. |
estimatedVirtualUserHours | number | Estimated virtual user hours for the test. |
inputArtifacts | object | The input artifacts for the test. |
keyvaultReferenceIdentityId | string | Resource Id of the managed identity referencing the Key vault. |
keyvaultReferenceIdentityType | string | Type of the managed identity referencing the Key vault. |
kind | string | Kind of test. Known values are: "URL", "JMX", and "Locust". (URL, JMX, Locust) |
lastModifiedBy | string | The user that last modified. |
lastModifiedDateTime | string (date-time) | The last Modified datetime(RFC 3339 literal format). |
loadTestConfiguration | object | The load test configuration. |
metricsReferenceIdentityId | string | Resource Id of the managed identity referencing the metrics. |
metricsReferenceIdentityType | string | Type of the managed identity referencing the metrics. Known values are: "SystemAssigned" and "UserAssigned". (SystemAssigned, UserAssigned) |
passFailCriteria | object | Pass fail criteria for a test. |
preferences | object | Preferences for the test. |
publicIPDisabled | boolean | Inject load test engines without deploying public IP for outbound access. |
secrets | object | Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. |
subnetId | string | Subnet ID on which the load test instances should run. |
testId | string | Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_test | select | test_id, endpoint | Get load test details by test Id. Get load test details by test Id. | |
list_tests | select | endpoint | orderby, search, lastModifiedStartTime, lastModifiedEndTime, maxpagesize | Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. |
create_or_update_test | insert | test_id, endpoint | Create a new test or update an existing test by providing the test Id. Create a new test or update an existing test by providing the test Id. | |
create_or_update_test | replace | test_id, endpoint | Create a new test or update an existing test by providing the test Id. Create a new test or update an existing test by providing the test Id. | |
delete_test | delete | test_id, endpoint | Delete a test by its test Id. Delete a test by its test Id. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
endpoint | string | The service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: ) |
test_id | string | Unique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required. |
lastModifiedEndTime | string (date-time) | End DateTime(RFC 3339 literal format) of the last updated time range to filter tests. Default value is None. |
lastModifiedStartTime | string (date-time) | Start DateTime(RFC 3339 literal format) of the last updated time range to filter tests. Default value is None. |
maxpagesize | integer | |
orderby | string | Sort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime. Default value is None. |
search | string | Prefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter can be Login. Default value is None. |
SELECT examples
- get_test
- list_tests
Get load test details by test Id. Get load test details by test Id.
SELECT
autoStopCriteria,
baselineTestRunId,
certificate,
createdBy,
createdDateTime,
description,
displayName,
engineBuiltInIdentityIds,
engineBuiltInIdentityType,
environmentVariables,
estimatedVirtualUserHours,
inputArtifacts,
keyvaultReferenceIdentityId,
keyvaultReferenceIdentityType,
kind,
lastModifiedBy,
lastModifiedDateTime,
loadTestConfiguration,
metricsReferenceIdentityId,
metricsReferenceIdentityType,
passFailCriteria,
preferences,
publicIPDisabled,
secrets,
subnetId,
testId
FROM azure.developer_loadtesting.tests
WHERE test_id = '{{ test_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;
Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.
SELECT
autoStopCriteria,
baselineTestRunId,
certificate,
createdBy,
createdDateTime,
description,
displayName,
engineBuiltInIdentityIds,
engineBuiltInIdentityType,
environmentVariables,
estimatedVirtualUserHours,
inputArtifacts,
keyvaultReferenceIdentityId,
keyvaultReferenceIdentityType,
kind,
lastModifiedBy,
lastModifiedDateTime,
loadTestConfiguration,
metricsReferenceIdentityId,
metricsReferenceIdentityType,
passFailCriteria,
preferences,
publicIPDisabled,
secrets,
subnetId,
testId
FROM azure.developer_loadtesting.tests
WHERE endpoint = '{{ endpoint }}' -- required
AND orderby = '{{ orderby }}'
AND search = '{{ search }}'
AND lastModifiedStartTime = '{{ lastModifiedStartTime }}'
AND lastModifiedEndTime = '{{ lastModifiedEndTime }}'
AND maxpagesize = '{{ maxpagesize }}'
;
INSERT examples
- create_or_update_test
- Manifest
Create a new test or update an existing test by providing the test Id. Create a new test or update an existing test by providing the test Id.
INSERT INTO azure.developer_loadtesting.tests (
passFailCriteria,
autoStopCriteria,
secrets,
certificate,
environmentVariables,
loadTestConfiguration,
baselineTestRunId,
description,
displayName,
subnetId,
kind,
publicIPDisabled,
keyvaultReferenceIdentityType,
keyvaultReferenceIdentityId,
metricsReferenceIdentityType,
metricsReferenceIdentityId,
engineBuiltInIdentityType,
engineBuiltInIdentityIds,
preferences,
test_id,
endpoint
)
SELECT
'{{ passFailCriteria }}',
'{{ autoStopCriteria }}',
'{{ secrets }}',
'{{ certificate }}',
'{{ environmentVariables }}',
'{{ loadTestConfiguration }}',
'{{ baselineTestRunId }}',
'{{ description }}',
'{{ displayName }}',
'{{ subnetId }}',
'{{ kind }}',
{{ publicIPDisabled }},
'{{ keyvaultReferenceIdentityType }}',
'{{ keyvaultReferenceIdentityId }}',
'{{ metricsReferenceIdentityType }}',
'{{ metricsReferenceIdentityId }}',
'{{ engineBuiltInIdentityType }}',
'{{ engineBuiltInIdentityIds }}',
'{{ preferences }}',
'{{ test_id }}',
'{{ endpoint }}'
RETURNING
autoStopCriteria,
baselineTestRunId,
certificate,
createdBy,
createdDateTime,
description,
displayName,
engineBuiltInIdentityIds,
engineBuiltInIdentityType,
environmentVariables,
estimatedVirtualUserHours,
inputArtifacts,
keyvaultReferenceIdentityId,
keyvaultReferenceIdentityType,
kind,
lastModifiedBy,
lastModifiedDateTime,
loadTestConfiguration,
metricsReferenceIdentityId,
metricsReferenceIdentityType,
passFailCriteria,
preferences,
publicIPDisabled,
secrets,
subnetId,
testId
;
# Description fields are for documentation purposes
- name: tests
props:
- name: test_id
value: "{{ test_id }}"
description: Required parameter for the tests resource.
- name: endpoint
value: "{{ endpoint }}"
description: Required parameter for the tests resource.
- name: passFailCriteria
description: |
Pass fail criteria for a test.
value:
passFailMetrics: "{{ passFailMetrics }}"
passFailServerMetrics: "{{ passFailServerMetrics }}"
- name: autoStopCriteria
description: |
Auto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.
value:
autoStopDisabled: {{ autoStopDisabled }}
errorRate: {{ errorRate }}
errorRateTimeWindowInSeconds: {{ errorRateTimeWindowInSeconds }}
maximumVirtualUsersPerEngine: {{ maximumVirtualUsersPerEngine }}
- name: secrets
value: "{{ secrets }}"
description: |
Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE.
- name: certificate
description: |
Certificates metadata.
value:
value: "{{ value }}"
type: "{{ type }}"
name: "{{ name }}"
- name: environmentVariables
value: "{{ environmentVariables }}"
description: |
Environment variables which are defined as a set of pairs.
- name: loadTestConfiguration
description: |
The load test configuration.
value:
engineInstances: {{ engineInstances }}
splitAllCSVs: {{ splitAllCSVs }}
quickStartTest: {{ quickStartTest }}
optionalLoadTestConfig:
endpointUrl: "{{ endpointUrl }}"
requestsPerSecond: {{ requestsPerSecond }}
maxResponseTimeInMs: {{ maxResponseTimeInMs }}
virtualUsers: {{ virtualUsers }}
rampUpTime: {{ rampUpTime }}
duration: {{ duration }}
regionalLoadTestConfig:
- engineInstances: {{ engineInstances }}
region: "{{ region }}"
- name: baselineTestRunId
value: "{{ baselineTestRunId }}"
description: |
Id of the test run to be marked as baseline to view trends of client-side metrics from recent test runs.
- name: description
value: "{{ description }}"
description: |
The test description.
- name: displayName
value: "{{ displayName }}"
description: |
Display name of a test.
- name: subnetId
value: "{{ subnetId }}"
description: |
Subnet ID on which the load test instances should run.
- name: kind
value: "{{ kind }}"
description: |
Kind of test. Known values are: "URL", "JMX", and "Locust".
valid_values: ['URL', 'JMX', 'Locust']
- name: publicIPDisabled
value: {{ publicIPDisabled }}
description: |
Inject load test engines without deploying public IP for outbound access.
- name: keyvaultReferenceIdentityType
value: "{{ keyvaultReferenceIdentityType }}"
description: |
Type of the managed identity referencing the Key vault.
- name: keyvaultReferenceIdentityId
value: "{{ keyvaultReferenceIdentityId }}"
description: |
Resource Id of the managed identity referencing the Key vault.
- name: metricsReferenceIdentityType
value: "{{ metricsReferenceIdentityType }}"
description: |
Type of the managed identity referencing the metrics. Known values are: "SystemAssigned" and "UserAssigned".
valid_values: ['SystemAssigned', 'UserAssigned']
- name: metricsReferenceIdentityId
value: "{{ metricsReferenceIdentityId }}"
description: |
Resource Id of the managed identity referencing the metrics.
- name: engineBuiltInIdentityType
value: "{{ engineBuiltInIdentityType }}"
description: |
Type of the managed identity built in load test engines. Known values are: "SystemAssigned" and "UserAssigned".
valid_values: ['SystemAssigned', 'UserAssigned']
- name: engineBuiltInIdentityIds
value:
- "{{ engineBuiltInIdentityIds }}"
description: |
Resource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned.
- name: preferences
description: |
Preferences for the test.
value:
enableAIErrorInsights: {{ enableAIErrorInsights }}
REPLACE examples
- create_or_update_test
Create a new test or update an existing test by providing the test Id. Create a new test or update an existing test by providing the test Id.
REPLACE azure.developer_loadtesting.tests
SET
passFailCriteria = '{{ passFailCriteria }}',
autoStopCriteria = '{{ autoStopCriteria }}',
secrets = '{{ secrets }}',
certificate = '{{ certificate }}',
environmentVariables = '{{ environmentVariables }}',
loadTestConfiguration = '{{ loadTestConfiguration }}',
baselineTestRunId = '{{ baselineTestRunId }}',
description = '{{ description }}',
displayName = '{{ displayName }}',
subnetId = '{{ subnetId }}',
kind = '{{ kind }}',
publicIPDisabled = {{ publicIPDisabled }},
keyvaultReferenceIdentityType = '{{ keyvaultReferenceIdentityType }}',
keyvaultReferenceIdentityId = '{{ keyvaultReferenceIdentityId }}',
metricsReferenceIdentityType = '{{ metricsReferenceIdentityType }}',
metricsReferenceIdentityId = '{{ metricsReferenceIdentityId }}',
engineBuiltInIdentityType = '{{ engineBuiltInIdentityType }}',
engineBuiltInIdentityIds = '{{ engineBuiltInIdentityIds }}',
preferences = '{{ preferences }}'
WHERE
test_id = '{{ test_id }}' --required
AND endpoint = '{{ endpoint }}' --required
RETURNING
autoStopCriteria,
baselineTestRunId,
certificate,
createdBy,
createdDateTime,
description,
displayName,
engineBuiltInIdentityIds,
engineBuiltInIdentityType,
environmentVariables,
estimatedVirtualUserHours,
inputArtifacts,
keyvaultReferenceIdentityId,
keyvaultReferenceIdentityType,
kind,
lastModifiedBy,
lastModifiedDateTime,
loadTestConfiguration,
metricsReferenceIdentityId,
metricsReferenceIdentityType,
passFailCriteria,
preferences,
publicIPDisabled,
secrets,
subnetId,
testId;
DELETE examples
- delete_test
Delete a test by its test Id. Delete a test by its test Id.
DELETE FROM azure.developer_loadtesting.tests
WHERE test_id = '{{ test_id }}' --required
AND endpoint = '{{ endpoint }}' --required
;