test_runs
Creates, updates, deletes, gets or lists a test_runs resource.
Overview
| Name | test_runs |
| Type | Resource |
| Id | azure.developer_loadtesting.test_runs |
Fields
The following fields are returned by SELECT queries:
- get_test_run
- list_test_runs
| 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. |
certificate | object | Certificates metadata. |
createdBy | string | The user that created. |
createdByType | string | The 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) |
createdByUri | string | The URI pointing to the entity that created the test run. |
createdDateTime | string (date-time) | The creation datetime(RFC 3339 literal format). |
debugLogsEnabled | boolean | Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise. |
description | string | The test run description. |
displayName | string | Display name of a testRun. |
duration | integer | Test run duration in milliseconds. |
endDateTime | string (date-time) | The test run end DateTime(RFC 3339 literal format). |
environmentVariables | object | Environment variables which are defined as a set of pairs. |
errorDetails | array | Error details if there is any failure in load test run. |
estimatedVirtualUserHours | number | Estimated virtual user hours for the test run. |
executedDateTime | string (date-time) | Test run initiated time. This is legacy, new developments should use createdDateTime. |
executionEndDateTime | string (date-time) | The test run execution end DateTime(RFC 3339 literal format). |
executionStartDateTime | string (date-time) | The test run execution start DateTime(RFC 3339 literal format). |
kind | string | Type 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. |
passFailCriteria | object | Pass fail criteria for a test. |
portalUrl | string | Portal url. |
publicIPDisabled | boolean | Inject load test engines without deploying public IP for outbound access. |
regionalStatistics | object | Regional 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. |
requestDataLevel | string | Request data collection level for test run. Known values are: "NONE" and "ERRORS". (NONE, ERRORS) |
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. |
startDateTime | string (date-time) | The test run start DateTime(RFC 3339 literal format). |
status | string | The 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) |
subnetId | string | Subnet ID on which the load test instances should run. |
testArtifacts | object | Collection of test run artifacts. |
testId | string | Associated test Id. |
testResult | string | Test result for pass/Fail criteria used during the test run. Known values are: "PASSED", "NOT_APPLICABLE", and "FAILED". (PASSED, NOT_APPLICABLE, FAILED) |
testRunId | string | Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required. |
testRunStatistics | object | Test 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. |
virtualUserHours | number | Virtual user hours consumed by the test run. |
virtualUsers | integer | Number of virtual users, for which test has been run. |
| 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. |
certificate | object | Certificates metadata. |
createdBy | string | The user that created. |
createdByType | string | The 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) |
createdByUri | string | The URI pointing to the entity that created the test run. |
createdDateTime | string (date-time) | The creation datetime(RFC 3339 literal format). |
debugLogsEnabled | boolean | Enable or disable debug level logging. True if debug logs are enabled for the test run. False otherwise. |
description | string | The test run description. |
displayName | string | Display name of a testRun. |
duration | integer | Test run duration in milliseconds. |
endDateTime | string (date-time) | The test run end DateTime(RFC 3339 literal format). |
environmentVariables | object | Environment variables which are defined as a set of pairs. |
errorDetails | array | Error details if there is any failure in load test run. |
estimatedVirtualUserHours | number | Estimated virtual user hours for the test run. |
executedDateTime | string (date-time) | Test run initiated time. This is legacy, new developments should use createdDateTime. |
executionEndDateTime | string (date-time) | The test run execution end DateTime(RFC 3339 literal format). |
executionStartDateTime | string (date-time) | The test run execution start DateTime(RFC 3339 literal format). |
kind | string | Type 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. |
passFailCriteria | object | Pass fail criteria for a test. |
portalUrl | string | Portal url. |
publicIPDisabled | boolean | Inject load test engines without deploying public IP for outbound access. |
regionalStatistics | object | Regional 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. |
requestDataLevel | string | Request data collection level for test run. Known values are: "NONE" and "ERRORS". (NONE, ERRORS) |
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. |
startDateTime | string (date-time) | The test run start DateTime(RFC 3339 literal format). |
status | string | The 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) |
subnetId | string | Subnet ID on which the load test instances should run. |
testArtifacts | object | Collection of test run artifacts. |
testId | string | Associated test Id. |
testResult | string | Test result for pass/Fail criteria used during the test run. Known values are: "PASSED", "NOT_APPLICABLE", and "FAILED". (PASSED, NOT_APPLICABLE, FAILED) |
testRunId | string | Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required. |
testRunStatistics | object | Test 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. |
virtualUserHours | number | Virtual user hours consumed by the test run. |
virtualUsers | integer | Number of virtual users, for which test has been run. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_test_run | select | test_run_id, endpoint | Get test run details by test run Id. Get test run details by test run Id. | |
list_test_runs | select | endpoint | orderby, search, testId, executionFrom, executionTo, status, maxpagesize, createdByTypes, testIds | Get all test runs for the given filters. Get all test runs for the given filters. |
delete_test_run | delete | test_run_id, endpoint | Delete 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.
| 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_run_id | string | Unique test run identifier for the load test run, must contain only lower-case alphabetic, numeric, underscore or hyphen characters. Required. |
createdByTypes | array | Comma separated list of type of entities that have created the test run. Default value is None. |
executionFrom | string (date-time) | Start DateTime(RFC 3339 literal format) of test-run execution time filter range. Default value is None. |
executionTo | string (date-time) | End DateTime(RFC 3339 literal format) of test-run execution time filter range. Default value is None. |
maxpagesize | integer | |
orderby | string | Sort on the supported fields in (field asc/desc) format. eg: createdDateTime asc. Supported fields - createdDateTime, executedDateTime (legacy). Default value is None. |
search | string | Prefix based, case sensitive search on searchable fields - description, executedUser. For example, to search for a test run, with description 500 VUs, the search parameter can be 500. Default value is None. |
status | string | Comma separated list of test run status. Default value is None. |
testId | string | Unique name of an existing load test. Default value is None. |
testIds | array | Comma-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
- list_test_runs
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
;
Get all test runs for the given filters. Get all test runs for the given filters.
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 endpoint = '{{ endpoint }}' -- required
AND orderby = '{{ orderby }}'
AND search = '{{ search }}'
AND testId = '{{ testId }}'
AND executionFrom = '{{ executionFrom }}'
AND executionTo = '{{ executionTo }}'
AND status = '{{ status }}'
AND maxpagesize = '{{ maxpagesize }}'
AND createdByTypes = '{{ createdByTypes }}'
AND testIds = '{{ testIds }}'
;
DELETE examples
- delete_test_run
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
;