Skip to main content

test_runs

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

Overview

Nametest_runs
TypeResource
Idazure.developer_loadtesting.test_runs

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.
certificateobjectCertificates metadata.
createdBystringThe user that created.
createdByTypestringThe type of the entity that created the test run. (E.x. User, ScheduleTrigger, etc). Known values are: "User", "ScheduledTrigger", "AzurePipelines", and "GitHubWorkflows". (User, ScheduledTrigger, AzurePipelines, GitHubWorkflows)
createdByUristringThe URI pointing to the entity that created the test run.
createdDateTimestring (date-time)The creation datetime(RFC 3339 literal format).
debugLogsEnabledbooleanEnable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise.
descriptionstringThe test run description.
displayNamestringDisplay name of a testRun.
durationintegerTest run duration in milliseconds.
endDateTimestring (date-time)The test run end DateTime(RFC 3339 literal format).
environmentVariablesobjectEnvironment variables which are defined as a set of pairs.
errorDetailsarrayError details if there is any failure in load test run.
estimatedVirtualUserHoursnumberEstimated virtual user hours for the test run.
executedDateTimestring (date-time)Test run initiated time. This is legacy, new developments should use createdDateTime.
executionEndDateTimestring (date-time)The test run execution end DateTime(RFC 3339 literal format).
executionStartDateTimestring (date-time)The test run execution start DateTime(RFC 3339 literal format).
kindstringType 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.
passFailCriteriaobjectPass fail criteria for a test.
portalUrlstringPortal url.
publicIPDisabledbooleanInject load test engines without deploying public IP for outbound access.
regionalStatisticsobjectRegional statistics. Key is the Azure region name and value is the test run statistics. The region name should of format accepted by ARM, and should be a region supported by Azure Load Testing. For example, East US should be passed as "eastus". The region name must match one of the strings in the "Name" column returned from running the "az account list-locations -o table" Azure CLI command.
requestDataLevelstringRequest data collection level for test run. Known values are: "NONE" and "ERRORS". (NONE, ERRORS)
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.
startDateTimestring (date-time)The test run start DateTime(RFC 3339 literal format).
statusstringThe test run status. Known values are: "ACCEPTED", "NOTSTARTED", "PROVISIONING", "PROVISIONED", "CONFIGURING", "CONFIGURED", "EXECUTING", "EXECUTED", "DEPROVISIONING", "DEPROVISIONED", "DONE", "CANCELLING", "CANCELLED", "FAILED", "VALIDATION_SUCCESS", and "VALIDATION_FAILURE". (ACCEPTED, NOTSTARTED, PROVISIONING, PROVISIONED, CONFIGURING, CONFIGURED, EXECUTING, EXECUTED, DEPROVISIONING, DEPROVISIONED, DONE, CANCELLING, CANCELLED, FAILED, VALIDATION_SUCCESS, VALIDATION_FAILURE)
subnetIdstringSubnet ID on which the load test instances should run.
testArtifactsobjectCollection of test run artifacts.
testIdstringAssociated test Id.
testResultstringTest result for pass/Fail criteria used during the test run. Known values are: "PASSED", "NOT_APPLICABLE", and "FAILED". (PASSED, NOT_APPLICABLE, FAILED)
testRunIdstringUnique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required.
testRunStatisticsobjectTest run statistics. Key is the sampler name and value is the set of statistics for performance metrics like response time, throughput, etc. from the load test run. The sampler name is the same as the name mentioned in the test script. Sampler name "Total" represents the aggregated statistics of all the samplers.
virtualUserHoursnumberVirtual user hours consumed by the test run.
virtualUsersintegerNumber of virtual users, for which test has been run.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_test_runselecttest_run_id, endpointGet test run details by test run Id. Get test run details by test run Id.
list_test_runsselectendpointorderby, search, testId, executionFrom, executionTo, status, maxpagesize, createdByTypes, testIdsGet all test runs for the given filters. Get all test runs for the given filters.
delete_test_rundeletetest_run_id, endpointDelete an existing load test run. Delete an existing load test run by providing the testRunId.

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_run_idstringUnique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required.
createdByTypesarrayComma separated list of type of entities that have created the test run. Default value is None.
executionFromstring (date-time)Start DateTime(RFC 3339 literal format) of test-run execution time filter range. Default value is None.
executionTostring (date-time)End DateTime(RFC 3339 literal format) of test-run execution time filter range. Default value is None.
maxpagesizeinteger
orderbystringSort on the supported fields in (field asc/desc) format. eg: createdDateTime asc. Supported fields - createdDateTime, executedDateTime (legacy). Default value is None.
statusstringComma separated list of test run status. Default value is None.
testIdstringUnique name of an existing load test. Default value is None.
testIdsarrayComma-separated list of test IDs. If you are using testIds, do not send a value for testId. Default value is None.

SELECT examples

Get test run details by test run Id. Get test run details by test run Id.

SELECT
autoStopCriteria,
certificate,
createdBy,
createdByType,
createdByUri,
createdDateTime,
debugLogsEnabled,
description,
displayName,
duration,
endDateTime,
environmentVariables,
errorDetails,
estimatedVirtualUserHours,
executedDateTime,
executionEndDateTime,
executionStartDateTime,
kind,
lastModifiedBy,
lastModifiedDateTime,
loadTestConfiguration,
passFailCriteria,
portalUrl,
publicIPDisabled,
regionalStatistics,
requestDataLevel,
secrets,
startDateTime,
status,
subnetId,
testArtifacts,
testId,
testResult,
testRunId,
testRunStatistics,
virtualUserHours,
virtualUsers
FROM azure.developer_loadtesting.test_runs
WHERE test_run_id = '{{ test_run_id }}' -- required
AND endpoint = '{{ endpoint }}' -- required
;

DELETE examples

Delete an existing load test run. Delete an existing load test run by providing the testRunId.

DELETE FROM azure.developer_loadtesting.test_runs
WHERE test_run_id = '{{ test_run_id }}' --required
AND endpoint = '{{ endpoint }}' --required
;