LoadTestRunClient Class
- java.
lang. Object - com.
azure. developer. loadtesting. LoadTestRunClient
- com.
public final class LoadTestRunClient
Initializes a new instance of the synchronous LoadTestingClient type.
Method Summary
Methods inherited from java.lang.Object
Method Details
beginTestRun
public SyncPoller<BinaryData,BinaryData> beginTestRun(String testRunId, BinaryData body, RequestOptions testRunRequestOptions)
Starts a test run and polls the status of the test run.
Parameters:
Returns:
createOrUpdateAppComponentsWithResponse
public Response<BinaryData> createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body, RequestOptions requestOptions)
Associate an app component (collection of azure resources) to a test run.
Request Body Schema
{
components (Required): {
String (Required): {
resourceId: String (Optional)
resourceName: String (Optional)
resourceType: String (Optional)
displayName: String (Optional)
resourceGroup: String (Optional)
subscriptionId: String (Optional)
kind: String (Optional)
}
}
testRunId: String (Optional)
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Response Body Schema
{
components (Required): {
String (Required): {
resourceId: String (Optional)
resourceName: String (Optional)
resourceType: String (Optional)
displayName: String (Optional)
resourceGroup: String (Optional)
subscriptionId: String (Optional)
kind: String (Optional)
}
}
testRunId: String (Optional)
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Parameters:
Returns:
createOrUpdateServerMetricsConfigWithResponse
public Response<BinaryData> createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body, RequestOptions requestOptions)
Configure server metrics for a test run.
Request Body Schema
{
testRunId: String (Optional)
metrics (Optional): {
String (Required): {
id: String (Optional)
resourceId: String (Required)
metricNamespace: String (Required)
displayDescription: String (Optional)
name: String (Required)
aggregation: String (Required)
unit: String (Optional)
resourceType: String (Required)
}
}
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Response Body Schema
{
testRunId: String (Optional)
metrics (Optional): {
String (Required): {
id: String (Optional)
resourceId: String (Required)
metricNamespace: String (Required)
displayDescription: String (Optional)
name: String (Required)
aggregation: String (Required)
unit: String (Optional)
resourceType: String (Required)
}
}
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Parameters:
Returns:
deleteTestRunWithResponse
public Response<Void> deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions)
Delete a test run by its name.
Parameters:
Returns:
getAppComponentsWithResponse
public Response<BinaryData> getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions)
Get associated app component (collection of azure resources) for the given test run.
Response Body Schema
{
components (Required): {
String (Required): {
resourceId: String (Optional)
resourceName: String (Optional)
resourceType: String (Optional)
displayName: String (Optional)
resourceGroup: String (Optional)
subscriptionId: String (Optional)
kind: String (Optional)
}
}
testRunId: String (Optional)
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Parameters:
Returns:
getMetricDefinitionsWithResponse
public Response<BinaryData> getMetricDefinitionsWithResponse(String testRunId, String metricNamespace, RequestOptions requestOptions)
List the metric definitions for a load test run.
Response Body Schema
{
value (Required): [
(Required){
dimensions (Optional): [
(Optional){
description: String (Optional)
name: String (Optional)
}
]
description: String (Optional)
name: String (Optional)
namespace: String (Optional)
primaryAggregationType: String(Average/Count/None/Total/Percentile90/Percentile95/Percentile99) (Optional)
supportedAggregationTypes (Optional): [
String (Optional)
]
unit: String(NotSpecified/Percent/Count/Seconds/Milliseconds/Bytes/BytesPerSecond/CountPerSecond) (Optional)
metricAvailabilities (Optional): [
(Optional){
timeGrain: String(PT5S/PT10S/PT1M/PT5M/PT1H) (Optional)
}
]
}
]
}
Parameters:
Returns:
getMetricNamespacesWithResponse
public Response<BinaryData> getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions)
List the metric namespaces for a load test run.
Response Body Schema
{
value (Required): [
(Required){
description: String (Optional)
name: String (Optional)
}
]
}
Parameters:
Returns:
getServerMetricsConfigWithResponse
public Response<BinaryData> getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions)
List server metrics configuration for the given test run.
Response Body Schema
{
testRunId: String (Optional)
metrics (Optional): {
String (Required): {
id: String (Optional)
resourceId: String (Required)
metricNamespace: String (Required)
displayDescription: String (Optional)
name: String (Required)
aggregation: String (Required)
unit: String (Optional)
resourceType: String (Required)
}
}
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Parameters:
Returns:
getTestRunFileWithResponse
public Response<BinaryData> getTestRunFileWithResponse(String testRunId, String fileName, RequestOptions requestOptions)
Get test run file by file name.
Response Body Schema
{
url: String (Optional)
fileName: String (Optional)
fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
expireDateTime: OffsetDateTime (Optional)
validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
validationFailureDetails: String (Optional)
}
Parameters:
Returns:
getTestRunWithResponse
public Response<BinaryData> getTestRunWithResponse(String testRunId, RequestOptions requestOptions)
Get test run details by name.
Response Body Schema
{
passFailCriteria (Optional): {
passFailMetrics (Optional): {
String (Required): {
clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
condition: String (Optional)
requestName: String (Optional)
value: Double (Optional)
action: String(continue/stop) (Optional)
actualValue: Double (Optional)
result: String(passed/undetermined/failed) (Optional)
}
}
}
secrets (Optional): {
String (Required): {
value: String (Optional)
type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
}
}
certificate (Optional): {
value: String (Optional)
type: String(AKV_CERT_URI) (Optional)
name: String (Optional)
}
environmentVariables (Optional): {
String: String (Required)
}
errorDetails (Optional): [
(Optional){
message: String (Optional)
}
]
testRunStatistics (Optional): {
String (Required): {
transaction: String (Optional)
sampleCount: Double (Optional)
errorCount: Double (Optional)
errorPct: Double (Optional)
meanResTime: Double (Optional)
medianResTime: Double (Optional)
maxResTime: Double (Optional)
minResTime: Double (Optional)
pct1ResTime: Double (Optional)
pct2ResTime: Double (Optional)
pct3ResTime: Double (Optional)
throughput: Double (Optional)
receivedKBytesPerSec: Double (Optional)
sentKBytesPerSec: Double (Optional)
}
}
loadTestConfiguration (Optional): {
engineInstances: Integer (Optional)
splitAllCSVs: Boolean (Optional)
quickStartTest: Boolean (Optional)
optionalLoadTestConfig (Optional): {
endpointUrl: String (Optional)
virtualUsers: Integer (Optional)
rampUpTime: Integer (Optional)
duration: Integer (Optional)
}
}
testArtifacts (Optional): {
inputArtifacts (Optional): {
configFileInfo (Optional): {
url: String (Optional)
fileName: String (Optional)
fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
expireDateTime: OffsetDateTime (Optional)
validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
validationFailureDetails: String (Optional)
}
testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
additionalFileInfo (Optional): [
(recursive schema, see above)
]
}
outputArtifacts (Optional): {
resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
}
}
testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
virtualUsers: Integer (Optional)
testRunId: String (Optional)
displayName: String (Optional)
testId: String (Optional)
description: String (Optional)
status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
startDateTime: OffsetDateTime (Optional)
endDateTime: OffsetDateTime (Optional)
executedDateTime: OffsetDateTime (Optional)
portalUrl: String (Optional)
duration: Long (Optional)
subnetId: String (Optional)
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Parameters:
Returns:
listMetricDimensionValues
public PagedIterable<BinaryData> listMetricDimensionValues(String testRunId, String name, String metricName, String metricNamespace, String timespan, RequestOptions requestOptions)
List the dimension values for the given metric dimension name.
Query Parameters
| -------- | ------ | -------- | ---------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| interval | String | No | The interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H". |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
String
Parameters:
Returns:
listMetrics
public PagedIterable<BinaryData> listMetrics(String testRunId, String metricName, String metricNamespace, String timespan, RequestOptions requestOptions)
List the metric values for a load test run.
Query Parameters
| ----------- | ------ | -------- | ---------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| aggregation | String | No | The aggregation |
| interval | String | No | The interval (i.e. timegrain) of the query. Allowed values: "PT5S", "PT10S", "PT1M", "PT5M", "PT1H". |
You can add these to a request with RequestOptions#addQueryParam
Header Parameters
| ------------ | ------ | -------- | ----------------------------------------------------- |
| Name | Type | Required | Description |
| Content-Type | String | No | The content type. Allowed values: "application/json". |
You can add these to a request with RequestOptions#addHeader
Request Body Schema
{
filters (Optional): [
(Optional){
name: String (Optional)
values (Optional): [
String (Optional)
]
}
]
}
Response Body Schema
{
data (Optional): [
(Optional){
timestamp: String (Optional)
value: Double (Optional)
}
]
dimensionValues (Optional): [
(Optional){
name: String (Optional)
value: String (Optional)
}
]
}
Parameters:
Returns:
listTestRuns
public PagedIterable<BinaryData> listTestRuns(RequestOptions requestOptions)
Get all test runs with given filters.
Query Parameters
| ------------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name | Type | Required | Description |
| orderby | String | No | Sort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - executedDateTime |
| search | String | No | 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. |
| testId | String | No | Unique name of an existing load test. |
| executionFrom | OffsetDateTime | No | Start DateTime(ISO 8601 literal format) of test-run execution time filter range. |
| executionTo | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of test-run execution time filter range. |
| status | String | No | Comma separated list of test run status. |
| maxpagesize | Integer | No | Number of results in response. |
You can add these to a request with RequestOptions#addQueryParam
Response Body Schema
{
passFailCriteria (Optional): {
passFailMetrics (Optional): {
String (Required): {
clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
condition: String (Optional)
requestName: String (Optional)
value: Double (Optional)
action: String(continue/stop) (Optional)
actualValue: Double (Optional)
result: String(passed/undetermined/failed) (Optional)
}
}
}
secrets (Optional): {
String (Required): {
value: String (Optional)
type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
}
}
certificate (Optional): {
value: String (Optional)
type: String(AKV_CERT_URI) (Optional)
name: String (Optional)
}
environmentVariables (Optional): {
String: String (Required)
}
errorDetails (Optional): [
(Optional){
message: String (Optional)
}
]
testRunStatistics (Optional): {
String (Required): {
transaction: String (Optional)
sampleCount: Double (Optional)
errorCount: Double (Optional)
errorPct: Double (Optional)
meanResTime: Double (Optional)
medianResTime: Double (Optional)
maxResTime: Double (Optional)
minResTime: Double (Optional)
pct1ResTime: Double (Optional)
pct2ResTime: Double (Optional)
pct3ResTime: Double (Optional)
throughput: Double (Optional)
receivedKBytesPerSec: Double (Optional)
sentKBytesPerSec: Double (Optional)
}
}
loadTestConfiguration (Optional): {
engineInstances: Integer (Optional)
splitAllCSVs: Boolean (Optional)
quickStartTest: Boolean (Optional)
optionalLoadTestConfig (Optional): {
endpointUrl: String (Optional)
virtualUsers: Integer (Optional)
rampUpTime: Integer (Optional)
duration: Integer (Optional)
}
}
testArtifacts (Optional): {
inputArtifacts (Optional): {
configFileInfo (Optional): {
url: String (Optional)
fileName: String (Optional)
fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
expireDateTime: OffsetDateTime (Optional)
validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
validationFailureDetails: String (Optional)
}
testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
additionalFileInfo (Optional): [
(recursive schema, see above)
]
}
outputArtifacts (Optional): {
resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
}
}
testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
virtualUsers: Integer (Optional)
testRunId: String (Optional)
displayName: String (Optional)
testId: String (Optional)
description: String (Optional)
status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
startDateTime: OffsetDateTime (Optional)
endDateTime: OffsetDateTime (Optional)
executedDateTime: OffsetDateTime (Optional)
portalUrl: String (Optional)
duration: Long (Optional)
subnetId: String (Optional)
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Parameters:
Returns:
stopTestRunWithResponse
public Response<BinaryData> stopTestRunWithResponse(String testRunId, RequestOptions requestOptions)
Stop test run by name.
Response Body Schema
{
passFailCriteria (Optional): {
passFailMetrics (Optional): {
String (Required): {
clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
aggregate: String(count/percentage/avg/p50/p90/p95/p99/min/max) (Optional)
condition: String (Optional)
requestName: String (Optional)
value: Double (Optional)
action: String(continue/stop) (Optional)
actualValue: Double (Optional)
result: String(passed/undetermined/failed) (Optional)
}
}
}
secrets (Optional): {
String (Required): {
value: String (Optional)
type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
}
}
certificate (Optional): {
value: String (Optional)
type: String(AKV_CERT_URI) (Optional)
name: String (Optional)
}
environmentVariables (Optional): {
String: String (Required)
}
errorDetails (Optional): [
(Optional){
message: String (Optional)
}
]
testRunStatistics (Optional): {
String (Required): {
transaction: String (Optional)
sampleCount: Double (Optional)
errorCount: Double (Optional)
errorPct: Double (Optional)
meanResTime: Double (Optional)
medianResTime: Double (Optional)
maxResTime: Double (Optional)
minResTime: Double (Optional)
pct1ResTime: Double (Optional)
pct2ResTime: Double (Optional)
pct3ResTime: Double (Optional)
throughput: Double (Optional)
receivedKBytesPerSec: Double (Optional)
sentKBytesPerSec: Double (Optional)
}
}
loadTestConfiguration (Optional): {
engineInstances: Integer (Optional)
splitAllCSVs: Boolean (Optional)
quickStartTest: Boolean (Optional)
optionalLoadTestConfig (Optional): {
endpointUrl: String (Optional)
virtualUsers: Integer (Optional)
rampUpTime: Integer (Optional)
duration: Integer (Optional)
}
}
testArtifacts (Optional): {
inputArtifacts (Optional): {
configFileInfo (Optional): {
url: String (Optional)
fileName: String (Optional)
fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
expireDateTime: OffsetDateTime (Optional)
validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
validationFailureDetails: String (Optional)
}
testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
additionalFileInfo (Optional): [
(recursive schema, see above)
]
}
outputArtifacts (Optional): {
resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
}
}
testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
virtualUsers: Integer (Optional)
testRunId: String (Optional)
displayName: String (Optional)
testId: String (Optional)
description: String (Optional)
status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Optional)
startDateTime: OffsetDateTime (Optional)
endDateTime: OffsetDateTime (Optional)
executedDateTime: OffsetDateTime (Optional)
portalUrl: String (Optional)
duration: Long (Optional)
subnetId: String (Optional)
createdDateTime: OffsetDateTime (Optional)
createdBy: String (Optional)
lastModifiedDateTime: OffsetDateTime (Optional)
lastModifiedBy: String (Optional)
}
Parameters:
Returns: