LoadTestAdministrationAsyncClient Class

  • java.lang.Object
    • com.azure.developer.loadtesting.LoadTestAdministrationAsyncClient

public final class LoadTestAdministrationAsyncClient

Initializes a new instance of the asynchronous LoadTestingClient type.

Method Summary

Modifier and Type Method and Description
PollerFlux<BinaryData,BinaryData> beginUploadTestFile(String testId, String fileName, BinaryData body, RequestOptions fileUploadRequestOptions)

Uploads file and polls the validation status of the uploaded file.

reactor.core.publisher.Mono<Response<BinaryData>> createOrUpdateAppComponentsWithResponse(String testId, BinaryData body, RequestOptions requestOptions)

Associate an app component (collection of azure resources) to a test.

reactor.core.publisher.Mono<Response<BinaryData>> createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body, RequestOptions requestOptions)

Configure server metrics for a test.

reactor.core.publisher.Mono<Response<BinaryData>> createOrUpdateTestWithResponse(String testId, BinaryData body, RequestOptions requestOptions)

Create a new test or update an existing test.

reactor.core.publisher.Mono<Response<Void>> deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions)

Delete file by the file name for a test.

reactor.core.publisher.Mono<Response<Void>> deleteTestWithResponse(String testId, RequestOptions requestOptions)

Delete a test by its name.

reactor.core.publisher.Mono<Response<BinaryData>> getAppComponentsWithResponse(String testId, RequestOptions requestOptions)

Get associated app component (collection of azure resources) for the given test.

reactor.core.publisher.Mono<Response<BinaryData>> getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions)

List server metrics configuration for the given test.

reactor.core.publisher.Mono<Response<BinaryData>> getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions)

Get test file by the file name.

reactor.core.publisher.Mono<Response<BinaryData>> getTestWithResponse(String testId, RequestOptions requestOptions)

Get load test details by test name.

PagedFlux<BinaryData> listTestFiles(String testId, RequestOptions requestOptions)

Get all test files.

PagedFlux<BinaryData> listTests(RequestOptions requestOptions)

Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.

Methods inherited from java.lang.Object

Method Details

beginUploadTestFile

public PollerFlux<BinaryData,BinaryData> beginUploadTestFile(String testId, String fileName, BinaryData body, RequestOptions fileUploadRequestOptions)

Uploads file and polls the validation status of the uploaded file.

Parameters:

testId - Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$.
fileName - Unique name for test file with file extension like : App.jmx.
body - The file content as application/octet-stream.
fileUploadRequestOptions - The options to configure the file upload HTTP request before HTTP client sends it.

Returns:

A PollerFlux<T,U> to poll on and retrieve the file info with validation status.

createOrUpdateAppComponentsWithResponse

public Mono<Response<BinaryData>> createOrUpdateAppComponentsWithResponse(String testId, BinaryData body, RequestOptions requestOptions)

Associate an app component (collection of azure resources) to a test.

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)
         }
     }
     testId: 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)
         }
     }
     testId: String (Optional)
     createdDateTime: OffsetDateTime (Optional)
     createdBy: String (Optional)
     lastModifiedDateTime: OffsetDateTime (Optional)
     lastModifiedBy: String (Optional)
 }

Parameters:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
body - App Component model.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

test app component along with Response<T> on successful completion of Mono.

createOrUpdateServerMetricsConfigWithResponse

public Mono<Response<BinaryData>> createOrUpdateServerMetricsConfigWithResponse(String testId, BinaryData body, RequestOptions requestOptions)

Configure server metrics for a test.

Request Body Schema

{
     testId: 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

{
     testId: 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:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
body - Server metric configuration model.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

test server metrics configuration along with Response<T> on successful completion of Mono.

createOrUpdateTestWithResponse

public Mono<Response<BinaryData>> createOrUpdateTestWithResponse(String testId, BinaryData body, RequestOptions requestOptions)

Create a new test or update an existing test.

Request 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)
     }
     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)
         }
     }
     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)
         ]
     }
     testId: String (Optional)
     description: String (Optional)
     displayName: String (Optional)
     subnetId: String (Optional)
     keyvaultReferenceIdentityType: String (Optional)
     keyvaultReferenceIdentityId: String (Optional)
     createdDateTime: OffsetDateTime (Optional)
     createdBy: String (Optional)
     lastModifiedDateTime: OffsetDateTime (Optional)
     lastModifiedBy: String (Optional)
 }

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)
     }
     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)
         }
     }
     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)
         ]
     }
     testId: String (Optional)
     description: String (Optional)
     displayName: String (Optional)
     subnetId: String (Optional)
     keyvaultReferenceIdentityType: String (Optional)
     keyvaultReferenceIdentityId: String (Optional)
     createdDateTime: OffsetDateTime (Optional)
     createdBy: String (Optional)
     lastModifiedDateTime: OffsetDateTime (Optional)
     lastModifiedBy: String (Optional)
 }

