Skip to main content

tests

Creates, updates, deletes, gets or lists a tests resource.

Overview

Nametests
TypeResource
Idazure.developer_loadtesting.tests

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
autoStopCriteriaobjectAuto stop criteria for a test. This will automatically stop a load test if the error percentage is high for a certain time window.
baselineTestRunIdstringId of the test run to be marked as baseline to view trends of client-side metrics from recent test runs.
certificateobjectCertificates metadata.
createdBystringThe user that created.
createdDateTimestring (date-time)The creation datetime(RFC 3339 literal format).
descriptionstringThe test description.
displayNamestringDisplay name of a test.
engineBuiltInIdentityIdsarrayResource Ids of the managed identity built in to load test engines. Required if engineBuiltInIdentityType is UserAssigned.
engineBuiltInIdentityTypestringType of the managed identity built in load test engines. Known values are: "SystemAssigned" and "UserAssigned". (SystemAssigned, UserAssigned)
environmentVariablesobjectEnvironment variables which are defined as a set of pairs.
estimatedVirtualUserHoursnumberEstimated virtual user hours for the test.
inputArtifactsobjectThe input artifacts for the test.
keyvaultReferenceIdentityIdstringResource Id of the managed identity referencing the Key vault.
keyvaultReferenceIdentityTypestringType of the managed identity referencing the Key vault.
kindstringKind of test. Known values are: "URL", "JMX", and "Locust". (URL, JMX, Locust)
lastModifiedBystringThe user that last modified.
lastModifiedDateTimestring (date-time)The last Modified datetime(RFC 3339 literal format).
loadTestConfigurationobjectThe load test configuration.
metricsReferenceIdentityIdstringResource Id of the managed identity referencing the metrics.
metricsReferenceIdentityTypestringType of the managed identity referencing the metrics. Known values are: "SystemAssigned" and "UserAssigned". (SystemAssigned, UserAssigned)
passFailCriteriaobjectPass fail criteria for a test.
preferencesobjectPreferences for the test.
publicIPDisabledbooleanInject load test engines without deploying public IP for outbound access.
secretsobjectSecrets 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.
subnetIdstringSubnet ID on which the load test instances should run.
testIdstringUnique 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_testselecttest_id, endpointGet load test details by test Id. Get load test details by test Id.
list_testsselectendpointorderby, search, lastModifiedStartTime, lastModifiedEndTime, maxpagesizeGet 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_testinserttest_id, endpointCreate 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_testreplacetest_id, endpointCreate 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_testdeletetest_id, endpointDelete 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.

NameDatatypeDescription
endpointstringThe service endpoint host (no scheme), e.g. myaccount.table.cosmos.azure.com:443 - value of the client endpoint parameter. (default: )
test_idstringUnique test identifier for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required.
lastModifiedEndTimestring (date-time)End DateTime(RFC 3339 literal format) of the last updated time range to filter tests. Default value is None.
lastModifiedStartTimestring (date-time)Start DateTime(RFC 3339 literal format) of the last updated time range to filter tests. Default value is None.
maxpagesizeinteger
orderbystringSort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime. Default value is None.

SELECT examples

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
;

INSERT examples

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
;

REPLACE examples

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 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
;