PROPERTIES
- = CoreUtils.getProperties("azure-developer-loadtesting.properties");
-
private static final ClientLogger LOGGER = new ClientLogger(LoadTestAdministrationClientBuilder.class);
-
- @Generated
- private void validateClient() {
- // This method is invoked from 'buildInnerClient'/'buildClient' method.
- // Developer can customize this method, to validate that the necessary conditions are met for the new client.
- Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
- }
}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java
index bfafcd59881bd..160e8a5ee4995 100644
--- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunAsyncClient.java
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -11,56 +12,212 @@
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
-import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.polling.PollerFlux;
-import com.azure.developer.loadtesting.implementation.LoadTestRunsImpl;
-import java.time.Duration;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.implementation.LoadTestRunClientImpl;
+import com.azure.developer.loadtesting.models.MetricDefinitionCollection;
+import com.azure.developer.loadtesting.models.MetricNamespaceCollection;
+import com.azure.developer.loadtesting.models.MetricRequestPayload;
+import com.azure.developer.loadtesting.models.TestProfileRun;
+import com.azure.developer.loadtesting.models.TestRun;
+import com.azure.developer.loadtesting.models.TestRunAppComponents;
+import com.azure.developer.loadtesting.models.TestRunFileInfo;
+import com.azure.developer.loadtesting.models.TestRunServerMetricConfig;
+import com.azure.developer.loadtesting.models.TimeGrain;
+import com.azure.developer.loadtesting.models.TimeSeriesElement;
+import java.time.OffsetDateTime;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the asynchronous LoadTestingClient type.
+ * Initializes a new instance of the asynchronous LoadTestRunClient type.
*/
@ServiceClient(builder = LoadTestRunClientBuilder.class, isAsync = true)
public final class LoadTestRunAsyncClient {
-
@Generated
- private final LoadTestRunsImpl serviceClient;
+ private final LoadTestRunClientImpl serviceClient;
/**
* Initializes an instance of LoadTestRunAsyncClient class.
- *
+ *
* @param serviceClient the service client implementation.
*/
@Generated
- LoadTestRunAsyncClient(LoadTestRunsImpl serviceClient) {
+ LoadTestRunAsyncClient(LoadTestRunClientImpl serviceClient) {
this.serviceClient = serviceClient;
}
/**
- * Configure server metrics for a test run.
+ * Create and start a new test run with the given test run Id.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * oldTestRunId | String | No | Existing test run identifier that should be rerun, if this
+ * is provided, the
+ * test will run with the JMX file, configuration and app components from the
+ * existing test run. You can override the configuration values for new test run
+ * in the request body. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
* Request Body Schema
*
*
* {@code
* {
- * testRunId: String (Optional)
- * metrics (Optional): {
+ * testRunId: String (Required)
+ * passFailCriteria (Optional): {
+ * passFailMetrics (Optional): {
+ * String (Required): {
+ * clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+ * }
+ * }
+ * passFailServerMetrics (Optional): {
+ * String (Required): {
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * metricName: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * condition: String (Optional, Required on create)
+ * value: double (Optional, Required on create)
+ * action: String(continue/stop) (Optional)
+ * actualValue: Double (Optional)
+ * result: String(passed/undetermined/failed) (Optional)
+ * }
+ * }
+ * }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
+ * secrets (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)
+ * 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)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
+ * throughput: Double (Optional)
+ * receivedKBytesPerSec: Double (Optional)
+ * sentKBytesPerSec: Double (Optional)
+ * }
+ * }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
+ * loadTestConfiguration (Optional): {
+ * engineInstances: Integer (Optional)
+ * splitAllCSVs: Boolean (Optional)
+ * quickStartTest: Boolean (Optional)
+ * optionalLoadTestConfig (Optional): {
+ * endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
+ * virtualUsers: Integer (Optional)
+ * rampUpTime: Integer (Optional)
+ * duration: Integer (Optional)
+ * }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
+ * }
+ * testArtifacts (Optional): {
+ * inputArtifacts (Optional): {
+ * configFileInfo (Optional): {
+ * fileName: String (Required)
+ * url: String (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (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)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
+ * additionalFileInfo (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * outputArtifacts (Optional): {
+ * resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+ * logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
+ * testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+ * virtualUsers: Integer (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)
+ * virtualUserHours: Double (Optional)
+ * subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
+ * createdByType: String(User/ScheduledTrigger) (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -74,19 +231,150 @@ public final class LoadTestRunAsyncClient {
*
* {@code
* {
- * testRunId: String (Optional)
- * metrics (Optional): {
+ * testRunId: String (Required)
+ * passFailCriteria (Optional): {
+ * passFailMetrics (Optional): {
+ * String (Required): {
+ * clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+ * }
+ * }
+ * passFailServerMetrics (Optional): {
+ * String (Required): {
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * metricName: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * condition: String (Optional, Required on create)
+ * value: double (Optional, Required on create)
+ * action: String(continue/stop) (Optional)
+ * actualValue: Double (Optional)
+ * result: String(passed/undetermined/failed) (Optional)
+ * }
+ * }
+ * }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
+ * secrets (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)
+ * 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)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
+ * throughput: Double (Optional)
+ * receivedKBytesPerSec: Double (Optional)
+ * sentKBytesPerSec: Double (Optional)
+ * }
+ * }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
+ * loadTestConfiguration (Optional): {
+ * engineInstances: Integer (Optional)
+ * splitAllCSVs: Boolean (Optional)
+ * quickStartTest: Boolean (Optional)
+ * optionalLoadTestConfig (Optional): {
+ * endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
+ * virtualUsers: Integer (Optional)
+ * rampUpTime: Integer (Optional)
+ * duration: Integer (Optional)
+ * }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
+ * }
+ * testArtifacts (Optional): {
+ * inputArtifacts (Optional): {
+ * configFileInfo (Optional): {
+ * fileName: String (Required)
+ * url: String (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (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)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
+ * additionalFileInfo (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * outputArtifacts (Optional): {
+ * resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+ * logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
+ * testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+ * virtualUsers: Integer (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)
+ * virtualUserHours: Double (Optional)
+ * subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
+ * createdByType: String(User/ScheduledTrigger) (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -94,66 +382,38 @@ public final class LoadTestRunAsyncClient {
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body Server metric configuration model.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run server metrics configuration along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return load test run model along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body,
+ public Mono> createOrUpdateTestRunWithResponse(String testRunId, BinaryData body,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateServerMetricsConfigWithResponseAsync(testRunId, body, requestOptions);
- }
-
- /**
- * Starts a test run and polls the status of the test run.
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body Load test run model.
- * @param testRunRequestOptions The options to configure the file upload HTTP request before HTTP client sends it.
- * @throws ResourceNotFoundException when a test with {@code testRunId} doesn't exist.
- * @return A {@link PollerFlux} to poll on and retrieve the test run
- * status(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE).
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public PollerFlux beginTestRun(String testRunId, BinaryData body,
- RequestOptions testRunRequestOptions) {
- RequestOptions defaultRequestOptions = new RequestOptions();
- if (testRunRequestOptions != null) {
- defaultRequestOptions.setContext(testRunRequestOptions.getContext());
- }
- return new PollerFlux<>(Duration.ofSeconds(5),
- (context) -> createOrUpdateTestRunWithResponse(testRunId, body, testRunRequestOptions)
- .flatMap(FluxUtil::toMono),
- (context) -> getTestRunWithResponse(testRunId, defaultRequestOptions).flatMap(FluxUtil::toMono)
- .flatMap(testRunBinary -> PollingUtils
- .getPollResponseMono(() -> PollingUtils.getTestRunStatus(testRunBinary))),
- (activationResponse, context) -> stopTestRunWithResponse(testRunId, defaultRequestOptions)
- .flatMap(FluxUtil::toMono),
- (context) -> getTestRunWithResponse(testRunId, defaultRequestOptions).flatMap(FluxUtil::toMono));
+ return this.serviceClient.createOrUpdateTestRunWithResponseAsync(testRunId, body, requestOptions);
}
/**
- * Associate an app component (collection of azure resources) to a test run.
+ * Add an app component to a test run.
+ *
+ * Add an app component to a test run by providing the resource Id, name and type.
* Request Body Schema
*
*
* {@code
* {
- * components (Required): {
+ * components (Optional, Required on create): {
* String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
* displayName: String (Optional)
* resourceGroup: String (Optional)
* subscriptionId: String (Optional)
@@ -174,11 +434,11 @@ public PollerFlux beginTestRun(String testRunId, BinaryD
*
* {@code
* {
- * components (Required): {
+ * components (Optional, Required on create): {
* String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
* displayName: String (Optional)
* resourceGroup: String (Optional)
* subscriptionId: String (Optional)
@@ -193,9 +453,9 @@ public PollerFlux beginTestRun(String testRunId, BinaryD
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param body App Component model.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -212,156 +472,110 @@ public Mono> createOrUpdateAppComponentsWithResponse(String
}
/**
- * List the metric values for a load test run.
- *
- *
- * Query Parameters
- *
- *
- * 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 {@link RequestOptions#addQueryParam}
- *
- *
- * Request Body Schema
- *
+ * Configure server metrics for a test run.
+ *
Request Body Schema
+ *
*
* {@code
* {
- * filters (Optional): [
- * (Optional){
- * name: String (Optional)
- * values (Optional): [
- * String (Optional)
- * ]
+ * testRunId: String (Optional)
+ * metrics (Optional): {
+ * String (Required): {
+ * id: String (Optional)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * displayDescription: String (Optional)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * unit: String (Optional)
+ * resourceType: String (Optional, Required on create)
* }
- * ]
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
* }
* }
*
- *
- *
- * Response Body Schema
- *
+ *
+ *
Response Body Schema
+ *
*
* {@code
* {
- * value (Optional): [
- * (Optional){
- * data (Optional): [
- * (Optional){
- * timestamp: String (Optional)
- * value: Double (Optional)
- * }
- * ]
- * dimensionValues (Optional): [
- * (Optional){
- * name: String (Optional)
- * value: String (Optional)
- * }
- * ]
+ * testRunId: String (Optional)
+ * metrics (Optional): {
+ * String (Required): {
+ * id: String (Optional)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * displayDescription: String (Optional)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * unit: String (Optional)
+ * resourceType: String (Optional, Required on create)
* }
- * ]
- * nextLink: String (Optional)
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param metricName Metric name.
- * @param metricNamespace Metric namespace to query metric definitions for.
- * @param timespan The timespan of the query. It is a string with the following format
- * 'startDateTime_ISO/endDateTime_ISO'.
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body Server metric configuration model.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response to a metrics query as paginated response with {@link PagedFlux}.
+ * @return test run server metrics configuration along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listMetrics(String testRunId, String metricName, String metricNamespace,
- String timespan, RequestOptions requestOptions) {
- if (requestOptions == null) {
- requestOptions = new RequestOptions();
- }
- // Content-Type header required even though body can be null
- requestOptions.setHeader(HttpHeaderName.CONTENT_TYPE, "application/json");
- return this.serviceClient.listMetricsAsync(testRunId, metricName, metricNamespace, timespan, requestOptions);
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.createOrUpdateServerMetricsConfigWithResponseAsync(testRunId, body, requestOptions);
}
/**
- * List the dimension values for the given metric dimension name.
- * Query Parameters
- *
- * 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 {@link RequestOptions#addQueryParam}
- * Response Body Schema
+ * Delete an existing load test run.
*
- *
- * {@code
- * String
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param name Dimension name.
- * @param metricName Metric name.
- * @param metricNamespace Metric namespace to query metric definitions for.
- * @param timespan The timespan of the query. It is a string with the following format
- * 'startDateTime_ISO/endDateTime_ISO'.
+ * Delete an existing load test run by providing the testRunId.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return metrics dimension values as paginated response with {@link PagedFlux}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@Generated
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux listMetricDimensionValues(String testRunId, String name, String metricName,
- String metricNamespace, String timespan, RequestOptions requestOptions) {
- return this.serviceClient.listMetricDimensionValuesAsync(testRunId, name, metricName, metricNamespace, timespan,
- requestOptions);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.serviceClient.deleteTestRunWithResponseAsync(testRunId, requestOptions);
}
/**
- * Get associated app component (collection of azure resources) for the given test run.
+ * Get associated app component (collection of azure resources) for the given test
+ * run.
* Response Body Schema
*
*
* {@code
* {
- * components (Required): {
+ * components (Optional, Required on create): {
* String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
* displayName: String (Optional)
* resourceGroup: String (Optional)
* subscriptionId: String (Optional)
@@ -376,16 +590,16 @@ public PagedFlux listMetricDimensionValues(String testRunId, String
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return associated app component (collection of azure resources) for the given test run along with
- * {@link Response} on successful completion of {@link Mono}.
+ * @return associated app component (collection of azure resources) for the given test
+ * run along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -394,7 +608,7 @@ public Mono> getAppComponentsWithResponse(String testRunId,
}
/**
- * List server metrics configuration for the given test run.
+ * Get associated server metrics configuration for the given test run.
* Response Body Schema
*
*
@@ -404,13 +618,13 @@ public Mono> getAppComponentsWithResponse(String testRunId,
* metrics (Optional): {
* String (Required): {
* id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
* displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
* unit: String (Optional)
- * resourceType: String (Required)
+ * resourceType: String (Optional, Required on create)
* }
* }
* createdDateTime: OffsetDateTime (Optional)
@@ -420,16 +634,16 @@ public Mono> getAppComponentsWithResponse(String testRunId,
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run server metrics configuration along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return associated server metrics configuration for the given test run along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -439,42 +653,18 @@ public Mono> getServerMetricsConfigWithResponse(String test
}
/**
- * 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 identifier that should be rerun, if this is provided, the test will run with the JMX file,
- * configuration and app components from the existing test run. You can override the configuration values for new
- * test run in the request body. |
- *
- *
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- *
- * Request Body Schema
- *
+ * Get test run details by test run Id.
+ *
Response Body Schema
+ *
*
* {@code
* {
+ * testRunId: String (Required)
* passFailCriteria (Optional): {
* passFailMetrics (Optional): {
- * String (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)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -483,9 +673,27 @@ public Mono> getServerMetricsConfigWithResponse(String test
* result: String(passed/undetermined/failed) (Optional)
* }
* }
+ * passFailServerMetrics (Optional): {
+ * String (Required): {
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * metricName: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * condition: String (Optional, Required on create)
+ * value: double (Optional, Required on create)
+ * action: String(continue/stop) (Optional)
+ * actualValue: Double (Optional)
+ * result: String(passed/undetermined/failed) (Optional)
+ * }
+ * }
+ * }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
* }
* secrets (Optional): {
- * String (Optional): {
+ * String (Required): {
* value: String (Optional)
* type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
* }
@@ -496,7 +704,7 @@ public Mono> getServerMetricsConfigWithResponse(String test
* name: String (Optional)
* }
* environmentVariables (Optional): {
- * String: String (Optional)
+ * String: String (Required)
* }
* errorDetails (Optional): [
* (Optional){
@@ -504,7 +712,7 @@ public Mono> getServerMetricsConfigWithResponse(String test
* }
* ]
* testRunStatistics (Optional): {
- * String (Optional): {
+ * String (Required): {
* transaction: String (Optional)
* sampleCount: Double (Optional)
* errorCount: Double (Optional)
@@ -516,28 +724,45 @@ public Mono> getServerMetricsConfigWithResponse(String test
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -545,6 +770,7 @@ public Mono> getServerMetricsConfigWithResponse(String test
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -552,11 +778,15 @@ public Mono> getServerMetricsConfigWithResponse(String test
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -566,7 +796,13 @@ public Mono> getServerMetricsConfigWithResponse(String test
* executedDateTime: OffsetDateTime (Optional)
* portalUrl: String (Optional)
* duration: Long (Optional)
+ * virtualUserHours: Double (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
+ * createdByType: String(User/ScheduledTrigger) (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -574,328 +810,275 @@ public Mono> getServerMetricsConfigWithResponse(String test
* }
* }
*
- *
- *
- * Response Body Schema
- *
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test run details by test run Id along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.serviceClient.getTestRunWithResponseAsync(testRunId, requestOptions);
+ }
+
+ /**
+ * Get test run file by file name.
+ * Response Body Schema
+ *
*
* {@code
* {
- * passFailCriteria (Optional): {
- * passFailMetrics (Optional): {
- * String (Optional): {
- * 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 (Optional): {
- * 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 (Optional)
- * }
- * errorDetails (Optional): [
- * (Optional){
- * message: String (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)
- * }
- * }
- * 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)
+ * fileName: String (Required)
+ * url: String (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+ * validationFailureDetails: String (Optional)
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body Load test run model.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param fileName Name of the file.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return load test run model along with {@link Response} on successful completion of {@link Mono}.
+ * @return test run file by file name along with {@link Response} on successful completion of {@link Mono}.
*/
+ @Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- Mono> createOrUpdateTestRunWithResponse(String testRunId, BinaryData body,
+ public Mono> getTestRunFileWithResponse(String testRunId, String fileName,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateTestRunWithResponseAsync(testRunId, body, requestOptions);
+ return this.serviceClient.getTestRunFileWithResponseAsync(testRunId, fileName, requestOptions);
}
/**
- * Get test run details by name.
+ * List the dimension values for the given metric dimension name.
+ * Query Parameters
+ *
+ * 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 {@link RequestOptions#addQueryParam}
* Response Body Schema
*
*
* {@code
- * {
- * 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)
+ * String
+ * }
+ *
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param name Dimension name.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return metrics dimension values as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listMetricDimensionValues(String testRunId, String name, String metricname,
+ String metricNamespace, String timespan, RequestOptions requestOptions) {
+ return this.serviceClient.listMetricDimensionValuesAsync(testRunId, name, metricname, metricNamespace, timespan,
+ requestOptions);
+ }
+
+ /**
+ * List the metric definitions for a load test run.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * 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/Percentile75/Percentile90/Percentile95/Percentile96/Percentile97/Percentile98/Percentile99/Percentile999/Percentile9999) (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)
+ * }
* ]
* }
- * 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)
+ * ]
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricNamespace Metric namespace to query metric definitions for.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run details by name along with {@link Response} on successful completion of {@link Mono}.
+ * @return represents collection of metric definitions along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getTestRunWithResponseAsync(testRunId, requestOptions);
+ public Mono> getMetricDefinitionsWithResponse(String testRunId, String metricNamespace,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getMetricDefinitionsWithResponseAsync(testRunId, metricNamespace, requestOptions);
}
/**
- * Delete a test run by its name.
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ * List the metric namespaces for a load test run.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * value (Required): [
+ * (Required){
+ * description: String (Optional)
+ * name: String (Optional)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return represents collection of metric namespaces along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.deleteTestRunWithResponseAsync(testRunId, requestOptions);
+ public Mono> getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.serviceClient.getMetricNamespacesWithResponseAsync(testRunId, requestOptions);
}
/**
- * Get test run file by file name.
+ * List the metric values for a load test run.
+ * Query Parameters
+ *
+ * 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 {@link RequestOptions#addQueryParam}
+ * Header Parameters
+ *
+ * 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 {@link RequestOptions#addHeader}
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * filters (Optional): [
+ * (Optional){
+ * name: String (Optional)
+ * values (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
* Response Body Schema
*
*
* {@code
* {
- * 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)
+ * data (Optional): [
+ * (Optional){
+ * timestamp: OffsetDateTime (Optional)
+ * value: Double (Optional)
+ * }
+ * ]
+ * dimensionValues (Optional): [
+ * (Optional){
+ * name: String (Optional)
+ * value: String (Optional)
+ * }
+ * ]
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param fileName Test run file name with file extension.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run file by file name along with {@link Response} on successful completion of {@link Mono}.
+ * @return the response to a metrics query as paginated response with {@link PagedFlux}.
*/
@Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTestRunFileWithResponse(String testRunId, String fileName,
- RequestOptions requestOptions) {
- return this.serviceClient.getTestRunFileWithResponseAsync(testRunId, fileName, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listMetrics(String testRunId, String metricname, String metricNamespace,
+ String timespan, RequestOptions requestOptions) {
+ return this.serviceClient.listMetricsAsync(testRunId, metricname, metricNamespace, timespan, requestOptions);
}
/**
- * Get all test runs with given filters.
+ * Get all test runs for the given filters.
* Query Parameters
*
* 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 |
+ * 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. |
+ * 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
+ * |
executionFrom | OffsetDateTime | No | Start DateTime(RFC 3339 literal format) of
* test-run execution time filter range. |
- * executionTo | OffsetDateTime | No | End DateTime(ISO 8601 literal format) of test-run
+ * |
executionTo | OffsetDateTime | No | End DateTime(RFC 3339 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. |
@@ -906,11 +1089,12 @@ public Mono> getTestRunFileWithResponse(String testRunId, S
*
* {@code
* {
+ * testRunId: String (Required)
* 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)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -919,6 +1103,24 @@ public Mono> getTestRunFileWithResponse(String testRunId, S
* result: String(passed/undetermined/failed) (Optional)
* }
* }
+ * passFailServerMetrics (Optional): {
+ * String (Required): {
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * metricName: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * condition: String (Optional, Required on create)
+ * value: double (Optional, Required on create)
+ * action: String(continue/stop) (Optional)
+ * actualValue: Double (Optional)
+ * result: String(passed/undetermined/failed) (Optional)
+ * }
+ * }
+ * }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
* }
* secrets (Optional): {
* String (Required): {
@@ -952,28 +1154,45 @@ public Mono> getTestRunFileWithResponse(String testRunId, S
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -981,6 +1200,7 @@ public Mono> getTestRunFileWithResponse(String testRunId, S
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -988,11 +1208,15 @@ public Mono> getTestRunFileWithResponse(String testRunId, S
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -1002,7 +1226,13 @@ public Mono> getTestRunFileWithResponse(String testRunId, S
* executedDateTime: OffsetDateTime (Optional)
* portalUrl: String (Optional)
* duration: Long (Optional)
+ * virtualUserHours: Double (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
+ * createdByType: String(User/ScheduledTrigger) (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -1010,13 +1240,13 @@ public Mono> getTestRunFileWithResponse(String testRunId, S
* }
* }
*
- *
+ *
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return all test runs with given filters as paginated response with {@link PagedFlux}.
+ * @return all test runs for the given filters as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -1025,17 +1255,18 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) {
}
/**
- * Stop test run by name.
+ * Stop test run by test run Id.
* Response Body Schema
*
*
* {@code
* {
+ * testRunId: String (Required)
* 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)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -1044,6 +1275,24 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) {
* result: String(passed/undetermined/failed) (Optional)
* }
* }
+ * passFailServerMetrics (Optional): {
+ * String (Required): {
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * metricName: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * condition: String (Optional, Required on create)
+ * value: double (Optional, Required on create)
+ * action: String(continue/stop) (Optional)
+ * actualValue: Double (Optional)
+ * result: String(passed/undetermined/failed) (Optional)
+ * }
+ * }
+ * }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
* }
* secrets (Optional): {
* String (Required): {
@@ -1077,28 +1326,45 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) {
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -1106,6 +1372,7 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) {
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -1113,11 +1380,15 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) {
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -1127,7 +1398,13 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) {
* executedDateTime: OffsetDateTime (Optional)
* portalUrl: String (Optional)
* duration: Long (Optional)
+ * virtualUserHours: Double (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
+ * createdByType: String(User/ScheduledTrigger) (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -1135,9 +1412,9 @@ public PagedFlux listTestRuns(RequestOptions requestOptions) {
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -1152,87 +1429,1156 @@ public Mono> stopTestRunWithResponse(String testRunId, Requ
}
/**
- * List the metric namespaces for a load test run.
- * Response Body Schema
+ * Create and start a new test profile run.
+ *
+ * Create and start a new test profile run with the given test profile run Id.
+ * Request Body Schema
*
*
* {@code
* {
- * value (Required): [
- * (Required){
- * description: String (Optional)
- * name: String (Optional)
- * }
- * ]
- * }
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return represents collection of metric namespaces along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return test Profile Run model along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getMetricNamespacesWithResponseAsync(testRunId, requestOptions);
+ public Mono> createOrUpdateTestProfileRunWithResponse(String testProfileRunId, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.createOrUpdateTestProfileRunWithResponseAsync(testProfileRunId, body, requestOptions);
}
/**
- * List the metric definitions for a load test run.
+ * Delete an existing load test profile run.
+ *
+ * Delete an existing load test profile run by providing the test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> deleteTestProfileRunWithResponse(String testProfileRunId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.deleteTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
+ }
+
+ /**
+ * Get test profile run details.
+ *
+ * Get test profile run details by test profile run Id.
* Response Body Schema
*
*
* {@code
* {
- * value (Required): [
- * (Required){
- * dimensions (Optional): [
- * (Optional){
- * description: String (Optional)
- * name: String (Optional)
- * }
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
* ]
- * description: String (Optional)
- * name: String (Optional)
- * namespace: String (Optional)
- * primaryAggregationType: String(Average/Count/None/Total/Percentile90/Percentile95/Percentile99) (Optional)
- * supportedAggregationTypes (Optional): [
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test profile run details.
+ *
+ * Get test profile run details by test profile run Id along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getTestProfileRunWithResponse(String testProfileRunId,
+ RequestOptions requestOptions) {
+ return this.serviceClient.getTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
+ }
+
+ /**
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * maxpagesize | Integer | No | Maximum number of results to include in a single
+ * response. |
+ * minStartDateTime | OffsetDateTime | No | Minimum Start DateTime(RFC 3339 literal
+ * format) of the test profile runs to filter on. |
+ * maxStartDateTime | OffsetDateTime | No | Maximum Start DateTime(RFC 3339 literal
+ * format) of the test profile runs to filter on. |
+ * minEndDateTime | OffsetDateTime | No | Minimum End DateTime(RFC 3339 literal format) of
+ * the test profile runs to filter on. |
+ * maxEndDateTime | OffsetDateTime | No | Maximum End DateTime(RFC 3339 literal format) of
+ * the test profile runs to filter on. |
+ * createdDateStartTime | OffsetDateTime | No | Start DateTime(RFC 3339 literal format) of
+ * the created time range to filter test profile runs. |
+ * createdDateEndTime | OffsetDateTime | No | End DateTime(RFC 3339 literal format) of the
+ * created time range to filter test profile runs. |
+ * testProfileRunIds | List<String> | No | Comma separated list of IDs of the test
+ * profile runs to filter. In the form of "," separated string. |
+ * testProfileIds | List<String> | No | Comma separated IDs of the test profiles
+ * which should be associated with the test profile runs to fetch. In the form of "," separated string. |
+ * statuses | List<String> | No | Comma separated list of Statuses of the test
+ * profile runs to filter. In the form of "," separated string. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (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)
- * }
+ * }
+ * ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
+ * }
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return paged collection of TestProfileRun items as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfileRuns(RequestOptions requestOptions) {
+ return this.serviceClient.listTestProfileRunsAsync(requestOptions);
+ }
+
+ /**
+ * Stop test profile run.
+ *
+ * Stop test profile run for the given test profile run Id.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * testProfileRunId: String (Required)
+ * displayName: String (Optional)
+ * description: String (Optional)
+ * testProfileId: String (Optional)
+ * targetResourceId: String (Optional)
+ * targetResourceConfigurations (Optional): {
+ * kind: String(FunctionsFlexConsumption) (Required)
+ * }
+ * status: String(ACCEPTED/NOTSTARTED/EXECUTING/DONE/CANCELLING/CANCELLED/FAILED) (Optional)
+ * errorDetails (Optional): [
+ * (Optional){
+ * message: String (Optional)
+ * }
+ * ]
+ * startDateTime: OffsetDateTime (Optional)
+ * endDateTime: OffsetDateTime (Optional)
+ * durationInSeconds: Long (Optional)
+ * testRunDetails (Optional): {
+ * String (Required): {
+ * status: String(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE) (Required)
+ * configurationId: String (Required)
+ * properties (Required): {
+ * String: String (Required)
+ * }
+ * }
+ * }
+ * recommendations (Optional): [
+ * (Optional){
+ * category: String(ThroughputOptimized/CostOptimized) (Required)
+ * configurations (Optional): [
+ * String (Optional)
* ]
* }
* ]
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param metricNamespace Metric namespace to query metric definitions for.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return represents collection of metric definitions along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return test Profile Run model along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getMetricDefinitionsWithResponse(String testRunId, String metricNamespace,
+ public Mono> stopTestProfileRunWithResponse(String testProfileRunId,
RequestOptions requestOptions) {
- return this.serviceClient.getMetricDefinitionsWithResponseAsync(testRunId, metricNamespace, requestOptions);
+ return this.serviceClient.stopTestProfileRunWithResponseAsync(testProfileRunId, requestOptions);
+ }
+
+ /**
+ * Create and start a new test run with the given test run Id.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
+ * @param oldTestRunId Existing test run identifier that should be rerun, if this is provided, the
+ * test will run with the JMX file, configuration and app components from the
+ * existing test run. You can override the configuration values for new test run
+ * in the request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return load test run model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateTestRun(String testRunId, TestRun body, String oldTestRunId) {
+ // Generated convenience method for createOrUpdateTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (oldTestRunId != null) {
+ requestOptions.addQueryParam("oldTestRunId", oldTestRunId, false);
+ }
+ JsonMergePatchHelper.getTestRunAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestRunAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRun.class));
+ }
+
+ /**
+ * Create and start a new test run with the given test run Id.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return load test run model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateTestRun(String testRunId, TestRun body) {
+ // Generated convenience method for createOrUpdateTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestRunAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestRunAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestRunWithResponse(testRunId, bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRun.class));
+ }
+
+ /**
+ * Add an app component to a test run.
+ *
+ * Add an app component to a test run by providing the resource Id, name and type.
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body App Component model.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test run app component on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateAppComponents(String testRunId, TestRunAppComponents body) {
+ // Generated convenience method for createOrUpdateAppComponentsWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestRunAppComponentsAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestRunAppComponentsAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateAppComponentsWithResponse(testRunId, bodyInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRunAppComponents.class));
+ }
+
+ /**
+ * Configure server metrics for a test run.
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body Server metric configuration model.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test run server metrics configuration on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateServerMetricsConfig(String testRunId,
+ TestRunServerMetricConfig body) {
+ // Generated convenience method for createOrUpdateServerMetricsConfigWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestRunServerMetricConfigAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestRunServerMetricConfigAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateServerMetricsConfigWithResponse(testRunId, bodyInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRunServerMetricConfig.class));
+ }
+
+ /**
+ * Delete an existing load test run.
+ *
+ * Delete an existing load test run by providing the testRunId.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteTestRun(String testRunId) {
+ // Generated convenience method for deleteTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteTestRunWithResponse(testRunId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Get associated app component (collection of azure resources) for the given test
+ * run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return associated app component (collection of azure resources) for the given test
+ * run on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getAppComponents(String testRunId) {
+ // Generated convenience method for getAppComponentsWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getAppComponentsWithResponse(testRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRunAppComponents.class));
+ }
+
+ /**
+ * Get associated server metrics configuration for the given test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return associated server metrics configuration for the given test run on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getServerMetricsConfig(String testRunId) {
+ // Generated convenience method for getServerMetricsConfigWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getServerMetricsConfigWithResponse(testRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRunServerMetricConfig.class));
+ }
+
+ /**
+ * Get test run details by test run Id.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test run details by test run Id on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTestRun(String testRunId) {
+ // Generated convenience method for getTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestRunWithResponse(testRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRun.class));
+ }
+
+ /**
+ * Get test run file by file name.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param fileName Name of the file.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test run file by file name on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTestRunFile(String testRunId, String fileName) {
+ // Generated convenience method for getTestRunFileWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestRunFileWithResponse(testRunId, fileName, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRunFileInfo.class));
+ }
+
+ /**
+ * List the dimension values for the given metric dimension name.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param name Dimension name.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @param interval The interval (i.e. timegrain) of the query.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return metrics dimension values as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listMetricDimensionValues(String testRunId, String name, String metricname,
+ String metricNamespace, String timespan, TimeGrain interval) {
+ // Generated convenience method for listMetricDimensionValues
+ RequestOptions requestOptions = new RequestOptions();
+ if (interval != null) {
+ requestOptions.addQueryParam("interval", interval.toString(), false);
+ }
+ PagedFlux pagedFluxResponse
+ = listMetricDimensionValues(testRunId, name, metricname, metricNamespace, timespan, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(String.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * List the dimension values for the given metric dimension name.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param name Dimension name.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return metrics dimension values as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listMetricDimensionValues(String testRunId, String name, String metricname,
+ String metricNamespace, String timespan) {
+ // Generated convenience method for listMetricDimensionValues
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse
+ = listMetricDimensionValues(testRunId, name, metricname, metricNamespace, timespan, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(String.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * List the metric definitions for a load test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents collection of metric definitions on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getMetricDefinitions(String testRunId, String metricNamespace) {
+ // Generated convenience method for getMetricDefinitionsWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(MetricDefinitionCollection.class));
+ }
+
+ /**
+ * List the metric namespaces for a load test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return represents collection of metric namespaces on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getMetricNamespaces(String testRunId) {
+ // Generated convenience method for getMetricNamespacesWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getMetricNamespacesWithResponse(testRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(MetricNamespaceCollection.class));
+ }
+
+ /**
+ * List the metric values for a load test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @param aggregation The aggregation.
+ * @param interval The interval (i.e. timegrain) of the query.
+ * @param body Metric dimension filter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a metrics query as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listMetrics(String testRunId, String metricname, String metricNamespace,
+ String timespan, String aggregation, TimeGrain interval, MetricRequestPayload body) {
+ // Generated convenience method for listMetrics
+ RequestOptions requestOptions = new RequestOptions();
+ if (aggregation != null) {
+ requestOptions.addQueryParam("aggregation", aggregation, false);
+ }
+ if (interval != null) {
+ requestOptions.addQueryParam("interval", interval.toString(), false);
+ }
+ if (body != null) {
+ requestOptions.setBody(BinaryData.fromObject(body));
+ }
+ PagedFlux pagedFluxResponse
+ = listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TimeSeriesElement.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * List the metric values for a load test run.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response to a metrics query as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listMetrics(String testRunId, String metricname, String metricNamespace,
+ String timespan) {
+ // Generated convenience method for listMetrics
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse
+ = listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TimeSeriesElement.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Get all test runs for the given filters.
+ *
+ * @param orderBy Sort on the supported fields in (field asc/desc) format. eg: executedDateTime
+ * asc. Supported fields - executedDateTime.
+ * @param search 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.
+ * @param testId Unique name of an existing load test.
+ * @param executionFrom Start DateTime(RFC 3339 literal format) of test-run execution time filter range.
+ * @param executionTo End DateTime(RFC 3339 literal format) of test-run execution time filter range.
+ * @param status Comma separated list of test run status.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all test runs for the given filters as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestRuns(String orderBy, String search, String testId, OffsetDateTime executionFrom,
+ OffsetDateTime executionTo, String status) {
+ // Generated convenience method for listTestRuns
+ RequestOptions requestOptions = new RequestOptions();
+ if (orderBy != null) {
+ requestOptions.addQueryParam("orderby", orderBy, false);
+ }
+ if (search != null) {
+ requestOptions.addQueryParam("search", search, false);
+ }
+ if (testId != null) {
+ requestOptions.addQueryParam("testId", testId, false);
+ }
+ if (executionFrom != null) {
+ requestOptions.addQueryParam("executionFrom", String.valueOf(executionFrom), false);
+ }
+ if (executionTo != null) {
+ requestOptions.addQueryParam("executionTo", String.valueOf(executionTo), false);
+ }
+ if (status != null) {
+ requestOptions.addQueryParam("status", status, false);
+ }
+ PagedFlux pagedFluxResponse = listTestRuns(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRun.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Get all test runs for the given filters.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return all test runs for the given filters as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestRuns() {
+ // Generated convenience method for listTestRuns
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listTestRuns(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRun.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Stop test run by test run Id.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return load test run model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono stopTestRun(String testRunId) {
+ // Generated convenience method for stopTestRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return stopTestRunWithResponse(testRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestRun.class));
+ }
+
+ /**
+ * Create and start a new test profile run.
+ *
+ * Create and start a new test profile run with the given test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test Profile Run model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateTestProfileRun(String testProfileRunId, TestProfileRun body) {
+ // Generated convenience method for createOrUpdateTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getTestProfileRunAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getTestProfileRunAccessor().prepareModelForJsonMergePatch(body, false);
+ return createOrUpdateTestProfileRunWithResponse(testProfileRunId, bodyInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class));
+ }
+
+ /**
+ * Delete an existing load test profile run.
+ *
+ * Delete an existing load test profile run by providing the test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for deleteTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Get test profile run details.
+ *
+ * Get test profile run details by test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test profile run details.
+ *
+ * Get test profile run details by test profile run Id on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for getTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class));
+ }
+
+ /**
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
+ *
+ * @param minStartDateTime Minimum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param maxStartDateTime Maximum Start DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param minEndDateTime Minimum End DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param maxEndDateTime Maximum End DateTime(RFC 3339 literal format) of the test profile runs to filter on.
+ * @param createdDateStartTime Start DateTime(RFC 3339 literal format) of the created time range to filter test
+ * profile runs.
+ * @param createdDateEndTime End DateTime(RFC 3339 literal format) of the created time range to filter test profile
+ * runs.
+ * @param testProfileRunIds Comma separated list of IDs of the test profile runs to filter.
+ * @param testProfileIds Comma separated IDs of the test profiles which should be associated with the test profile
+ * runs to fetch.
+ * @param statuses Comma separated list of Statuses of the test profile runs to filter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TestProfileRun items as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfileRuns(OffsetDateTime minStartDateTime,
+ OffsetDateTime maxStartDateTime, OffsetDateTime minEndDateTime, OffsetDateTime maxEndDateTime,
+ OffsetDateTime createdDateStartTime, OffsetDateTime createdDateEndTime, List testProfileRunIds,
+ List testProfileIds, List statuses) {
+ // Generated convenience method for listTestProfileRuns
+ RequestOptions requestOptions = new RequestOptions();
+ if (minStartDateTime != null) {
+ requestOptions.addQueryParam("minStartDateTime", String.valueOf(minStartDateTime), false);
+ }
+ if (maxStartDateTime != null) {
+ requestOptions.addQueryParam("maxStartDateTime", String.valueOf(maxStartDateTime), false);
+ }
+ if (minEndDateTime != null) {
+ requestOptions.addQueryParam("minEndDateTime", String.valueOf(minEndDateTime), false);
+ }
+ if (maxEndDateTime != null) {
+ requestOptions.addQueryParam("maxEndDateTime", String.valueOf(maxEndDateTime), false);
+ }
+ if (createdDateStartTime != null) {
+ requestOptions.addQueryParam("createdDateStartTime", String.valueOf(createdDateStartTime), false);
+ }
+ if (createdDateEndTime != null) {
+ requestOptions.addQueryParam("createdDateEndTime", String.valueOf(createdDateEndTime), false);
+ }
+ if (testProfileRunIds != null) {
+ requestOptions.addQueryParam("testProfileRunIds",
+ testProfileRunIds.stream()
+ .map(paramItemValue -> Objects.toString(paramItemValue, ""))
+ .collect(Collectors.joining(",")),
+ false);
+ }
+ if (testProfileIds != null) {
+ requestOptions.addQueryParam("testProfileIds",
+ testProfileIds.stream()
+ .map(paramItemValue -> Objects.toString(paramItemValue, ""))
+ .collect(Collectors.joining(",")),
+ false);
+ }
+ if (statuses != null) {
+ requestOptions.addQueryParam("statuses",
+ statuses.stream()
+ .map(paramItemValue -> Objects.toString(paramItemValue, ""))
+ .collect(Collectors.joining(",")),
+ false);
+ }
+ PagedFlux pagedFluxResponse = listTestProfileRuns(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * List test profile runs.
+ *
+ * Get all test profile runs for the given filters.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paged collection of TestProfileRun items as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTestProfileRuns() {
+ // Generated convenience method for listTestProfileRuns
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listTestProfileRuns(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Stop test profile run.
+ *
+ * Stop test profile run for the given test profile run Id.
+ *
+ * @param testProfileRunId Unique identifier for the test profile run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return test Profile Run model on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono stopTestProfileRun(String testProfileRunId) {
+ // Generated convenience method for stopTestProfileRunWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return stopTestProfileRunWithResponse(testProfileRunId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TestProfileRun.class));
}
}
diff --git a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java
index 64358eff94b37..899885d37a676 100644
--- a/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java
+++ b/sdk/loadtesting/azure-developer-loadtesting/src/main/java/com/azure/developer/loadtesting/LoadTestRunClient.java
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
package com.azure.developer.loadtesting;
import com.azure.core.annotation.Generated;
@@ -11,54 +12,204 @@
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
-import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
-import com.azure.core.util.polling.SyncPoller;
-import com.azure.developer.loadtesting.implementation.LoadTestRunsImpl;
-import java.time.Duration;
+import com.azure.developer.loadtesting.implementation.JsonMergePatchHelper;
+import com.azure.developer.loadtesting.models.MetricDefinitionCollection;
+import com.azure.developer.loadtesting.models.MetricNamespaceCollection;
+import com.azure.developer.loadtesting.models.MetricRequestPayload;
+import com.azure.developer.loadtesting.models.TestProfileRun;
+import com.azure.developer.loadtesting.models.TestRun;
+import com.azure.developer.loadtesting.models.TestRunAppComponents;
+import com.azure.developer.loadtesting.models.TestRunFileInfo;
+import com.azure.developer.loadtesting.models.TestRunServerMetricConfig;
+import com.azure.developer.loadtesting.models.TimeGrain;
+import com.azure.developer.loadtesting.models.TimeSeriesElement;
+import java.time.OffsetDateTime;
+import java.util.List;
/**
- * Initializes a new instance of the synchronous LoadTestingClient type.
+ * Initializes a new instance of the synchronous LoadTestRunClient type.
*/
@ServiceClient(builder = LoadTestRunClientBuilder.class)
public final class LoadTestRunClient {
-
@Generated
- private final LoadTestRunsImpl serviceClient;
+ private final LoadTestRunAsyncClient client;
/**
* Initializes an instance of LoadTestRunClient class.
- *
- * @param serviceClient the service client implementation.
+ *
+ * @param client the async client.
*/
@Generated
- LoadTestRunClient(LoadTestRunsImpl serviceClient) {
- this.serviceClient = serviceClient;
+ LoadTestRunClient(LoadTestRunAsyncClient client) {
+ this.client = client;
}
/**
- * Configure server metrics for a test run.
+ * Create and start a new test run with the given test run Id.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name | Type | Required | Description |
+ * oldTestRunId | String | No | Existing test run identifier that should be rerun, if this
+ * is provided, the
+ * test will run with the JMX file, configuration and app components from the
+ * existing test run. You can override the configuration values for new test run
+ * in the request body. |
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
* Request Body Schema
*
*
* {@code
* {
- * testRunId: String (Optional)
- * metrics (Optional): {
+ * testRunId: String (Required)
+ * passFailCriteria (Optional): {
+ * passFailMetrics (Optional): {
+ * String (Required): {
+ * clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+ * }
+ * }
+ * passFailServerMetrics (Optional): {
+ * String (Required): {
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * metricName: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * condition: String (Optional, Required on create)
+ * value: double (Optional, Required on create)
+ * action: String(continue/stop) (Optional)
+ * actualValue: Double (Optional)
+ * result: String(passed/undetermined/failed) (Optional)
+ * }
+ * }
+ * }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
+ * secrets (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)
+ * 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)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
+ * throughput: Double (Optional)
+ * receivedKBytesPerSec: Double (Optional)
+ * sentKBytesPerSec: Double (Optional)
+ * }
+ * }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
+ * loadTestConfiguration (Optional): {
+ * engineInstances: Integer (Optional)
+ * splitAllCSVs: Boolean (Optional)
+ * quickStartTest: Boolean (Optional)
+ * optionalLoadTestConfig (Optional): {
+ * endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
+ * virtualUsers: Integer (Optional)
+ * rampUpTime: Integer (Optional)
+ * duration: Integer (Optional)
+ * }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
+ * }
+ * testArtifacts (Optional): {
+ * inputArtifacts (Optional): {
+ * configFileInfo (Optional): {
+ * fileName: String (Required)
+ * url: String (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (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)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
+ * additionalFileInfo (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * outputArtifacts (Optional): {
+ * resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+ * logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
+ * testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+ * virtualUsers: Integer (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)
+ * virtualUserHours: Double (Optional)
+ * subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
+ * createdByType: String(User/ScheduledTrigger) (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -72,19 +223,150 @@ public final class LoadTestRunClient {
*
* {@code
* {
- * testRunId: String (Optional)
- * metrics (Optional): {
+ * testRunId: String (Required)
+ * passFailCriteria (Optional): {
+ * passFailMetrics (Optional): {
+ * String (Required): {
+ * clientMetric: String(response_time_ms/latency/error/requests/requests_per_sec) (Optional)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/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)
+ * }
+ * }
+ * passFailServerMetrics (Optional): {
+ * String (Required): {
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * metricName: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * condition: String (Optional, Required on create)
+ * value: double (Optional, Required on create)
+ * action: String(continue/stop) (Optional)
+ * actualValue: Double (Optional)
+ * result: String(passed/undetermined/failed) (Optional)
+ * }
+ * }
+ * }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
+ * }
+ * secrets (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)
+ * 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)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
+ * throughput: Double (Optional)
+ * receivedKBytesPerSec: Double (Optional)
+ * sentKBytesPerSec: Double (Optional)
+ * }
+ * }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
+ * loadTestConfiguration (Optional): {
+ * engineInstances: Integer (Optional)
+ * splitAllCSVs: Boolean (Optional)
+ * quickStartTest: Boolean (Optional)
+ * optionalLoadTestConfig (Optional): {
+ * endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
+ * virtualUsers: Integer (Optional)
+ * rampUpTime: Integer (Optional)
+ * duration: Integer (Optional)
+ * }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
+ * }
+ * testArtifacts (Optional): {
+ * inputArtifacts (Optional): {
+ * configFileInfo (Optional): {
+ * fileName: String (Required)
+ * url: String (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (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)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
+ * additionalFileInfo (Optional): [
+ * (recursive schema, see above)
+ * ]
+ * }
+ * outputArtifacts (Optional): {
+ * resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
+ * logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
+ * testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
+ * virtualUsers: Integer (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)
+ * virtualUserHours: Double (Optional)
+ * subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
+ * createdByType: String(User/ScheduledTrigger) (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -92,63 +374,38 @@ public final class LoadTestRunClient {
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body Server metric configuration model.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body The resource instance.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run server metrics configuration along with {@link Response}.
+ * @return load test run model along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body,
+ public Response createOrUpdateTestRunWithResponse(String testRunId, BinaryData body,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateServerMetricsConfigWithResponse(testRunId, body, requestOptions);
- }
-
- /**
- * Starts a test run and polls the status of the test run.
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body Load test run model.
- * @param testRunRequestOptions The options to configure the file upload HTTP request before HTTP client sends it.
- * @throws ResourceNotFoundException when a test with {@code testRunId} doesn't exist.
- * @return A {@link SyncPoller} to poll on and retrieve the test run
- * status(ACCEPTED/NOTSTARTED/PROVISIONING/PROVISIONED/CONFIGURING/CONFIGURED/EXECUTING/EXECUTED/DEPROVISIONING/DEPROVISIONED/DONE/CANCELLING/CANCELLED/FAILED/VALIDATION_SUCCESS/VALIDATION_FAILURE).
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller beginTestRun(String testRunId, BinaryData body,
- RequestOptions testRunRequestOptions) {
- RequestOptions defaultRequestOptions = new RequestOptions();
- if (testRunRequestOptions != null) {
- defaultRequestOptions.setContext(testRunRequestOptions.getContext());
- }
- return SyncPoller.createPoller(Duration.ofSeconds(5),
- (context) -> PollingUtils
- .getTestRunStatus(createOrUpdateTestRunWithResponse(testRunId, body, testRunRequestOptions).getValue()),
- (context) -> PollingUtils
- .getTestRunStatus(getTestRunWithResponse(testRunId, defaultRequestOptions).getValue()),
- (activationResponse, context) -> stopTestRunWithResponse(testRunId, defaultRequestOptions).getValue(),
- (context) -> getTestRunWithResponse(testRunId, defaultRequestOptions).getValue());
+ return this.client.createOrUpdateTestRunWithResponse(testRunId, body, requestOptions).block();
}
/**
- * Associate an app component (collection of azure resources) to a test run.
+ * Add an app component to a test run.
+ *
+ * Add an app component to a test run by providing the resource Id, name and type.
* Request Body Schema
*
*
* {@code
* {
- * components (Required): {
+ * components (Optional, Required on create): {
* String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
* displayName: String (Optional)
* resourceGroup: String (Optional)
* subscriptionId: String (Optional)
@@ -169,11 +426,11 @@ public SyncPoller beginTestRun(String testRunId, BinaryD
*
* {@code
* {
- * components (Required): {
+ * components (Optional, Required on create): {
* String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
* displayName: String (Optional)
* resourceGroup: String (Optional)
* subscriptionId: String (Optional)
@@ -188,9 +445,9 @@ public SyncPoller beginTestRun(String testRunId, BinaryD
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param body App Component model.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -203,173 +460,113 @@ public SyncPoller beginTestRun(String testRunId, BinaryD
@ServiceMethod(returns = ReturnType.SINGLE)
public Response createOrUpdateAppComponentsWithResponse(String testRunId, BinaryData body,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateAppComponentsWithResponse(testRunId, body, requestOptions);
+ return this.client.createOrUpdateAppComponentsWithResponse(testRunId, body, requestOptions).block();
}
/**
- * List the metric values for a load test run.
- *
- * Query Parameters
- *
- *
- * 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 {@link RequestOptions#addQueryParam}
- *
- * Header Parameters
- *
- *
- * 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 {@link RequestOptions#addHeader}
- *
- * Request Body Schema
- *
- *
+ * Configure server metrics for a test run.
+ * Request Body Schema
+ *
*
* {@code
* {
- * filters (Optional): [
- * (Optional){
- * name: String (Optional)
- * values (Optional): [
- * String (Optional)
- * ]
+ * testRunId: String (Optional)
+ * metrics (Optional): {
+ * String (Required): {
+ * id: String (Optional)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * displayDescription: String (Optional)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * unit: String (Optional)
+ * resourceType: String (Optional, Required on create)
* }
- * ]
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
* }
* }
*
- *
- *
- * Response Body Schema
- *
- *
+ *
+ * Response Body Schema
+ *
*
* {@code
* {
- * data (Optional): [
- * (Optional){
- * timestamp: String (Optional)
- * value: Double (Optional)
- * }
- * ]
- * dimensionValues (Optional): [
- * (Optional){
- * name: String (Optional)
- * value: String (Optional)
+ * testRunId: String (Optional)
+ * metrics (Optional): {
+ * String (Required): {
+ * id: String (Optional)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * displayDescription: String (Optional)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * unit: String (Optional)
+ * resourceType: String (Optional, Required on create)
* }
- * ]
+ * }
+ * createdDateTime: OffsetDateTime (Optional)
+ * createdBy: String (Optional)
+ * lastModifiedDateTime: OffsetDateTime (Optional)
+ * lastModifiedBy: String (Optional)
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param metricName Metric name.
- * @param metricNamespace Metric namespace to query metric definitions for.
- * @param timespan The timespan of the query. It is a string with the following format
- * 'startDateTime_ISO/endDateTime_ISO'.
+ *
+ * @param testRunId Unique Id for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param body Server metric configuration model.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response to a metrics query as paginated response with {@link PagedIterable}.
+ * @return test run server metrics configuration along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listMetrics(String testRunId, String metricName, String metricNamespace,
- String timespan, RequestOptions requestOptions) {
- if (requestOptions == null) {
- requestOptions = new RequestOptions();
- }
- // Content-Type header required even though body can be null
- requestOptions.setHeader(HttpHeaderName.CONTENT_TYPE, "application/json");
- return this.serviceClient.listMetrics(testRunId, metricName, metricNamespace, timespan, requestOptions);
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateServerMetricsConfigWithResponse(String testRunId, BinaryData body,
+ RequestOptions requestOptions) {
+ return this.client.createOrUpdateServerMetricsConfigWithResponse(testRunId, body, requestOptions).block();
}
/**
- * List the dimension values for the given metric dimension name.
- * Query Parameters
- *
- * 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 {@link RequestOptions#addQueryParam}
- * Response Body Schema
+ * Delete an existing load test run.
*
- *
- * {@code
- * String
- * }
- *
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param name Dimension name.
- * @param metricName Metric name.
- * @param metricNamespace Metric namespace to query metric definitions for.
- * @param timespan The timespan of the query. It is a string with the following format
- * 'startDateTime_ISO/endDateTime_ISO'.
+ * Delete an existing load test run by providing the testRunId.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return metrics dimension values as paginated response with {@link PagedIterable}.
+ * @return the {@link Response}.
*/
@Generated
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable listMetricDimensionValues(String testRunId, String name, String metricName,
- String metricNamespace, String timespan, RequestOptions requestOptions) {
- return this.serviceClient.listMetricDimensionValues(testRunId, name, metricName, metricNamespace, timespan,
- requestOptions);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.client.deleteTestRunWithResponse(testRunId, requestOptions).block();
}
/**
- * Get associated app component (collection of azure resources) for the given test run.
+ * Get associated app component (collection of azure resources) for the given test
+ * run.
* Response Body Schema
*
*
* {@code
* {
- * components (Required): {
+ * components (Optional, Required on create): {
* String (Required): {
- * resourceId: String (Optional)
- * resourceName: String (Optional)
- * resourceType: String (Optional)
+ * resourceId: String (Required)
+ * resourceName: String (Optional, Required on create)
+ * resourceType: String (Optional, Required on create)
* displayName: String (Optional)
* resourceGroup: String (Optional)
* subscriptionId: String (Optional)
@@ -384,25 +581,25 @@ public PagedIterable listMetricDimensionValues(String testRunId, Str
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return associated app component (collection of azure resources) for the given test run along with
- * {@link Response}.
+ * @return associated app component (collection of azure resources) for the given test
+ * run along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getAppComponentsWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getAppComponentsWithResponse(testRunId, requestOptions);
+ return this.client.getAppComponentsWithResponse(testRunId, requestOptions).block();
}
/**
- * List server metrics configuration for the given test run.
+ * Get associated server metrics configuration for the given test run.
* Response Body Schema
*
*
@@ -412,13 +609,13 @@ public Response getAppComponentsWithResponse(String testRunId, Reque
* metrics (Optional): {
* String (Required): {
* id: String (Optional)
- * resourceId: String (Required)
- * metricNamespace: String (Required)
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
* displayDescription: String (Optional)
- * name: String (Required)
- * aggregation: String (Required)
+ * name: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
* unit: String (Optional)
- * resourceType: String (Required)
+ * resourceType: String (Optional, Required on create)
* }
* }
* createdDateTime: OffsetDateTime (Optional)
@@ -428,59 +625,35 @@ public Response getAppComponentsWithResponse(String testRunId, Reque
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run server metrics configuration along with {@link Response}.
+ * @return associated server metrics configuration for the given test run along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getServerMetricsConfigWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getServerMetricsConfigWithResponse(testRunId, requestOptions);
+ return this.client.getServerMetricsConfigWithResponse(testRunId, requestOptions).block();
}
/**
- * 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 identifier that should be rerun, if this is provided, the test will run with the JMX file,
- * configuration and app components from the existing test run. You can override the configuration values for new
- * test run in the request body. |
- *
- *
- *
- * You can add these to a request with {@link RequestOptions#addQueryParam}
- *
- *
- * Request Body Schema
- *
+ * Get test run details by test run Id.
+ *
Response Body Schema
+ *
*
* {@code
* {
+ * testRunId: String (Required)
* passFailCriteria (Optional): {
* passFailMetrics (Optional): {
- * String (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)
+ * aggregate: String(count/percentage/avg/p50/p75/p90/p95/p96/p97/p98/p99/p99.9/p99.99/min/max) (Optional)
* condition: String (Optional)
* requestName: String (Optional)
* value: Double (Optional)
@@ -489,9 +662,27 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* result: String(passed/undetermined/failed) (Optional)
* }
* }
+ * passFailServerMetrics (Optional): {
+ * String (Required): {
+ * resourceId: String (Optional, Required on create)
+ * metricNamespace: String (Optional, Required on create)
+ * metricName: String (Optional, Required on create)
+ * aggregation: String (Optional, Required on create)
+ * condition: String (Optional, Required on create)
+ * value: double (Optional, Required on create)
+ * action: String(continue/stop) (Optional)
+ * actualValue: Double (Optional)
+ * result: String(passed/undetermined/failed) (Optional)
+ * }
+ * }
+ * }
+ * autoStopCriteria (Optional): {
+ * autoStopDisabled: Boolean (Optional)
+ * errorRate: Double (Optional)
+ * errorRateTimeWindowInSeconds: Integer (Optional)
* }
* secrets (Optional): {
- * String (Optional): {
+ * String (Required): {
* value: String (Optional)
* type: String(AKV_SECRET_URI/SECRET_VALUE) (Optional)
* }
@@ -502,7 +693,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* name: String (Optional)
* }
* environmentVariables (Optional): {
- * String: String (Optional)
+ * String: String (Required)
* }
* errorDetails (Optional): [
* (Optional){
@@ -510,7 +701,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* }
* ]
* testRunStatistics (Optional): {
- * String (Optional): {
+ * String (Required): {
* transaction: String (Optional)
* sampleCount: Double (Optional)
* errorCount: Double (Optional)
@@ -522,28 +713,45 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* pct1ResTime: Double (Optional)
* pct2ResTime: Double (Optional)
* pct3ResTime: Double (Optional)
+ * pct75ResTime: Double (Optional)
+ * pct96ResTime: Double (Optional)
+ * pct97ResTime: Double (Optional)
+ * pct98ResTime: Double (Optional)
+ * pct999ResTime: Double (Optional)
+ * pct9999ResTime: Double (Optional)
* throughput: Double (Optional)
* receivedKBytesPerSec: Double (Optional)
* sentKBytesPerSec: Double (Optional)
* }
* }
+ * regionalStatistics (Optional): {
+ * String (Required): (recursive schema, see String above)
+ * }
* loadTestConfiguration (Optional): {
* engineInstances: Integer (Optional)
* splitAllCSVs: Boolean (Optional)
* quickStartTest: Boolean (Optional)
* optionalLoadTestConfig (Optional): {
* endpointUrl: String (Optional)
+ * requestsPerSecond: Integer (Optional)
+ * maxResponseTimeInMs: Integer (Optional)
* virtualUsers: Integer (Optional)
* rampUpTime: Integer (Optional)
* duration: Integer (Optional)
* }
+ * regionalLoadTestConfig (Optional): [
+ * (Optional){
+ * engineInstances: int (Optional, Required on create)
+ * region: String (Optional, Required on create)
+ * }
+ * ]
* }
* testArtifacts (Optional): {
* inputArtifacts (Optional): {
* configFileInfo (Optional): {
+ * fileName: String (Required)
* url: String (Optional)
- * fileName: String (Optional)
- * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS) (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
* expireDateTime: OffsetDateTime (Optional)
* validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
* validationFailureDetails: String (Optional)
@@ -551,6 +759,7 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* testScriptFileInfo (Optional): (recursive schema, see testScriptFileInfo above)
* userPropFileInfo (Optional): (recursive schema, see userPropFileInfo above)
* inputArtifactsZipFileInfo (Optional): (recursive schema, see inputArtifactsZipFileInfo above)
+ * urlTestConfigFileInfo (Optional): (recursive schema, see urlTestConfigFileInfo above)
* additionalFileInfo (Optional): [
* (recursive schema, see above)
* ]
@@ -558,11 +767,15 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* outputArtifacts (Optional): {
* resultFileInfo (Optional): (recursive schema, see resultFileInfo above)
* logsFileInfo (Optional): (recursive schema, see logsFileInfo above)
+ * artifactsContainerInfo (Optional): {
+ * url: String (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * }
+ * reportFileInfo (Optional): (recursive schema, see reportFileInfo above)
* }
* }
* testResult: String(PASSED/NOT_APPLICABLE/FAILED) (Optional)
* virtualUsers: Integer (Optional)
- * testRunId: String (Optional)
* displayName: String (Optional)
* testId: String (Optional)
* description: String (Optional)
@@ -572,7 +785,13 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* executedDateTime: OffsetDateTime (Optional)
* portalUrl: String (Optional)
* duration: Long (Optional)
+ * virtualUserHours: Double (Optional)
* subnetId: String (Optional)
+ * kind: String(URL/JMX/Locust) (Optional)
+ * requestDataLevel: String(NONE/ERRORS) (Optional)
+ * debugLogsEnabled: Boolean (Optional)
+ * publicIPDisabled: Boolean (Optional)
+ * createdByType: String(User/ScheduledTrigger) (Optional)
* createdDateTime: OffsetDateTime (Optional)
* createdBy: String (Optional)
* lastModifiedDateTime: OffsetDateTime (Optional)
@@ -580,328 +799,274 @@ public Response getServerMetricsConfigWithResponse(String testRunId,
* }
* }
*
- *
- *
- * Response Body Schema
- *
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return test run details by test run Id along with {@link Response}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.client.getTestRunWithResponse(testRunId, requestOptions).block();
+ }
+
+ /**
+ * Get test run file by file name.
+ * Response Body Schema
+ *
*
* {@code
* {
- * passFailCriteria (Optional): {
- * passFailMetrics (Optional): {
- * String (Optional): {
- * 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 (Optional): {
- * 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 (Optional)
- * }
- * errorDetails (Optional): [
- * (Optional){
- * message: String (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)
- * }
- * }
- * 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)
+ * fileName: String (Required)
+ * url: String (Optional)
+ * fileType: String(JMX_FILE/USER_PROPERTIES/ADDITIONAL_ARTIFACTS/ZIPPED_ARTIFACTS/URL_TEST_CONFIG/TEST_SCRIPT) (Optional)
+ * expireDateTime: OffsetDateTime (Optional)
+ * validationStatus: String(NOT_VALIDATED/VALIDATION_SUCCESS/VALIDATION_FAILURE/VALIDATION_INITIATED/VALIDATION_NOT_REQUIRED) (Optional)
+ * validationFailureDetails: String (Optional)
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param body Load test run model.
+ *
+ * @param testRunId Unique test run identifier for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param fileName Name of the file.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return load test run model along with {@link Response}.
+ * @return test run file by file name along with {@link Response}.
*/
+ @Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- Response createOrUpdateTestRunWithResponse(String testRunId, BinaryData body,
+ public Response getTestRunFileWithResponse(String testRunId, String fileName,
RequestOptions requestOptions) {
- return this.serviceClient.createOrUpdateTestRunWithResponse(testRunId, body, requestOptions);
+ return this.client.getTestRunFileWithResponse(testRunId, fileName, requestOptions).block();
}
/**
- * Get test run details by name.
+ * List the dimension values for the given metric dimension name.
+ * Query Parameters
+ *
+ * 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 {@link RequestOptions#addQueryParam}
* Response Body Schema
*
*
* {@code
- * {
- * 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)
+ * String
+ * }
+ *
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param name Dimension name.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return metrics dimension values as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listMetricDimensionValues(String testRunId, String name, String metricname,
+ String metricNamespace, String timespan, RequestOptions requestOptions) {
+ return new PagedIterable<>(this.client.listMetricDimensionValues(testRunId, name, metricname, metricNamespace,
+ timespan, requestOptions));
+ }
+
+ /**
+ * List the metric definitions for a load test run.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * 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/Percentile75/Percentile90/Percentile95/Percentile96/Percentile97/Percentile98/Percentile99/Percentile999/Percentile9999) (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)
+ * }
* ]
* }
- * 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)
+ * ]
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricNamespace Metric namespace to query metric definitions for.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run details by name along with {@link Response}.
+ * @return represents collection of metric definitions along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response getTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.getTestRunWithResponse(testRunId, requestOptions);
+ public Response getMetricDefinitionsWithResponse(String testRunId, String metricNamespace,
+ RequestOptions requestOptions) {
+ return this.client.getMetricDefinitionsWithResponse(testRunId, metricNamespace, requestOptions).block();
}
/**
- * Delete a test run by its name.
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
+ * List the metric namespaces for a load test run.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * value (Required): [
+ * (Required){
+ * description: String (Optional)
+ * name: String (Optional)
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response}.
+ * @return represents collection of metric namespaces along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteTestRunWithResponse(String testRunId, RequestOptions requestOptions) {
- return this.serviceClient.deleteTestRunWithResponse(testRunId, requestOptions);
+ public Response getMetricNamespacesWithResponse(String testRunId, RequestOptions requestOptions) {
+ return this.client.getMetricNamespacesWithResponse(testRunId, requestOptions).block();
}
/**
- * Get test run file by file name.
+ * List the metric values for a load test run.
+ * Query Parameters
+ *
+ * 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 {@link RequestOptions#addQueryParam}
+ * Header Parameters
+ *
+ * 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 {@link RequestOptions#addHeader}
+ * Request Body Schema
+ *
+ *
+ * {@code
+ * {
+ * filters (Optional): [
+ * (Optional){
+ * name: String (Optional)
+ * values (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
* Response Body Schema
*
*
* {@code
* {
- * 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)
+ * data (Optional): [
+ * (Optional){
+ * timestamp: OffsetDateTime (Optional)
+ * value: Double (Optional)
+ * }
+ * ]
+ * dimensionValues (Optional): [
+ * (Optional){
+ * name: String (Optional)
+ * value: String (Optional)
+ * }
+ * ]
* }
* }
*
- *
- * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic, numeric, underscore
- * or hyphen characters.
- * @param fileName Test run file name with file extension.
+ *
+ * @param testRunId Unique name for the load test run, must contain only lower-case alphabetic,
+ * numeric, underscore or hyphen characters.
+ * @param metricname Metric name.
+ * @param metricNamespace Metric namespace to query metric definitions for.
+ * @param timespan The timespan of the query. It is a string with the following format
+ * 'startDateTime_ISO/endDateTime_ISO'.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return test run file by file name along with {@link Response}.
+ * @return the response to a metrics query as paginated response with {@link PagedIterable}.
*/
@Generated
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getTestRunFileWithResponse(String testRunId, String fileName,
- RequestOptions requestOptions) {
- return this.serviceClient.getTestRunFileWithResponse(testRunId, fileName, requestOptions);
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listMetrics(String testRunId, String metricname, String metricNamespace,
+ String timespan, RequestOptions requestOptions) {
+ return new PagedIterable<>(
+ this.client.listMetrics(testRunId, metricname, metricNamespace, timespan, requestOptions));
}
/**
- * Get all test runs with given filters.
+ * Get all test runs for the given filters.
* Query Parameters
*