Parameters:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
body - Load test model.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

load test model along with Response<T> on successful completion of Mono.

deleteTestFileWithResponse

public Mono<Response<Void>> deleteTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions)

Delete file by the file name for a test.

Parameters:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
fileName - File name with file extension like app.jmx.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the Response<T> on successful completion of Mono.

deleteTestWithResponse

public Mono<Response<Void>> deleteTestWithResponse(String testId, RequestOptions requestOptions)

Delete a test by its name.

Parameters:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the Response<T> on successful completion of Mono.

getAppComponentsWithResponse

public Mono<Response<BinaryData>> getAppComponentsWithResponse(String testId, RequestOptions requestOptions)

Get associated app component (collection of azure resources) for the given test.

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)
         }
     }
     testId: String (Optional)
     createdDateTime: OffsetDateTime (Optional)
     createdBy: String (Optional)
     lastModifiedDateTime: OffsetDateTime (Optional)
     lastModifiedBy: String (Optional)
 }

Parameters:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

associated app component (collection of azure resources) for the given test along with Response<T> on successful completion of Mono.

getServerMetricsConfigWithResponse

public Mono<Response<BinaryData>> getServerMetricsConfigWithResponse(String testId, RequestOptions requestOptions)

List server metrics configuration for the given test.

Response Body Schema

{
     testId: 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:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

test server metrics configuration along with Response<T> on successful completion of Mono.

getTestFileWithResponse

public Mono<Response<BinaryData>> getTestFileWithResponse(String testId, String fileName, RequestOptions requestOptions)

Get test file by the 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:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
fileName - File name with file extension like app.jmx.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

test file by the file name along with Response<T> on successful completion of Mono.

getTestWithResponse

public Mono<Response<BinaryData>> getTestWithResponse(String testId, RequestOptions requestOptions)

Get load test details by test 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)
     }
     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)
         }
     }
     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)
         ]
     }
     testId: String (Optional)
     description: String (Optional)
     displayName: String (Optional)
     subnetId: String (Optional)
     keyvaultReferenceIdentityType: String (Optional)
     keyvaultReferenceIdentityId: String (Optional)
     createdDateTime: OffsetDateTime (Optional)
     createdBy: String (Optional)
     lastModifiedDateTime: OffsetDateTime (Optional)
     lastModifiedBy: String (Optional)
 }

Parameters:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

load test details by test name along with Response<T> on successful completion of Mono.

listTestFiles

public PagedFlux<BinaryData> listTestFiles(String testId, RequestOptions requestOptions)

Get all test files.

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:

testId - Unique name for the load test, must contain only lower-case alphabetic, numeric, underscore or hyphen characters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

all test files as paginated response with PagedFlux<T>.

listTests

public PagedFlux<BinaryData> listTests(RequestOptions requestOptions)

Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}.

Query Parameters

| --------------------- | -------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                  | Type           | Required | Description                                                                                                                                                                               |
| orderby               | String         | No       | Sort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime                                                            |
| search                | String         | No       | 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. |
| lastModifiedStartTime | OffsetDateTime | No       | Start DateTime(ISO 8601 literal format) of the last updated time range to filter tests.                                                                                                   |
| lastModifiedEndTime   | OffsetDateTime | No       | End DateTime(ISO 8601 literal format) of the last updated time range to filter tests.                                                                                                     |
| 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)
     }
     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)
         }
     }
     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)
         ]
     }
     testId: String (Optional)
     description: String (Optional)
     displayName: String (Optional)
     subnetId: String (Optional)
     keyvaultReferenceIdentityType: String (Optional)
     keyvaultReferenceIdentityId: String (Optional)
     createdDateTime: OffsetDateTime (Optional)
     createdBy: String (Optional)
     lastModifiedDateTime: OffsetDateTime (Optional)
     lastModifiedBy: String (Optional)
 }

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} as paginated response with PagedFlux<T>.

Applies to