Package com.azure.developer.loadtesting
Class TestRunClient
java.lang.Object
com.azure.developer.loadtesting.TestRunClient
Initializes a new instance of the synchronous LoadTestingClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.http.rest.Response<com.azure.core.util.BinaryData>
createOrUpdateTestRunWithResponse
(String testRunId, com.azure.core.util.BinaryData body, com.azure.core.http.rest.RequestOptions requestOptions) Create and start a new test run with the given name.com.azure.core.http.rest.Response<Void>
deleteTestRunWithResponse
(String testRunId, com.azure.core.http.rest.RequestOptions requestOptions) Delete a test run by its name.com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>
getTestRunClientMetricsFiltersWithResponse
(String testRunId, com.azure.core.http.rest.RequestOptions requestOptions) Get all filters that are supported for client metrics for a given load test run.com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>
getTestRunClientMetricsWithResponse
(String testRunId, com.azure.core.util.BinaryData body, com.azure.core.http.rest.RequestOptions requestOptions) Get all client metrics for a load test run.com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>
getTestRunFileWithResponse
(String testRunId, String fileId, com.azure.core.http.rest.RequestOptions requestOptions) Get test run file by file name.com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>
getTestRunWithResponse
(String testRunId, com.azure.core.http.rest.RequestOptions requestOptions) Get test run details by name.com.azure.core.http.rest.PagedIterable<com.azure.core.util.BinaryData>
listTestRunsSearch
(com.azure.core.http.rest.RequestOptions requestOptions) Get all test runs with given filters.com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>
stopTestRunWithResponse
(String testRunId, com.azure.core.http.rest.RequestOptions requestOptions) Stop test run by name.
-
Method Details
-
deleteTestRunWithResponse
public com.azure.core.http.rest.Response<Void> deleteTestRunWithResponse(String testRunId, com.azure.core.http.rest.RequestOptions requestOptions) Delete a test run by its name.- Parameters:
testRunId
- Unique name of the load test run, must be a valid URL character ^[a-z0-9_-]*$.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getTestRunWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> getTestRunWithResponse(String testRunId, com.azure.core.http.rest.RequestOptions requestOptions) Get test run details by name.Response Body Schema
{ testRunId: String (Optional) displayName: String (Optional) testId: String (Optional) resourceId: String (Optional) description: String (Optional) status: String (Optional) startDateTime: OffsetDateTime (Optional) endDateTime: OffsetDateTime (Optional) loadTestConfig (Optional): { engineInstances: Integer (Optional) splitAllCSVs: Boolean (Optional) } testResult: String (Optional) passFailCriteria (Optional): { passFailMetrics (Optional): { String (Optional): { clientmetric: String (Optional) aggregate: String (Optional) condition: String (Optional) requestName: String (Optional) value: Double (Optional) action: String (Optional) actualValue: Double (Optional) result: String (Optional) } } } testArtifacts (Optional): { inputArtifacts (Required): { configUrl (Optional): { url: String (Optional) fileId: String (Optional) filename: String (Optional) fileType: String(0/1/2) (Optional) expireTime: OffsetDateTime (Optional) validationStatus: String (Optional) } testScriptUrl (Optional): (recursive schema, see testScriptUrl above) userPropUrl (Optional): (recursive schema, see userPropUrl above) inputArtifactsZipFileurl (Optional): (recursive schema, see inputArtifactsZipFileurl above) additionalUrls (Optional): [ (recursive schema, see above) ] } outputArtifacts (Optional): { resultUrl (Optional): (recursive schema, see resultUrl above) logsUrl (Optional): (recursive schema, see logsUrl above) } } executedDateTime: OffsetDateTime (Optional) vusers: Integer (Optional) testRunStatistics (Optional): { String (Optional): { 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) } } createdDateTime: OffsetDateTime (Optional) createdBy: String (Optional) lastModifiedDateTime: OffsetDateTime (Optional) lastModifiedBy: String (Optional) portalUrl: String (Optional) secrets (Optional): { String (Optional): { value: String (Optional) type: String (Optional) } } environmentVariables (Optional): { String: String (Optional) } duration: Long (Optional) subnetId: String (Optional) }
- Parameters:
testRunId
- Unique name of load test run, must be a valid URL character ^[a-z0-9_-]*$.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- test run details by name along with
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getTestRunFileWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> getTestRunFileWithResponse(String testRunId, String fileId, com.azure.core.http.rest.RequestOptions requestOptions) Get test run file by file name.Response Body Schema
{ url: String (Optional) fileId: String (Optional) filename: String (Optional) fileType: String(0/1/2) (Optional) expireTime: OffsetDateTime (Optional) validationStatus: String (Optional) }
- Parameters:
testRunId
- Unique name of load test run, must be a valid URL character ^[a-z0-9_-]*$.fileId
- Unique identifier for test run file, must be a valid URL character ^[a-z0-9_-]*$.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- test run file by file name along with
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
stopTestRunWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> stopTestRunWithResponse(String testRunId, com.azure.core.http.rest.RequestOptions requestOptions) Stop test run by name.Response Body Schema
{ testRunId: String (Optional) displayName: String (Optional) testId: String (Optional) resourceId: String (Optional) description: String (Optional) status: String (Optional) startDateTime: OffsetDateTime (Optional) endDateTime: OffsetDateTime (Optional) loadTestConfig (Optional): { engineInstances: Integer (Optional) splitAllCSVs: Boolean (Optional) } testResult: String (Optional) passFailCriteria (Optional): { passFailMetrics (Optional): { String (Optional): { clientmetric: String (Optional) aggregate: String (Optional) condition: String (Optional) requestName: String (Optional) value: Double (Optional) action: String (Optional) actualValue: Double (Optional) result: String (Optional) } } } testArtifacts (Optional): { inputArtifacts (Required): { configUrl (Optional): { url: String (Optional) fileId: String (Optional) filename: String (Optional) fileType: String(0/1/2) (Optional) expireTime: OffsetDateTime (Optional) validationStatus: String (Optional) } testScriptUrl (Optional): (recursive schema, see testScriptUrl above) userPropUrl (Optional): (recursive schema, see userPropUrl above) inputArtifactsZipFileurl (Optional): (recursive schema, see inputArtifactsZipFileurl above) additionalUrls (Optional): [ (recursive schema, see above) ] } outputArtifacts (Optional): { resultUrl (Optional): (recursive schema, see resultUrl above) logsUrl (Optional): (recursive schema, see logsUrl above) } } executedDateTime: OffsetDateTime (Optional) vusers: Integer (Optional) testRunStatistics (Optional): { String (Optional): { 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) } } createdDateTime: OffsetDateTime (Optional) createdBy: String (Optional) lastModifiedDateTime: OffsetDateTime (Optional) lastModifiedBy: String (Optional) portalUrl: String (Optional) secrets (Optional): { String (Optional): { value: String (Optional) type: String (Optional) } } environmentVariables (Optional): { String: String (Optional) } duration: Long (Optional) subnetId: String (Optional) }
- Parameters:
testRunId
- Unique name of the load test run, must be a valid URL character ^[a-z0-9_-]*$.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- load test run model along with
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getTestRunClientMetricsWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> getTestRunClientMetricsWithResponse(String testRunId, com.azure.core.util.BinaryData body, com.azure.core.http.rest.RequestOptions requestOptions) Get all client metrics for a load test run.Request Body Schema
{ requestSamplers (Optional): [ String (Optional) ] errors (Optional): [ String (Optional) ] percentiles (Optional): [ String (Optional) ] groupByInterval: String (Optional) startTime: OffsetDateTime (Required) endTime: OffsetDateTime (Required) }
Response Body Schema
{ testRunId: String (Optional) timeSeries (Optional): { activeUsers (Optional): { String (Optional): [ (Optional){ timestamp: OffsetDateTime (Optional) value: Double (Optional) } ] } responseTime (Optional): { String (Optional): [ (recursive schema, see above) ] } throughput (Optional): { String (Optional): [ (recursive schema, see above) ] } errors (Optional): { String (Optional): [ (recursive schema, see above) ] } } }
- Parameters:
testRunId
- Unique name of the load test run, must be a valid URL character ^[a-z0-9_-]*$.body
- Client metrics request model.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- all client metrics for a load test run along with
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getTestRunClientMetricsFiltersWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> getTestRunClientMetricsFiltersWithResponse(String testRunId, com.azure.core.http.rest.RequestOptions requestOptions) Get all filters that are supported for client metrics for a given load test run.Response Body Schema
{ testRunId: String (Optional) filters (Optional): { requestSamplerValues (Optional): [ String (Optional) ] errorFiltersValues (Optional): [ String (Optional) ] } timeRange (Optional): { startTime: OffsetDateTime (Optional) endTime: OffsetDateTime (Optional) } }
- Parameters:
testRunId
- Unique name for load test run, must be a valid URL character ^[a-z0-9_-]*$.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- all filters that are supported for client metrics for a given load test run along with
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
createOrUpdateTestRunWithResponse
public com.azure.core.http.rest.Response<com.azure.core.util.BinaryData> createOrUpdateTestRunWithResponse(String testRunId, com.azure.core.util.BinaryData body, com.azure.core.http.rest.RequestOptions requestOptions) Create and start a new test run with the given name.Query Parameters
Query Parameters Name Type Required Description oldTestRunId String No Existing test run Id that should be rerun. RequestOptions.addQueryParam(java.lang.String, java.lang.String)
Request Body Schema
{ testRunId: String (Optional) displayName: String (Optional) testId: String (Optional) resourceId: String (Optional) description: String (Optional) status: String (Optional) startDateTime: OffsetDateTime (Optional) endDateTime: OffsetDateTime (Optional) loadTestConfig (Optional): { engineInstances: Integer (Optional) splitAllCSVs: Boolean (Optional) } testResult: String (Optional) passFailCriteria (Optional): { passFailMetrics (Optional): { String (Optional): { clientmetric: String (Optional) aggregate: String (Optional) condition: String (Optional) requestName: String (Optional) value: Double (Optional) action: String (Optional) actualValue: Double (Optional) result: String (Optional) } } } testArtifacts (Optional): { inputArtifacts (Required): { configUrl (Optional): { url: String (Optional) fileId: String (Optional) filename: String (Optional) fileType: String(0/1/2) (Optional) expireTime: OffsetDateTime (Optional) validationStatus: String (Optional) } testScriptUrl (Optional): (recursive schema, see testScriptUrl above) userPropUrl (Optional): (recursive schema, see userPropUrl above) inputArtifactsZipFileurl (Optional): (recursive schema, see inputArtifactsZipFileurl above) additionalUrls (Optional): [ (recursive schema, see above) ] } outputArtifacts (Optional): { resultUrl (Optional): (recursive schema, see resultUrl above) logsUrl (Optional): (recursive schema, see logsUrl above) } } executedDateTime: OffsetDateTime (Optional) vusers: Integer (Optional) testRunStatistics (Optional): { String (Optional): { 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) } } createdDateTime: OffsetDateTime (Optional) createdBy: String (Optional) lastModifiedDateTime: OffsetDateTime (Optional) lastModifiedBy: String (Optional) portalUrl: String (Optional) secrets (Optional): { String (Optional): { value: String (Optional) type: String (Optional) } } environmentVariables (Optional): { String: String (Optional) } duration: Long (Optional) subnetId: String (Optional) }
Response Body Schema
{ testRunId: String (Optional) displayName: String (Optional) testId: String (Optional) resourceId: String (Optional) description: String (Optional) status: String (Optional) startDateTime: OffsetDateTime (Optional) endDateTime: OffsetDateTime (Optional) loadTestConfig (Optional): { engineInstances: Integer (Optional) splitAllCSVs: Boolean (Optional) } testResult: String (Optional) passFailCriteria (Optional): { passFailMetrics (Optional): { String (Optional): { clientmetric: String (Optional) aggregate: String (Optional) condition: String (Optional) requestName: String (Optional) value: Double (Optional) action: String (Optional) actualValue: Double (Optional) result: String (Optional) } } } testArtifacts (Optional): { inputArtifacts (Required): { configUrl (Optional): { url: String (Optional) fileId: String (Optional) filename: String (Optional) fileType: String(0/1/2) (Optional) expireTime: OffsetDateTime (Optional) validationStatus: String (Optional) } testScriptUrl (Optional): (recursive schema, see testScriptUrl above) userPropUrl (Optional): (recursive schema, see userPropUrl above) inputArtifactsZipFileurl (Optional): (recursive schema, see inputArtifactsZipFileurl above) additionalUrls (Optional): [ (recursive schema, see above) ] } outputArtifacts (Optional): { resultUrl (Optional): (recursive schema, see resultUrl above) logsUrl (Optional): (recursive schema, see logsUrl above) } } executedDateTime: OffsetDateTime (Optional) vusers: Integer (Optional) testRunStatistics (Optional): { String (Optional): { 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) } } createdDateTime: OffsetDateTime (Optional) createdBy: String (Optional) lastModifiedDateTime: OffsetDateTime (Optional) lastModifiedBy: String (Optional) portalUrl: String (Optional) secrets (Optional): { String (Optional): { value: String (Optional) type: String (Optional) } } environmentVariables (Optional): { String: String (Optional) } duration: Long (Optional) subnetId: String (Optional) }
- Parameters:
testRunId
- Unique name of the load test run, must be a valid URL character ^[a-z0-9_-]*$.body
- Load test run model.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- load test run model along with
Response
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
listTestRunsSearch
public com.azure.core.http.rest.PagedIterable<com.azure.core.util.BinaryData> listTestRunsSearch(com.azure.core.http.rest.RequestOptions requestOptions) Get all test runs with given filters.Query Parameters
Query Parameters Name Type Required Description orderBy String No Sort on one of the field - status, displayName, executedDateTime in (field asc/desc) format. eg: displayName asc. continuationToken String No Continuation token to get the next page of response. search String No Filter search based on searchable fields - description, executedUser. executionFrom OffsetDateTime No The end DateTime(ISO 8601 literal format) of test-run execution time filter range. executionTo OffsetDateTime No The start DateTime(ISO 8601 literal format) of test-run execution time filter range. status String No Comma separated list of test run status, value can be - "ACCEPTED", "NOTSTARTED","PROVISIONING","PROVISIONED","CONFIGURING", "CONFIGURED","EXECUTING","EXECUTED","DEPROVISIONING","DEPROVISIONED","DONE","CANCELLED","FAILED". maxPageSize Integer No Number of results in response. testId String No Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$. RequestOptions.addQueryParam(java.lang.String, java.lang.String)
Response Body Schema
{ value (Required): [ (Required){ testRunId: String (Optional) displayName: String (Optional) testId: String (Optional) resourceId: String (Optional) description: String (Optional) status: String (Optional) startDateTime: OffsetDateTime (Optional) endDateTime: OffsetDateTime (Optional) loadTestConfig (Optional): { engineInstances: Integer (Optional) splitAllCSVs: Boolean (Optional) } testResult: String (Optional) passFailCriteria (Optional): { passFailMetrics (Optional): { String (Optional): { clientmetric: String (Optional) aggregate: String (Optional) condition: String (Optional) requestName: String (Optional) value: Double (Optional) action: String (Optional) actualValue: Double (Optional) result: String (Optional) } } } testArtifacts (Optional): { inputArtifacts (Required): { configUrl (Optional): { url: String (Optional) fileId: String (Optional) filename: String (Optional) fileType: String(0/1/2) (Optional) expireTime: OffsetDateTime (Optional) validationStatus: String (Optional) } testScriptUrl (Optional): (recursive schema, see testScriptUrl above) userPropUrl (Optional): (recursive schema, see userPropUrl above) inputArtifactsZipFileurl (Optional): (recursive schema, see inputArtifactsZipFileurl above) additionalUrls (Optional): [ (recursive schema, see above) ] } outputArtifacts (Optional): { resultUrl (Optional): (recursive schema, see resultUrl above) logsUrl (Optional): (recursive schema, see logsUrl above) } } executedDateTime: OffsetDateTime (Optional) vusers: Integer (Optional) testRunStatistics (Optional): { String (Optional): { 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) } } createdDateTime: OffsetDateTime (Optional) createdBy: String (Optional) lastModifiedDateTime: OffsetDateTime (Optional) lastModifiedBy: String (Optional) portalUrl: String (Optional) secrets (Optional): { String (Optional): { value: String (Optional) type: String (Optional) } } environmentVariables (Optional): { String: String (Optional) } duration: Long (Optional) subnetId: String (Optional) } ] nextLink: String (Optional) }
- Parameters:
requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- all test runs with given filters as paginated response with
PagedIterable
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-