From 99ea79caafd5cff09d626eea7f1ab363594bd7ab Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 10 Nov 2022 12:00:20 +0530 Subject: [PATCH 01/60] initial changes stableversion --- .../load-testing-rest/swagger/README.md | 86 +++++++++++-------- 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/swagger/README.md b/sdk/loadtestservice/load-testing-rest/swagger/README.md index 5a460e45ee60..3f95e8c1e9d0 100644 --- a/sdk/loadtestservice/load-testing-rest/swagger/README.md +++ b/sdk/loadtestservice/load-testing-rest/swagger/README.md @@ -13,45 +13,61 @@ generate-test: true license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src -input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/loadtestservice/data-plane/Microsoft.LoadTestService/preview/2022-06-01-preview/loadtestservice.json -package-version: 1.0.0-beta.1 +input-file: https://github.com/Azure/azure-rest-api-specs/blob/loadtest_stableapis/specification/loadtestservice/data-plane/Microsoft.LoadTestService/stable/2022-11-01/loadtestservice.json +package-version: 1.0.0 rest-level-client: true security: AADToken security-scopes: "https://cnt-prod.loadtesting.azure.com/.default" use-extension: "@autorest/typescript": "6.0.0-rc.1" +service-versions: +- '2022-11-01' directive: - - from: swagger-document - where: $["paths"]["/serverMetricsConfig/supportedResourceTypes"].get - transform: $["operationId"] = "ServerMetrics_ListSupportedResourceTypes" - - from: swagger-document - where: $["paths"]["/testruns/sortAndFilter"].get - transform: $["operationId"] = "TestRun_ListTestRuns" - - from: swagger-document - where: $["paths"]["/serverMetricsConfig"].get - transform: $["operationId"] = "ServerMetrics_ListGetServerMetrics" - - from: swagger-document - where: $["paths"]["/appcomponents/{name}"].delete - transform: $["operationId"] = "AppComponent_DeleteAppComponents" - - from: swagger-document - where: $["paths"]["/loadtests/{testId}/files"].get - transform: $["operationId"] = "Test_ListTestFiles" - - from: swagger-document - where: $["paths"]["/testruns/sortAndFilter"].get - transform: $["operationId"] = "TestRun_ListTestRuns" - - from: swagger-document - where: $["paths"]["/testruns/{testRunId}"].patch - transform: $["operationId"] = "TestRun_CreateOrUpdateTestRun" - - from: swagger-document - where: $["paths"]["/serverMetricsConfig/{name}"].get - transform: $["operationId"] = "ServerMetrics_GetServerMetricsConfigByName" - - from: swagger-document - where: $["paths"]["/serverMetricsConfig/{name}"].delete - transform: $["operationId"] = "ServerMetrics_DeleteServerMetricsConfig" - - from: swagger-document - where: $["paths"]["/serverMetricsConfig"].get - transform: $["operationId"] = "ServerMetrics_GetServerMetricsConfig" - - from: swagger-document - where: $["paths"]["/serverMetricsConfig/default"].get - transform: $["operationId"] = "ServerMetrics_GetServerDefaultMetricsConfig" +- from: swagger-document + where: '$.parameters["TestIdQueryParameter"]' + transform: > + $["x-ms-parameter-location"] = "method"; +- from: swagger-document + where: '$.paths.*[?(@.tags=="AppComponent")]' + transform: > + $["operationId"] = $["operationId"].replace("AppComponent_", "LoadTestAdministration_").concat("AppComponent"); +- from: swagger-document + where: '$.paths.*[?(@.tags=="ServerMetrics")]' + transform: > + $["operationId"] = $["operationId"].replace("ServerMetrics_", "LoadTestAdministration_").concat("ServerMetrics"); +- from: swagger-document + where: '$.paths.*[?(@.tags=="Test")]' + transform: > + $["operationId"] = $["operationId"].replace("Test_", "LoadTestAdministration_").concat("Test"); +- from: swagger-document + where: '$.paths.*[?(@.operationId.includes("TestRun_Metric"))]' + transform: > + $["operationId"] = $["operationId"].replace("TestRun_Metric", "TestRun_GetMetric"); +- rename-operation: + from: LoadTestAdministration_GetByTestOrTestRunAppComponent + to: LoadTestAdministration_GetAppComponentByTestOrTestRun +- rename-operation: + from: LoadTestAdministration_GetByTestOrTestRunServerMetrics + to: LoadTestAdministration_GetServerMetricsByTestOrTestRun +- rename-operation: + from: LoadTestAdministration_GetDefaultMetricsServerMetrics + to: LoadTestAdministration_GetDefaultServerMetrics +- rename-operation: + from: LoadTestAdministration_ListSupportedResourceTypeServerMetrics + to: LoadTestAdministration_ListSupportedResourceType +- rename-operation: + from: LoadTestAdministration_ListTest + to: LoadTestAdministration_ListTests +- rename-operation: + from: LoadTestAdministration_UploadFileTest + to: LoadTestAdministration_UploadFile +- rename-operation: + from: LoadTestAdministration_GetFileTest + to: LoadTestAdministration_GetFile +- rename-operation: + from: LoadTestAdministration_DeleteFileTest + to: LoadTestAdministration_DeleteFile +- rename-operation: + from: LoadTestAdministration_GetAllFilesTest + to: LoadTestAdministration_ListFiles ``` From f2742ad8d640d46be7e8d6d9718678c1abf8cd6e Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Mon, 14 Nov 2022 11:26:29 +0530 Subject: [PATCH 02/60] old files modified --- .../load-testing-rest/CHANGELOG.md | 7 - .../load-testing-rest/README.md | 162 +- .../load-testing-rest/karma.conf.js | 31 +- .../load-testing-rest/package.json | 43 +- ...ding_should_create_the_app_components.json | 69 - ...recording_should_upload_the_test_file.json | 4 - .../recording_should_create_a_loadtest.json | 83 - .../recording_should_create_a_test_run.json | 204 --- .../recording_should_get_a_test_run.json | 198 --- ...ding_should_create_the_app_components.json | 60 - ...recording_should_upload_the_test_file.json | 41 - .../recording_should_create_a_loadtest.json | 74 - .../recording_should_create_a_test_run.json | 195 -- .../recording_should_get_a_test_run.json | 189 -- .../review/load-testing.api.md | 1561 ----------------- .../load-testing-rest/sample.env | 8 +- .../load-testing-rest/samples-dev/sample.jmx | 89 - .../load-testing-rest/samples-dev/sample.ts | 129 -- .../samples/v1-beta/javascript/README.md | 62 - .../samples/v1-beta/javascript/package.json | 34 - .../samples/v1-beta/javascript/sample.env | 8 - .../samples/v1-beta/javascript/sample.js | 130 -- .../samples/v1-beta/typescript/README.md | 75 - .../samples/v1-beta/typescript/package.json | 44 - .../samples/v1-beta/typescript/sample.env | 8 - .../samples/v1-beta/typescript/src/sample.ts | 128 -- .../samples/v1-beta/typescript/tsconfig.json | 17 - .../load-testing-rest/src/azureLoadTesting.ts | 18 +- .../src/clientDefinitions.ts | 505 +++--- .../load-testing-rest/src/isUnexpected.ts | 481 ++--- .../load-testing-rest/src/models.ts | 477 +++-- .../load-testing-rest/src/outputModels.ts | 674 ++++--- .../load-testing-rest/src/paginateHelper.ts | 37 +- .../load-testing-rest/src/parameters.ts | 315 ++-- .../load-testing-rest/src/responses.ts | 470 ++--- .../test/public/appComponents.spec.ts | 44 - .../test/public/fileUpload.spec.ts | 40 - .../test/public/loadtest.spec.ts | 38 - .../load-testing-rest/test/public/sample.jmx | 89 - .../test/public/sampleTest.spec.ts | 23 + .../test/public/testrun.spec.ts | 41 - .../test/public/utils/recordedClient.ts | 38 +- .../load-testing-rest/tsconfig.json | 14 +- 43 files changed, 1772 insertions(+), 5185 deletions(-) delete mode 100644 sdk/loadtestservice/load-testing-rest/CHANGELOG.md delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json delete mode 100644 sdk/loadtestservice/load-testing-rest/review/load-testing.api.md delete mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sample.jmx delete mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/sample.jmx create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/sampleTest.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts diff --git a/sdk/loadtestservice/load-testing-rest/CHANGELOG.md b/sdk/loadtestservice/load-testing-rest/CHANGELOG.md deleted file mode 100644 index 582d84c54c3a..000000000000 --- a/sdk/loadtestservice/load-testing-rest/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# Release History - -## 1.0.0-beta.1 (2022-10-19) - -### Features Added - -Initial release of the Azure LoadTesting package diff --git a/sdk/loadtestservice/load-testing-rest/README.md b/sdk/loadtestservice/load-testing-rest/README.md index f4c3467870b4..16c6fafdb627 100644 --- a/sdk/loadtestservice/load-testing-rest/README.md +++ b/sdk/loadtestservice/load-testing-rest/README.md @@ -1,17 +1,15 @@ -# Azure Load Testing client library for JavaScript +# AzureLoadTesting client library for JavaScript -Azure Load Testing provides client library in JavaScript to the user by which they can interact natively with Azure Load Testing service. Azure Load Testing is a fully managed load-testing service that enables you to generate high-scale load. The service simulates traffic for your applications, regardless of where they're hosted. Developers, testers, and quality assurance (QA) engineers can use it to optimize application performance, scalability, or capacity. +Azure Load Testing Client **Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library** -## Documentation +Key links: -Various documentation is available to help you get started - - - -- [API reference documentation][api_reference_doc] -- [Product Documentation][product_documentation] +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest) +- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/load-testing) +- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/load-testing) +- [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -21,7 +19,7 @@ Various documentation is available to help you get started ### Prerequisites -- You must have an [Azure subscription](https://azure.microsoft.com/free/) and [Azure Load Test Service Resource](https://learn.microsoft.com/azure/load-testing/) to use this package. +- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package. ### Install the `@azure-rest/load-testing` package @@ -31,13 +29,13 @@ Install the AzureLoadTesting client REST client library for JavaScript with `npm npm install @azure-rest/load-testing ``` -### Create and authenticate a `AzureLoadTesting` client +### Create and authenticate a `AzureLoadTesting` To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token), provide an instance of the desired credential type obtained from the [@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library. -To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) +To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use. As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential) @@ -46,122 +44,6 @@ can be used to authenticate the client. Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET -## Key concepts - -The following components make up the Azure Load Testing Service. The Azure Load Test client library for JavaScript allows you to interact with each of these components through the use of a dedicated client object. - -#### Test - -A test specifies the test script, and configuration settings for running a load test. You can create one or more tests in an Azure Load Testing resource. - -#### App Component - -When you run a load test for an Azure-hosted application, you can monitor resource metrics for the different Azure application components (server-side metrics). While the load test runs, and after completion of the test, you can monitor and analyze the resource metrics in the Azure Load Testing dashboard. - -#### Metrics - -During a load test, Azure Load Testing collects metrics about the test execution. There are two types of metrics: - -1. Client-side metrics give you details reported by the test engine. These metrics include the number of virtual users, the request response time, the number of failed requests, or the number of requests per second. - -2. Server-side metrics are available for Azure-hosted applications and provide information about your Azure application components. Metrics can be for the number of database reads, the type of HTTP responses, or container resource consumption. - -### Test Engine - -A test engine is computing infrastructure that runs the Apache JMeter test script. You can scale out your load test by configuring the number of test engines. The test script runs in parallel across the specified number of test engines. - -### Test Run - -A test run represents one execution of a load test. It collects the logs associated with running the Apache JMeter script, the load test YAML configuration, the list of app components to monitor, and the results of the test. - -### Data-Plane Endpoint - -Data-plane of Azure Load Testing resources is addressable using the following URL format: - -`00000000-0000-0000-0000-000000000000.aaa.cnt-prod.loadtesting.azure.com` - -The first GUID `00000000-0000-0000-0000-000000000000` is the unique identifier used for accessing the Azure Load Testing resource. This is followed by `aaa` which is the Azure region of the resource. - -The data-plane endpoint is obtained from Control Plane APIs. - -**Example:** `1234abcd-12ab-12ab-12ab-123456abcdef.eus.cnt-prod.loadtesting.azure.com` - -In the above example, `eus` represents the Azure region `East US`. - -## Examples - -### Creating a load test - -```javascript -import AzureLoadTesting, { AzureLoadTestingClient } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; - -var TEST_ID = "some-test-id"; -var DISPLAY_NAME = "my-load-test"; - -const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); - -await Client.path("/loadtests/{testId}", TEST_ID).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: DISPLAY_NAME, - description: "", - loadTestConfig: { - engineInstances: 1, - splitAllCSVs: false, - }, - secrets: {}, - environmentVariables: {}, - passFailCriteria: { passFailMetrics: {} }, - }, -}); -``` - -### Uploading .jmx file to a Test - -```javascript -import { AzureLoadTestingClient } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { createReadStream } from "fs"; - -var TEST_ID = "some-test-id"; -var FILE_ID = "some-file-id"; -const readStream = createReadStream("./sample.jmx"); - -const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); - -await Client.path("/loadtests/{testId}/files/{fileId}", TEST_ID, FILE_ID).put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, -}); -``` - -### Running a Test - -```javascript -import { AzureLoadTestingClient } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; - -var TEST_ID = "some-test-id"; -var TEST_RUN_ID = "some-testrun-id"; -var DISPLAY_NAME = "my-load-test-run"; - -const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); - -await Client.path("/testruns/{testRunId}", TEST_RUN_ID).patch({ - contentType: "application/merge-patch+json", - body: { - testId: TEST_ID, - displayName: DISPLAY_NAME, - }, -}); - -var result = await client.path("/testruns/{testRunId}", TEST_RUN_ID).get(); -console.log(result); -``` - ## Troubleshooting ### Logging @@ -175,27 +57,3 @@ setLogLevel("info"); ``` For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). - -## Next steps - -Azure Loading Testing JavaScript SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered. - - - -## Contributing - -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md). - -1. Fork it -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request - - - - - -[api_reference_doc]: https://docs.microsoft.com/rest/api/loadtesting/ -[product_documentation]: https://azure.microsoft.com/services/load-testing/ -[azure_subscription]: https://azure.microsoft.com/free/ diff --git a/sdk/loadtestservice/load-testing-rest/karma.conf.js b/sdk/loadtestservice/load-testing-rest/karma.conf.js index 2664494e4228..85ddb06133aa 100644 --- a/sdk/loadtestservice/load-testing-rest/karma.conf.js +++ b/sdk/loadtestservice/load-testing-rest/karma.conf.js @@ -7,7 +7,7 @@ require("dotenv").config(); const { relativeRecordingsPath } = require("@azure-tools/test-recorder"); process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); -module.exports = function (config) { +module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: "./", @@ -27,7 +27,7 @@ module.exports = function (config) { "karma-coverage", "karma-sourcemap-loader", "karma-junit-reporter", - "karma-source-map-support", + "karma-source-map-support" ], // list of files / patterns to load in the browser @@ -37,8 +37,8 @@ module.exports = function (config) { pattern: "dist-test/index.browser.js.map", type: "html", included: false, - served: true, - }, + served: true + } ], // list of files / patterns to exclude @@ -47,7 +47,7 @@ module.exports = function (config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - "**/*.js": ["sourcemap", "env"], + "**/*.js": ["sourcemap", "env"] // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable // "dist-test/index.js": ["coverage"] @@ -55,12 +55,11 @@ module.exports = function (config) { envPreprocessor: [ "TEST_MODE", - "LOADTESTSERVICE_ENDPOINT", + "ENDPOINT", "AZURE_CLIENT_SECRET", "AZURE_CLIENT_ID", "AZURE_TENANT_ID", - "SUBSCRIPTION_ID", - "RECORDINGS_RELATIVE_PATH", + "SUBSCRIPTION_ID" ], // test results reporter to use @@ -75,8 +74,8 @@ module.exports = function (config) { { type: "json", subdir: ".", file: "coverage.json" }, { type: "lcovonly", subdir: ".", file: "lcov.info" }, { type: "html", subdir: "html" }, - { type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" }, - ], + { type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" } + ] }, junitReporter: { @@ -86,7 +85,7 @@ module.exports = function (config) { useBrowserName: false, // add browser name to report and classes names nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element - properties: {}, // key value pair of properties to add to the section of the report + properties: {} // key value pair of properties to add to the section of the report }, // web server port @@ -108,8 +107,8 @@ module.exports = function (config) { customLaunchers: { ChromeHeadlessNoSandbox: { base: "ChromeHeadless", - flags: ["--no-sandbox", "--disable-web-security", "--lang=en-US"], - }, + flags: ["--no-sandbox", "--disable-web-security"] + } }, // Continuous Integration mode @@ -128,8 +127,8 @@ module.exports = function (config) { mocha: { // change Karma's debug.html to the mocha web reporter reporter: "html", - timeout: "600000", - }, - }, + timeout: "600000" + } + } }); }; diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index 8b6850a4011f..7c009e6e8037 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -2,25 +2,16 @@ "name": "@azure-rest/load-testing", "sdk-type": "client", "author": "Microsoft Corporation", - "version": "1.0.0-beta.1", + "version": "1.0.0", "description": "", - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], + "keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"], "license": "MIT", "main": "dist/index.js", "module": "./dist-esm/src/index.js", "types": "./types/load-testing.d.ts", "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md", "repository": "github:Azure/azure-sdk-for-js", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, + "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/", "dist-esm/src/", @@ -31,24 +22,10 @@ ], "//metadata": { "constantPaths": [ - { - "path": "swagger/README.md", - "prefix": "package-version" - } + { "path": "swagger/README.md", "prefix": "package-version" } ] }, - "//sampleConfiguration": { - "productName": "Azure Load Testing rest", - "productSlugs": [ - "azure" - ], - "requiredResources": { - "Azure LoadTesting Service instance": "https://learn.microsoft.com/en-us/azure/load-testing/" - } - }, - "engines": { - "node": ">=12.0.0" - }, + "engines": { "node": ">=12.0.0" }, "scripts": { "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", @@ -84,18 +61,16 @@ "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0", - "@azure/core-paging": "^1.2.0", - "@azure/core-util": "1.1.1" + "@azure/core-paging": "^1.2.0" }, "devDependencies": { - "@microsoft/api-extractor": "^7.31.1", + "@microsoft/api-extractor": "7.18.11", "autorest": "latest", "@types/node": "^12.0.0", "dotenv": "^8.2.0", "eslint": "^7.15.0", "mkdirp": "^1.0.4", "prettier": "2.2.1", - "process": "0.11.10", "rimraf": "^3.0.0", "source-map-support": "^0.5.9", "typescript": "~4.2.0", @@ -121,9 +96,7 @@ "karma-source-map-support": "~1.4.0", "karma-sourcemap-loader": "^0.3.8", "karma": "^6.2.0", - "nyc": "^14.0.0", - "uuid": "^9.0.0", - "@types/uuid": "8.3.4" + "nyc": "^14.0.0" }, "browser": { "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json deleted file mode 100644 index e7387d2d5f0e..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/appcomponents/appcomp123?api-version=2022-06-01-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "445", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "b8adc24b-23af-4c3c-a34b-3ec676c77090", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 OS/Win32" - }, - "RequestBody": { - "name": "app_component", - "testId": "abc", - "value": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "subscriptionId": "azure_subscription_id" - } - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "668", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:58:09 GMT", - "mise-correlation-id": "7f64177a-d608-4dcf-b7ab-9a5e7592d218", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "3c50fc5c-baea-4a1e-b4ab-09083ee310be" - }, - "ResponseBody": { - "resourceId": "/subscriptions/azure_subscription_id/resourcegroups/mrinal/providers/microsoft.loadtestservice/loadtests/mrgautam-auseast", - "testId": "abc", - "testRunId": null, - "name": "appcomp123", - "value": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "displayName": null, - "resourceGroup": "App-Service-Sample-Demo-rg", - "subscriptionId": "{SUBSCRIPTION_ID}", - "kind": null - } - } - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json deleted file mode 100644 index f721723386d8..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Entries": [], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json deleted file mode 100644 index f7dbabb0620f..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/loadtests/abc?api-version=2022-06-01-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "106", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "61e94088-6701-494f-90d9-cdac1bbe57b9", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 OS/Win32" - }, - "RequestBody": { - "displayName": "sample_test", - "description": "", - "loadTestConfig": { - "engineInstances": 1, - "splitAllCSVs": false - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "869", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:58:09 GMT", - "mise-correlation-id": "4c054af4-e017-4d71-91f4-72d5d85b346d", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f4fabe57-fd7f-442c-a461-2e1da1b1406d" - }, - "ResponseBody": { - "testId": "abc", - "description": "", - "displayName": "sample_test", - "resourceId": "/subscriptions/azure_subscription_id/resourcegroups/mrinal/providers/microsoft.loadtestservice/loadtests/mrgautam-auseast", - "loadTestConfig": { - "engineInstances": 1, - "splitAllCSVs": false - }, - "passFailCriteria": null, - "createdDateTime": "2022-09-22T10:08:09.784Z", - "createdBy": null, - "lastModifiedDateTime": "2022-09-22T10:08:09.784Z", - "lastModifiedBy": null, - "inputArtifacts": { - "configUrl": null, - "testScriptUrl": { - "url": "https://storageurl.com/", - "fileId": "xyz12365", - "filename": "sample.jmx", - "fileType": 0, - "expireTime": "2022-10-19T22:08:09.9544773\u002B00:00", - "validationStatus": "VALIDATION_SUCCESS" - }, - "userPropUrl": null, - "inputArtifactsZipFileurl": null, - "additionalUrls": [] - }, - "secrets": null, - "certificate": null, - "environmentVariables": null, - "subnetId": null, - "keyvaultReferenceIdentityType": null, - "keyvaultReferenceIdentityId": null - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json deleted file mode 100644 index 254b0cf6305d..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/testruns/abcde?api-version=2022-06-01-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "59", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "6a6b5c1f-44bd-4d11-91c1-17b06f077ab7", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 OS/Win32" - }, - "RequestBody": { - "testId": "abc", - "displayName": "sample_testrun", - "vusers": 10 - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "3651", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:58:10 GMT", - "mise-correlation-id": "7dfbf294-1e5d-4eae-8f7b-982874c0ed05", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2a498d58-8119-4bce-ae11-8bba3fc255b2" - }, - "ResponseBody": { - "testRunId": "abcde", - "displayName": "sample_testrun", - "testId": "abc", - "resourceId": "/subscriptions/azure_subscription_id/resourcegroups/mrinal/providers/microsoft.loadtestservice/loadtests/mrgautam-auseast", - "description": null, - "status": "DONE", - "startDateTime": "2022-09-22T14:17:59Z", - "endDateTime": "2022-09-22T14:18:01Z", - "loadTestConfig": { - "engineInstances": 1, - "splitAllCSVs": false - }, - "testResult": "NOT_APPLICABLE", - "passFailCriteria": null, - "testArtifacts": { - "inputArtifacts": { - "configUrl": { - "url": "https://storageurl.com/", - "fileId": "fb4ae40e-4259-4d13-bb74-54c1e17b0556", - "filename": "config.yaml", - "fileType": 2, - "expireTime": "2022-10-19T22:08:10.7203097\u002B00:00", - "validationStatus": "" - }, - "testScriptUrl": { - "url": "https://storageurl.com/", - "fileId": "xyz12365", - "filename": "sample.jmx", - "fileType": 0, - "expireTime": "2022-10-19T22:08:10.7203097\u002B00:00", - "validationStatus": "VALIDATION_SUCCESS" - }, - "userPropUrl": null, - "inputArtifactsZipFileurl": { - "url": "https://storageurl.com/", - "fileId": "0936295d-f3f1-47ae-8326-6c67f1dcf6cb", - "filename": "inputartifacts.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:08:10.7203097\u002B00:00", - "validationStatus": "" - }, - "additionalUrls": [] - }, - "outputArtifacts": { - "resultUrl": { - "url": "https://storageurl.com/", - "fileId": "c550376b-8dbf-4944-9b0e-953588129f2c", - "filename": "csv.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:08:10.7203097\u002B00:00", - "validationStatus": "" - }, - "logsUrl": { - "url": "https://storageurl.com/", - "fileId": "0c898fbf-cada-4f94-9038-36d2cf00744f", - "filename": "logs.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:08:10.7203097\u002B00:00", - "validationStatus": "" - } - } - }, - "executedDateTime": "2022-09-22T14:17:23.406Z", - "vusers": 50, - "testRunStatistics": { - "Sample": { - "transaction": "Sample", - "sampleCount": 500.0, - "errorCount": 397.0, - "errorPct": 79.0, - "meanResTime": 120.714, - "medianResTime": 64.0, - "maxResTime": 780.0, - "minResTime": 32.0, - "pct1ResTime": 294.0, - "pct2ResTime": 369.0, - "pct3ResTime": 494.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-0": { - "transaction": "Sample-0", - "sampleCount": 500.0, - "errorCount": 0.0, - "errorPct": 0.0, - "meanResTime": 27.89, - "medianResTime": 25.0, - "maxResTime": 68.0, - "minResTime": 21.0, - "pct1ResTime": 39.0, - "pct2ResTime": 50.0, - "pct3ResTime": 64.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-1": { - "transaction": "Sample-1", - "sampleCount": 500.0, - "errorCount": 396.0, - "errorPct": 79.0, - "meanResTime": 49.762, - "medianResTime": 31.0, - "maxResTime": 403.0, - "minResTime": 10.0, - "pct1ResTime": 107.0, - "pct2ResTime": 164.0, - "pct3ResTime": 241.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-2": { - "transaction": "Sample-2", - "sampleCount": 104.0, - "errorCount": 1.0, - "errorPct": 0.0, - "meanResTime": 205.7596153846154, - "medianResTime": 190.0, - "maxResTime": 677.0, - "minResTime": 53.0, - "pct1ResTime": 326.0, - "pct2ResTime": 367.0, - "pct3ResTime": 417.0, - "throughput": 104.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Total": { - "transaction": "Total", - "sampleCount": 1604.0, - "errorCount": 794.0, - "errorPct": 49.0, - "meanResTime": 75.17581047381546, - "medianResTime": 39.0, - "maxResTime": 780.0, - "minResTime": 10.0, - "pct1ResTime": 204.0, - "pct2ResTime": 278.0, - "pct3ResTime": 417.0, - "throughput": 802.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - } - }, - "createdDateTime": "2022-09-22T14:17:23.648Z", - "createdBy": null, - "lastModifiedDateTime": "2022-09-22T14:17:23.648Z", - "lastModifiedBy": null, - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "secrets": null, - "certificate": null, - "environmentVariables": null, - "duration": 2000, - "subnetId": null, - "errorDetails": null - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json deleted file mode 100644 index 9d6d368c144d..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json +++ /dev/null @@ -1,198 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/testruns/abcde?api-version=2022-06-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "aa8bfc2d-a7e0-4bd3-96fa-1375648ab37f", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 OS/Win32" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "3651", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:58:11 GMT", - "mise-correlation-id": "ef6fa8ea-1706-473d-9ed9-72359972fcde", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9c629205-c386-4362-aa07-7d3fbf0bdc12" - }, - "ResponseBody": { - "testRunId": "abcde", - "displayName": "sample_testrun", - "testId": "abc", - "resourceId": "/subscriptions/azure_subscription_id/resourcegroups/mrinal/providers/microsoft.loadtestservice/loadtests/mrgautam-auseast", - "description": null, - "status": "DONE", - "startDateTime": "2022-09-22T14:17:59Z", - "endDateTime": "2022-09-22T14:18:01Z", - "loadTestConfig": { - "engineInstances": 1, - "splitAllCSVs": false - }, - "testResult": "NOT_APPLICABLE", - "passFailCriteria": null, - "testArtifacts": { - "inputArtifacts": { - "configUrl": { - "url": "https://storageurl.com/", - "fileId": "fb4ae40e-4259-4d13-bb74-54c1e17b0556", - "filename": "config.yaml", - "fileType": 2, - "expireTime": "2022-10-19T22:08:11.3455936\u002B00:00", - "validationStatus": "" - }, - "testScriptUrl": { - "url": "https://storageurl.com/", - "fileId": "xyz12365", - "filename": "sample.jmx", - "fileType": 0, - "expireTime": "2022-10-19T22:08:11.3455936\u002B00:00", - "validationStatus": "VALIDATION_SUCCESS" - }, - "userPropUrl": null, - "inputArtifactsZipFileurl": { - "url": "https://storageurl.com/", - "fileId": "0936295d-f3f1-47ae-8326-6c67f1dcf6cb", - "filename": "inputartifacts.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:08:11.3455936\u002B00:00", - "validationStatus": "" - }, - "additionalUrls": [] - }, - "outputArtifacts": { - "resultUrl": { - "url": "https://storageurl.com/", - "fileId": "c550376b-8dbf-4944-9b0e-953588129f2c", - "filename": "csv.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:08:11.3455936\u002B00:00", - "validationStatus": "" - }, - "logsUrl": { - "url": "https://storageurl.com/", - "fileId": "0c898fbf-cada-4f94-9038-36d2cf00744f", - "filename": "logs.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:08:11.3455936\u002B00:00", - "validationStatus": "" - } - } - }, - "executedDateTime": "2022-09-22T14:17:23.406Z", - "vusers": 50, - "testRunStatistics": { - "Sample": { - "transaction": "Sample", - "sampleCount": 500.0, - "errorCount": 397.0, - "errorPct": 79.0, - "meanResTime": 120.714, - "medianResTime": 64.0, - "maxResTime": 780.0, - "minResTime": 32.0, - "pct1ResTime": 294.0, - "pct2ResTime": 369.0, - "pct3ResTime": 494.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-0": { - "transaction": "Sample-0", - "sampleCount": 500.0, - "errorCount": 0.0, - "errorPct": 0.0, - "meanResTime": 27.89, - "medianResTime": 25.0, - "maxResTime": 68.0, - "minResTime": 21.0, - "pct1ResTime": 39.0, - "pct2ResTime": 50.0, - "pct3ResTime": 64.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-1": { - "transaction": "Sample-1", - "sampleCount": 500.0, - "errorCount": 396.0, - "errorPct": 79.0, - "meanResTime": 49.762, - "medianResTime": 31.0, - "maxResTime": 403.0, - "minResTime": 10.0, - "pct1ResTime": 107.0, - "pct2ResTime": 164.0, - "pct3ResTime": 241.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-2": { - "transaction": "Sample-2", - "sampleCount": 104.0, - "errorCount": 1.0, - "errorPct": 0.0, - "meanResTime": 205.7596153846154, - "medianResTime": 190.0, - "maxResTime": 677.0, - "minResTime": 53.0, - "pct1ResTime": 326.0, - "pct2ResTime": 367.0, - "pct3ResTime": 417.0, - "throughput": 104.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Total": { - "transaction": "Total", - "sampleCount": 1604.0, - "errorCount": 794.0, - "errorPct": 49.0, - "meanResTime": 75.17581047381546, - "medianResTime": 39.0, - "maxResTime": 780.0, - "minResTime": 10.0, - "pct1ResTime": 204.0, - "pct2ResTime": 278.0, - "pct3ResTime": 417.0, - "throughput": 802.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - } - }, - "createdDateTime": "2022-09-22T14:17:23.648Z", - "createdBy": null, - "lastModifiedDateTime": "2022-09-22T14:17:23.648Z", - "lastModifiedBy": null, - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "secrets": null, - "certificate": null, - "environmentVariables": null, - "duration": 2000, - "subnetId": null, - "errorDetails": null - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json deleted file mode 100644 index 5f6eef2d784c..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/appcomponents/appcomp123?api-version=2022-06-01-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "445", - "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19043)", - "x-ms-client-request-id": "7990c3f4-7709-42f5-a432-866c5c3f23b1" - }, - "RequestBody": { - "name": "app_component", - "testId": "abc", - "value": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "subscriptionId": "azure_subscription_id" - } - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "668", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:57:54 GMT", - "mise-correlation-id": "55b22e21-6755-4f73-b2c5-443482fcebfb", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "0f4bf3d6-7f18-4f1e-9421-24be05526c0d" - }, - "ResponseBody": { - "resourceId": "/subscriptions/azure_subscription_id/resourcegroups/mrinal/providers/microsoft.loadtestservice/loadtests/mrgautam-auseast", - "testId": "abc", - "testRunId": null, - "name": "appcomp123", - "value": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "displayName": null, - "resourceGroup": "App-Service-Sample-Demo-rg", - "subscriptionId": "{SUBSCRIPTION_ID}", - "kind": null - } - } - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json deleted file mode 100644 index 1fb4900cdd57..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/loadtests/abc/files/xyz12365?api-version=2022-06-01-preview", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "multipart/form-data; boundary=--------------------------045059878997592349078585", - "Transfer-Encoding": "chunked", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19043)", - "x-ms-client-request-id": "e059f746-c770-4eca-9b0f-d35c2c4c9589" - }, - "RequestBody": "LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTA0NTA1OTg3ODk5NzU5MjM0OTA3ODU4NQ0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9InNhbXBsZS5qbXgiDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbQ0KDQo8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCI/Pgo8am1ldGVyVGVzdFBsYW4gdmVyc2lvbj0iMS4yIiBwcm9wZXJ0aWVzPSI1LjAiIGptZXRlcj0iNS4zIj4KICA8aGFzaFRyZWU\u002BCiAgICA8VGVzdFBsYW4gZ3VpY2xhc3M9IlRlc3RQbGFuR3VpIiB0ZXN0Y2xhc3M9IlRlc3RQbGFuIiB0ZXN0bmFtZT0iVGVzdCBQbGFuIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGVzdFBsYW4uY29tbWVudHMiPjwvc3RyaW5nUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLmZ1bmN0aW9uYWxfbW9kZSI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8Ym9vbFByb3AgbmFtZT0iVGVzdFBsYW4uc2VyaWFsaXplX3RocmVhZGdyb3VwcyI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGVzdFBsYW4udXNlcl9kZWZpbmVkX3ZhcmlhYmxlcyIgZWxlbWVudFR5cGU9IkFyZ3VtZW50cyIgZ3VpY2xhc3M9IkFyZ3VtZW50c1BhbmVsIiB0ZXN0Y2xhc3M9IkFyZ3VtZW50cyIgdGVzdG5hbWU9IlVzZXIgRGVmaW5lZCBWYXJpYWJsZXMiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lX2NsYXNzcGF0aCI\u002BPC9zdHJpbmdQcm9wPgogICAgPC9UZXN0UGxhbj4KICAgIDxoYXNoVHJlZT4KICAgICAgPFRocmVhZEdyb3VwIGd1aWNsYXNzPSJUaHJlYWRHcm91cEd1aSIgdGVzdGNsYXNzPSJUaHJlYWRHcm91cCIgdGVzdG5hbWU9IlRocmVhZCBHcm91cCIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAub25fc2FtcGxlX2Vycm9yIj5jb250aW51ZTwvc3RyaW5nUHJvcD4KICAgICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGhyZWFkR3JvdXAubWFpbl9jb250cm9sbGVyIiBlbGVtZW50VHlwZT0iTG9vcENvbnRyb2xsZXIiIGd1aWNsYXNzPSJMb29wQ29udHJvbFBhbmVsIiB0ZXN0Y2xhc3M9Ikxvb3BDb250cm9sbGVyIiB0ZXN0bmFtZT0iTG9vcCBDb250cm9sbGVyIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5jb250aW51ZV9mb3JldmVyIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5sb29wcyI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9lbGVtZW50UHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5udW1fdGhyZWFkcyI\u002BNTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BNjA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTA0NTA1OTg3ODk5NzU5MjM0OTA3ODU4NS0tDQo=", - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "175", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:57:55 GMT", - "Location": "https://endpoint/loadtests/abc/files/xyz12365?resourceId=%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast\u0026api-version=2022-06-01-preview", - "mise-correlation-id": "a9927bab-21f0-4ef4-a96b-cb3fbd0ea290", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "fb4323f2-7594-4644-a048-b0a25308c98d" - }, - "ResponseBody": { - "url": "https://storageurl.com/", - "fileId": "xyz12365", - "filename": "sample.jmx", - "fileType": 0, - "expireTime": "2022-10-19T22:07:55.4067063", - "validationStatus": "VALIDATION_INITIATED" - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json deleted file mode 100644 index 99fa7e713d97..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/loadtests/abc?api-version=2022-06-01-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "106", - "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19043)", - "x-ms-client-request-id": "53c020f1-1847-4f87-844a-d3d27f309e60" - }, - "RequestBody": { - "displayName": "sample_test", - "description": "", - "loadTestConfig": { - "engineInstances": 1, - "splitAllCSVs": false - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "871", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:57:56 GMT", - "mise-correlation-id": "9696c41b-bd86-44e0-8f33-651e0312cdf9", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d1cd023c-0ad3-4b9b-96ff-2a4cf2f18a17" - }, - "ResponseBody": { - "testId": "abc", - "description": "", - "displayName": "sample_test", - "resourceId": "/subscriptions/azure_subscription_id/resourcegroups/mrinal/providers/microsoft.loadtestservice/loadtests/mrgautam-auseast", - "loadTestConfig": { - "engineInstances": 1, - "splitAllCSVs": false - }, - "passFailCriteria": null, - "createdDateTime": "2022-09-22T10:08:09.784Z", - "createdBy": null, - "lastModifiedDateTime": "2022-09-22T10:08:09.784Z", - "lastModifiedBy": null, - "inputArtifacts": { - "configUrl": null, - "testScriptUrl": { - "url": "https://storageurl.com/", - "fileId": "xyz12365", - "filename": "sample.jmx", - "fileType": 0, - "expireTime": "2022-10-19T22:07:56.2396891\u002B00:00", - "validationStatus": "VALIDATION_INITIATED" - }, - "userPropUrl": null, - "inputArtifactsZipFileurl": null, - "additionalUrls": [] - }, - "secrets": null, - "certificate": null, - "environmentVariables": null, - "subnetId": null, - "keyvaultReferenceIdentityType": null, - "keyvaultReferenceIdentityId": null - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json deleted file mode 100644 index ac2b9524f5fb..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json +++ /dev/null @@ -1,195 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/testruns/abcde?api-version=2022-06-01-preview", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "59", - "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19043)", - "x-ms-client-request-id": "720432bf-73a3-4ddd-a410-19ceb7c7d838" - }, - "RequestBody": { - "testId": "abc", - "displayName": "sample_testrun", - "vusers": 10 - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "3651", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:57:58 GMT", - "mise-correlation-id": "efb8c8ea-d4c9-4b08-857a-e39b45d36bf1", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f1372553-5dde-44db-9be5-ec502e56ac93" - }, - "ResponseBody": { - "testRunId": "abcde", - "displayName": "sample_testrun", - "testId": "abc", - "resourceId": "/subscriptions/azure_subscription_id/resourcegroups/mrinal/providers/microsoft.loadtestservice/loadtests/mrgautam-auseast", - "description": null, - "status": "DONE", - "startDateTime": "2022-09-22T14:17:59Z", - "endDateTime": "2022-09-22T14:18:01Z", - "loadTestConfig": { - "engineInstances": 1, - "splitAllCSVs": false - }, - "testResult": "NOT_APPLICABLE", - "passFailCriteria": null, - "testArtifacts": { - "inputArtifacts": { - "configUrl": { - "url": "https://storageurl.com/", - "fileId": "fb4ae40e-4259-4d13-bb74-54c1e17b0556", - "filename": "config.yaml", - "fileType": 2, - "expireTime": "2022-10-19T22:07:58.6852101\u002B00:00", - "validationStatus": "" - }, - "testScriptUrl": { - "url": "https://storageurl.com/", - "fileId": "xyz12365", - "filename": "sample.jmx", - "fileType": 0, - "expireTime": "2022-10-19T22:07:58.6852101\u002B00:00", - "validationStatus": "VALIDATION_SUCCESS" - }, - "userPropUrl": null, - "inputArtifactsZipFileurl": { - "url": "https://storageurl.com/", - "fileId": "0936295d-f3f1-47ae-8326-6c67f1dcf6cb", - "filename": "inputartifacts.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:07:58.6852101\u002B00:00", - "validationStatus": "" - }, - "additionalUrls": [] - }, - "outputArtifacts": { - "resultUrl": { - "url": "https://storageurl.com/", - "fileId": "c550376b-8dbf-4944-9b0e-953588129f2c", - "filename": "csv.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:07:58.6852101\u002B00:00", - "validationStatus": "" - }, - "logsUrl": { - "url": "https://storageurl.com/", - "fileId": "0c898fbf-cada-4f94-9038-36d2cf00744f", - "filename": "logs.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:07:58.6852101\u002B00:00", - "validationStatus": "" - } - } - }, - "executedDateTime": "2022-09-22T14:17:23.406Z", - "vusers": 50, - "testRunStatistics": { - "Sample": { - "transaction": "Sample", - "sampleCount": 500.0, - "errorCount": 397.0, - "errorPct": 79.0, - "meanResTime": 120.714, - "medianResTime": 64.0, - "maxResTime": 780.0, - "minResTime": 32.0, - "pct1ResTime": 294.0, - "pct2ResTime": 369.0, - "pct3ResTime": 494.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-0": { - "transaction": "Sample-0", - "sampleCount": 500.0, - "errorCount": 0.0, - "errorPct": 0.0, - "meanResTime": 27.89, - "medianResTime": 25.0, - "maxResTime": 68.0, - "minResTime": 21.0, - "pct1ResTime": 39.0, - "pct2ResTime": 50.0, - "pct3ResTime": 64.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-1": { - "transaction": "Sample-1", - "sampleCount": 500.0, - "errorCount": 396.0, - "errorPct": 79.0, - "meanResTime": 49.762, - "medianResTime": 31.0, - "maxResTime": 403.0, - "minResTime": 10.0, - "pct1ResTime": 107.0, - "pct2ResTime": 164.0, - "pct3ResTime": 241.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-2": { - "transaction": "Sample-2", - "sampleCount": 104.0, - "errorCount": 1.0, - "errorPct": 0.0, - "meanResTime": 205.7596153846154, - "medianResTime": 190.0, - "maxResTime": 677.0, - "minResTime": 53.0, - "pct1ResTime": 326.0, - "pct2ResTime": 367.0, - "pct3ResTime": 417.0, - "throughput": 104.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Total": { - "transaction": "Total", - "sampleCount": 1604.0, - "errorCount": 794.0, - "errorPct": 49.0, - "meanResTime": 75.17581047381546, - "medianResTime": 39.0, - "maxResTime": 780.0, - "minResTime": 10.0, - "pct1ResTime": 204.0, - "pct2ResTime": 278.0, - "pct3ResTime": 417.0, - "throughput": 802.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - } - }, - "createdDateTime": "2022-09-22T14:17:23.648Z", - "createdBy": null, - "lastModifiedDateTime": "2022-09-22T14:17:23.648Z", - "lastModifiedBy": null, - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "secrets": null, - "certificate": null, - "environmentVariables": null, - "duration": 2000, - "subnetId": null, - "errorDetails": null - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json deleted file mode 100644 index ad0b8f69be58..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ /dev/null @@ -1,189 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/testruns/abcde?api-version=2022-06-01-preview", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.1 core-rest-pipeline/1.9.2 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19043)", - "x-ms-client-request-id": "9620730f-27e8-479c-974d-c9cea5fdb6db" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview", - "Connection": "keep-alive", - "Content-Length": "3651", - "Content-Type": "application/json; charset=utf-8", - "Date": "Wed, 19 Oct 2022 21:57:59 GMT", - "mise-correlation-id": "afc78747-890b-4bfa-af3e-a06f66d68c72", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4c55243a-451b-48ad-b207-9e3b03f75084" - }, - "ResponseBody": { - "testRunId": "abcde", - "displayName": "sample_testrun", - "testId": "abc", - "resourceId": "/subscriptions/azure_subscription_id/resourcegroups/mrinal/providers/microsoft.loadtestservice/loadtests/mrgautam-auseast", - "description": null, - "status": "DONE", - "startDateTime": "2022-09-22T14:17:59Z", - "endDateTime": "2022-09-22T14:18:01Z", - "loadTestConfig": { - "engineInstances": 1, - "splitAllCSVs": false - }, - "testResult": "NOT_APPLICABLE", - "passFailCriteria": null, - "testArtifacts": { - "inputArtifacts": { - "configUrl": { - "url": "https://storageurl.com/", - "fileId": "fb4ae40e-4259-4d13-bb74-54c1e17b0556", - "filename": "config.yaml", - "fileType": 2, - "expireTime": "2022-10-19T22:07:59.2976911\u002B00:00", - "validationStatus": "" - }, - "testScriptUrl": { - "url": "https://storageurl.com/", - "fileId": "xyz12365", - "filename": "sample.jmx", - "fileType": 0, - "expireTime": "2022-10-19T22:07:59.2976911\u002B00:00", - "validationStatus": "VALIDATION_SUCCESS" - }, - "userPropUrl": null, - "inputArtifactsZipFileurl": { - "url": "https://storageurl.com/", - "fileId": "0936295d-f3f1-47ae-8326-6c67f1dcf6cb", - "filename": "inputartifacts.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:07:59.2976911\u002B00:00", - "validationStatus": "" - }, - "additionalUrls": [] - }, - "outputArtifacts": { - "resultUrl": { - "url": "https://storageurl.com/", - "fileId": "c550376b-8dbf-4944-9b0e-953588129f2c", - "filename": "csv.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:07:59.2976911\u002B00:00", - "validationStatus": "" - }, - "logsUrl": { - "url": "https://storageurl.com/", - "fileId": "0c898fbf-cada-4f94-9038-36d2cf00744f", - "filename": "logs.zip", - "fileType": 2, - "expireTime": "2022-10-19T22:07:59.2976911\u002B00:00", - "validationStatus": "" - } - } - }, - "executedDateTime": "2022-09-22T14:17:23.406Z", - "vusers": 50, - "testRunStatistics": { - "Sample": { - "transaction": "Sample", - "sampleCount": 500.0, - "errorCount": 397.0, - "errorPct": 79.0, - "meanResTime": 120.714, - "medianResTime": 64.0, - "maxResTime": 780.0, - "minResTime": 32.0, - "pct1ResTime": 294.0, - "pct2ResTime": 369.0, - "pct3ResTime": 494.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-0": { - "transaction": "Sample-0", - "sampleCount": 500.0, - "errorCount": 0.0, - "errorPct": 0.0, - "meanResTime": 27.89, - "medianResTime": 25.0, - "maxResTime": 68.0, - "minResTime": 21.0, - "pct1ResTime": 39.0, - "pct2ResTime": 50.0, - "pct3ResTime": 64.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-1": { - "transaction": "Sample-1", - "sampleCount": 500.0, - "errorCount": 396.0, - "errorPct": 79.0, - "meanResTime": 49.762, - "medianResTime": 31.0, - "maxResTime": 403.0, - "minResTime": 10.0, - "pct1ResTime": 107.0, - "pct2ResTime": 164.0, - "pct3ResTime": 241.0, - "throughput": 250.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Sample-2": { - "transaction": "Sample-2", - "sampleCount": 104.0, - "errorCount": 1.0, - "errorPct": 0.0, - "meanResTime": 205.7596153846154, - "medianResTime": 190.0, - "maxResTime": 677.0, - "minResTime": 53.0, - "pct1ResTime": 326.0, - "pct2ResTime": 367.0, - "pct3ResTime": 417.0, - "throughput": 104.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - }, - "Total": { - "transaction": "Total", - "sampleCount": 1604.0, - "errorCount": 794.0, - "errorPct": 49.0, - "meanResTime": 75.17581047381546, - "medianResTime": 39.0, - "maxResTime": 780.0, - "minResTime": 10.0, - "pct1ResTime": 204.0, - "pct2ResTime": 278.0, - "pct3ResTime": 417.0, - "throughput": 802.0, - "receivedKBytesPerSec": 0.0, - "sentKBytesPerSec": 0.0 - } - }, - "createdDateTime": "2022-09-22T14:17:23.648Z", - "createdBy": null, - "lastModifiedDateTime": "2022-09-22T14:17:23.648Z", - "lastModifiedBy": null, - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "secrets": null, - "certificate": null, - "environmentVariables": null, - "duration": 2000, - "subnetId": null, - "errorDetails": null - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md deleted file mode 100644 index bb5ef4d69a33..000000000000 --- a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md +++ /dev/null @@ -1,1561 +0,0 @@ -## API Report File for "@azure-rest/load-testing" - -> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). - -```ts - -/// - -import { Client } from '@azure-rest/core-client'; -import { ClientOptions } from '@azure-rest/core-client'; -import { HttpResponse } from '@azure-rest/core-client'; -import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PathUncheckedResponse } from '@azure-rest/core-client'; -import { RawHttpHeaders } from '@azure/core-rest-pipeline'; -import { RequestParameters } from '@azure-rest/core-client'; -import { StreamableMethod } from '@azure-rest/core-client'; -import { TokenCredential } from '@azure/core-auth'; - -// @public (undocumented) -export interface AppComponent { - displayName?: string; - kind?: string; - resourceGroup?: string; - resourceId: string; - resourceName: string; - resourceType: string; - subscriptionId?: string; -} - -// @public (undocumented) -export interface AppComponentCreateOrUpdateAppComponents { - delete(options?: AppComponentDeleteAppComponentsParameters): StreamableMethod; - get(options?: AppComponentGetAppComponentByNameParameters): StreamableMethod; - patch(options: AppComponentCreateOrUpdateAppComponentsParameters): StreamableMethod; -} - -// @public -export interface AppComponentCreateOrUpdateAppComponents200Response extends HttpResponse { - // (undocumented) - body: AppComponentsMapOutput; - // (undocumented) - status: "200"; -} - -// @public -export interface AppComponentCreateOrUpdateAppComponents201Response extends HttpResponse { - // (undocumented) - body: AppComponentsMapOutput; - // (undocumented) - status: "201"; -} - -// @public (undocumented) -export interface AppComponentCreateOrUpdateAppComponentsBodyParam { - body: AppComponentsMap; -} - -// @public (undocumented) -export interface AppComponentCreateOrUpdateAppComponentsdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface AppComponentCreateOrUpdateAppComponentsdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & AppComponentCreateOrUpdateAppComponentsdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export interface AppComponentCreateOrUpdateAppComponentsMediaTypesParam { - contentType?: "application/merge-patch+json"; -} - -// @public (undocumented) -export type AppComponentCreateOrUpdateAppComponentsParameters = AppComponentCreateOrUpdateAppComponentsMediaTypesParam & AppComponentCreateOrUpdateAppComponentsBodyParam & RequestParameters; - -// @public -export interface AppComponentDeleteAppComponents204Response extends HttpResponse { - // (undocumented) - body: Record; - // (undocumented) - status: "204"; -} - -// @public (undocumented) -export interface AppComponentDeleteAppComponentsdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface AppComponentDeleteAppComponentsdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & AppComponentDeleteAppComponentsdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type AppComponentDeleteAppComponentsParameters = RequestParameters; - -// @public (undocumented) -export interface AppComponentGetAppComponent { - get(options?: AppComponentGetAppComponentParameters): StreamableMethod; -} - -// @public -export interface AppComponentGetAppComponent200Response extends HttpResponse { - // (undocumented) - body: AppComponentsMapOutput; - // (undocumented) - status: "200"; -} - -// @public -export interface AppComponentGetAppComponentByName200Response extends HttpResponse { - // (undocumented) - body: AppComponentsMapOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface AppComponentGetAppComponentByNamedefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface AppComponentGetAppComponentByNamedefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & AppComponentGetAppComponentByNamedefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type AppComponentGetAppComponentByNameParameters = RequestParameters; - -// @public (undocumented) -export interface AppComponentGetAppComponentdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface AppComponentGetAppComponentdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & AppComponentGetAppComponentdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type AppComponentGetAppComponentParameters = AppComponentGetAppComponentQueryParam & RequestParameters; - -// @public (undocumented) -export interface AppComponentGetAppComponentQueryParam { - // (undocumented) - queryParameters?: AppComponentGetAppComponentQueryParamProperties; -} - -// @public (undocumented) -export interface AppComponentGetAppComponentQueryParamProperties { - testId?: string; - testRunId?: string; -} - -// @public (undocumented) -export interface AppComponentOutput { - displayName?: string; - kind?: string; - resourceGroup?: string; - resourceId: string; - resourceName: string; - resourceType: string; - subscriptionId?: string; -} - -// @public (undocumented) -export interface AppComponentsMap { - name?: string; - resourceId?: string; - testId?: string; - testRunId?: string; - value: Record; -} - -// @public (undocumented) -export interface AppComponentsMapOutput { - name?: string; - resourceId?: string; - testId?: string; - testRunId?: string; - value: Record; -} - -// @public (undocumented) -export type AzureLoadTestingClient = Client & { - path: Routes; -}; - -// @public (undocumented) -export interface ClientMetricsFiltersOutput { - // (undocumented) - filters?: FiltersOutput; - testRunId?: string; - // (undocumented) - timeRange?: TimeRangeOutput; -} - -// @public (undocumented) -export interface ClientMetricsRequestModel { - endTime: Date | string; - errors?: Array; - groupByInterval?: string; - percentiles?: Array; - requestSamplers?: Array; - startTime: Date | string; -} - -// @public (undocumented) -export interface ClientMetricsResultsOutput { - testRunId?: string; - // (undocumented) - timeSeries?: SeriesOutput; -} - -// @public (undocumented) -function createClient(Endpoint: string, credentials: TokenCredential, options?: ClientOptions): AzureLoadTestingClient; -export default createClient; - -// @public (undocumented) -export interface DefaultServerMetricsConfigListModelOutput { - defaultMetrics?: Record>; -} - -// @public (undocumented) -export interface DefaultServerMetricsConfigModelOutput { - // (undocumented) - aggregation?: string; - // (undocumented) - displayDescription?: string; - // (undocumented) - metricnamespace?: string; - // (undocumented) - name?: LocalizedNameOutput; - // (undocumented) - unit?: string; -} - -// @public (undocumented) -export interface ErrorModelOutput { - code?: string; - details?: Array; - message?: string; - target?: string; -} - -// @public (undocumented) -export interface ErrorResponseBodyOutput { - error?: ErrorModelOutput; -} - -// @public (undocumented) -export interface FileUrl { - expireTime?: Date | string; - fileId?: string; - filename?: string; - fileType?: "0" | "1" | "2"; - url?: string; - validationStatus?: string; -} - -// @public (undocumented) -export interface FileUrlListOutput { - nextLink?: string; - value: Array; -} - -// @public (undocumented) -export interface FileUrlOutput { - expireTime?: string; - fileId?: string; - filename?: string; - fileType?: "0" | "1" | "2"; - url?: string; - validationStatus?: string; -} - -// @public (undocumented) -export interface FiltersOutput { - errorFiltersValues?: Array; - requestSamplerValues?: Array; -} - -// @public -export type GetArrayType = T extends Array ? TData : never; - -// @public -export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ - page: TPage; - nextPageLink?: string; -}>; - -// @public (undocumented) -export interface InputTestArtifacts { - additionalUrls?: Array; - configUrl?: FileUrl; - inputArtifactsZipFileurl?: FileUrl; - testScriptUrl?: FileUrl; - userPropUrl?: FileUrl; -} - -// @public (undocumented) -export interface InputTestArtifactsOutput { - additionalUrls?: Array; - configUrl?: FileUrlOutput; - inputArtifactsZipFileurl?: FileUrlOutput; - testScriptUrl?: FileUrlOutput; - userPropUrl?: FileUrlOutput; -} - -// @public (undocumented) -export function isUnexpected(response: AppComponentCreateOrUpdateAppComponents200Response | AppComponentCreateOrUpdateAppComponents201Response | AppComponentCreateOrUpdateAppComponentsdefaultResponse): response is AppComponentCreateOrUpdateAppComponentsdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: AppComponentDeleteAppComponents204Response | AppComponentDeleteAppComponentsdefaultResponse): response is AppComponentDeleteAppComponentsdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: AppComponentGetAppComponentByName200Response | AppComponentGetAppComponentByNamedefaultResponse): response is AppComponentGetAppComponentByNamedefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: AppComponentGetAppComponent200Response | AppComponentGetAppComponentdefaultResponse): response is AppComponentGetAppComponentdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: ServerMetricsCreateOrUpdateServerMetricsConfig200Response | ServerMetricsCreateOrUpdateServerMetricsConfig201Response | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse): response is ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: ServerMetricsGetServerMetricsConfigByName200Response | ServerMetricsGetServerMetricsConfigByNamedefaultResponse): response is ServerMetricsGetServerMetricsConfigByNamedefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: ServerMetricsDeleteServerMetricsConfig204Response | ServerMetricsDeleteServerMetricsConfigdefaultResponse): response is ServerMetricsDeleteServerMetricsConfigdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: ServerMetricsGetServerMetricsConfig200Response | ServerMetricsGetServerMetricsConfigdefaultResponse): response is ServerMetricsGetServerMetricsConfigdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: ServerMetricsGetServerDefaultMetricsConfig200Response | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse): response is ServerMetricsGetServerDefaultMetricsConfigdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: ServerMetricsListSupportedResourceTypes200Response | ServerMetricsListSupportedResourceTypesdefaultResponse): response is ServerMetricsListSupportedResourceTypesdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestCreateOrUpdateTest200Response | TestCreateOrUpdateTest201Response | TestCreateOrUpdateTestdefaultResponse): response is TestCreateOrUpdateTestdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestDeleteLoadTest204Response | TestDeleteLoadTestdefaultResponse): response is TestDeleteLoadTestdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestGetLoadTest200Response | TestGetLoadTestdefaultResponse): response is TestGetLoadTestdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestListLoadTestSearch200Response | TestListLoadTestSearchdefaultResponse): response is TestListLoadTestSearchdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestUploadTestFile201Response | TestUploadTestFiledefaultResponse): response is TestUploadTestFiledefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestGetTestFile200Response | TestGetTestFiledefaultResponse): response is TestGetTestFiledefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestDeleteTestFile204Response | TestDeleteTestFiledefaultResponse): response is TestDeleteTestFiledefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestListTestFiles200Response | TestListTestFilesdefaultResponse): response is TestListTestFilesdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestRunDeleteTestRun204Response | TestRunDeleteTestRundefaultResponse): response is TestRunDeleteTestRundefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestRunCreateOrUpdateTestRun200Response | TestRunCreateOrUpdateTestRundefaultResponse): response is TestRunCreateOrUpdateTestRundefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestRunGetTestRun200Response | TestRunGetTestRundefaultResponse): response is TestRunGetTestRundefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestRunGetTestRunFile200Response | TestRunGetTestRunFiledefaultResponse): response is TestRunGetTestRunFiledefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestRunListTestRuns200Response | TestRunListTestRunsdefaultResponse): response is TestRunListTestRunsdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestRunStopTestRun200Response | TestRunStopTestRundefaultResponse): response is TestRunStopTestRundefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestRunGetTestRunClientMetrics200Response | TestRunGetTestRunClientMetricsdefaultResponse): response is TestRunGetTestRunClientMetricsdefaultResponse; - -// @public (undocumented) -export function isUnexpected(response: TestRunGetTestRunClientMetricsFilters200Response | TestRunGetTestRunClientMetricsFiltersdefaultResponse): response is TestRunGetTestRunClientMetricsFiltersdefaultResponse; - -// @public (undocumented) -export interface LoadTestConfig { - engineInstances?: number; - splitAllCSVs?: boolean; -} - -// @public (undocumented) -export interface LoadTestConfigOutput { - engineInstances?: number; - splitAllCSVs?: boolean; -} - -// @public (undocumented) -export interface LocalizedNameOutput { - // (undocumented) - localizedValue?: string; - // (undocumented) - value?: string; -} - -// @public (undocumented) -export interface OutputTestArtifacts { - logsUrl?: FileUrl; - resultUrl?: FileUrl; -} - -// @public (undocumented) -export interface OutputTestArtifactsOutput { - logsUrl?: FileUrlOutput; - resultUrl?: FileUrlOutput; -} - -// @public -export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; - -// @public -export type PaginateReturn = TResult extends { - body: { - value?: infer TPage; - }; -} ? GetArrayType : Array; - -// @public -export interface PagingOptions { - customGetPage?: GetPage[]>; -} - -// @public (undocumented) -export interface PassFailCriteria { - passFailMetrics?: Record; -} - -// @public (undocumented) -export interface PassFailCriteriaOutput { - passFailMetrics?: Record; -} - -// @public (undocumented) -export interface PassFailMetric { - action?: string; - actualValue?: number; - aggregate?: string; - clientmetric?: string; - condition?: string; - requestName?: string; - result?: string; - value?: number; -} - -// @public (undocumented) -export interface PassFailMetricOutput { - action?: string; - actualValue?: number; - aggregate?: string; - clientmetric?: string; - condition?: string; - requestName?: string; - result?: string; - value?: number; -} - -// @public (undocumented) -export interface ResourceMetricModel { - aggregation: string; - displayDescription?: string; - id?: string; - metricnamespace: string; - name: ServerMetricName; - resourceId: string; - resourceType: string; - unit?: string; -} - -// @public (undocumented) -export interface ResourceMetricModelOutput { - aggregation: string; - displayDescription?: string; - id?: string; - metricnamespace: string; - name: ServerMetricNameOutput; - resourceId: string; - resourceType: string; - unit?: string; -} - -// @public (undocumented) -export interface Routes { - (path: "/appcomponents/{name}", name: string): AppComponentCreateOrUpdateAppComponents; - (path: "/appcomponents"): AppComponentGetAppComponent; - (path: "/serverMetricsConfig/{name}", name: string): ServerMetricsCreateOrUpdateServerMetricsConfig; - (path: "/serverMetricsConfig"): ServerMetricsGetServerMetricsConfig; - (path: "/serverMetricsConfig/default"): ServerMetricsGetServerDefaultMetricsConfig; - (path: "/serverMetricsConfig/supportedResourceTypes"): ServerMetricsListSupportedResourceTypes; - (path: "/loadtests/{testId}", testId: string): TestCreateOrUpdateTest; - (path: "/loadtests/sortAndFilter"): TestListLoadTestSearch; - (path: "/loadtests/{testId}/files/{fileId}", testId: string, fileId: string): TestUploadTestFile; - (path: "/loadtests/{testId}/files", testId: string): TestListTestFiles; - (path: "/testruns/{testRunId}", testRunId: string): TestRunDeleteTestRun; - (path: "/testruns/{testRunId}/files/{fileId}", testRunId: string, fileId: string): TestRunGetTestRunFile; - (path: "/testruns/sortAndFilter"): TestRunListTestRuns; - (path: "/testruns/{testRunId}:stop", testRunId: string): TestRunStopTestRun; - (path: "/testruns/{testRunId}/clientMetrics", testRunId: string): TestRunGetTestRunClientMetrics; - (path: "/testruns/{testRunId}/clientMetricsFilters", testRunId: string): TestRunGetTestRunClientMetricsFilters; -} - -// @public (undocumented) -export interface SecretMetadata { - type?: string; - value?: string; -} - -// @public (undocumented) -export interface SecretMetadataOutput { - type?: string; - value?: string; -} - -// @public (undocumented) -export interface SeriesOutput { - activeUsers?: Record>; - errors?: Record>; - responseTime?: Record>; - throughput?: Record>; -} - -// @public (undocumented) -export interface ServerMetricName { - localizedValue: string; - value: string; -} - -// @public (undocumented) -export interface ServerMetricNameOutput { - localizedValue: string; - value: string; -} - -// @public (undocumented) -export interface ServerMetricsCreateOrUpdateServerMetricsConfig { - delete(options?: ServerMetricsDeleteServerMetricsConfigParameters): StreamableMethod; - get(options?: ServerMetricsGetServerMetricsConfigByNameParameters): StreamableMethod; - patch(options: ServerMetricsCreateOrUpdateServerMetricsConfigParameters): StreamableMethod; -} - -// @public -export interface ServerMetricsCreateOrUpdateServerMetricsConfig200Response extends HttpResponse { - // (undocumented) - body: ServerMetricsModelOutput; - // (undocumented) - status: "200"; -} - -// @public -export interface ServerMetricsCreateOrUpdateServerMetricsConfig201Response extends HttpResponse { - // (undocumented) - body: ServerMetricsModelOutput; - // (undocumented) - status: "201"; -} - -// @public (undocumented) -export interface ServerMetricsCreateOrUpdateServerMetricsConfigBodyParam { - body: ServerMetricsModel; -} - -// @public (undocumented) -export interface ServerMetricsCreateOrUpdateServerMetricsConfigdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & ServerMetricsCreateOrUpdateServerMetricsConfigdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export interface ServerMetricsCreateOrUpdateServerMetricsConfigMediaTypesParam { - contentType?: "application/merge-patch+json"; -} - -// @public (undocumented) -export type ServerMetricsCreateOrUpdateServerMetricsConfigParameters = ServerMetricsCreateOrUpdateServerMetricsConfigMediaTypesParam & ServerMetricsCreateOrUpdateServerMetricsConfigBodyParam & RequestParameters; - -// @public -export interface ServerMetricsDeleteServerMetricsConfig204Response extends HttpResponse { - // (undocumented) - body: Record; - // (undocumented) - status: "204"; -} - -// @public (undocumented) -export interface ServerMetricsDeleteServerMetricsConfigdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface ServerMetricsDeleteServerMetricsConfigdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & ServerMetricsDeleteServerMetricsConfigdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type ServerMetricsDeleteServerMetricsConfigParameters = RequestParameters; - -// @public (undocumented) -export interface ServerMetricsGetServerDefaultMetricsConfig { - get(options?: ServerMetricsGetServerDefaultMetricsConfigParameters): StreamableMethod; -} - -// @public -export interface ServerMetricsGetServerDefaultMetricsConfig200Response extends HttpResponse { - // (undocumented) - body: DefaultServerMetricsConfigListModelOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface ServerMetricsGetServerDefaultMetricsConfigdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface ServerMetricsGetServerDefaultMetricsConfigdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & ServerMetricsGetServerDefaultMetricsConfigdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type ServerMetricsGetServerDefaultMetricsConfigParameters = RequestParameters; - -// @public (undocumented) -export interface ServerMetricsGetServerMetricsConfig { - get(options?: ServerMetricsGetServerMetricsConfigParameters): StreamableMethod; -} - -// @public -export interface ServerMetricsGetServerMetricsConfig200Response extends HttpResponse { - // (undocumented) - body: ServerMetricsModelOutput; - // (undocumented) - status: "200"; -} - -// @public -export interface ServerMetricsGetServerMetricsConfigByName200Response extends HttpResponse { - // (undocumented) - body: ServerMetricsModelOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface ServerMetricsGetServerMetricsConfigByNamedefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface ServerMetricsGetServerMetricsConfigByNamedefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & ServerMetricsGetServerMetricsConfigByNamedefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type ServerMetricsGetServerMetricsConfigByNameParameters = RequestParameters; - -// @public (undocumented) -export interface ServerMetricsGetServerMetricsConfigdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface ServerMetricsGetServerMetricsConfigdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & ServerMetricsGetServerMetricsConfigdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type ServerMetricsGetServerMetricsConfigParameters = ServerMetricsGetServerMetricsConfigQueryParam & RequestParameters; - -// @public (undocumented) -export interface ServerMetricsGetServerMetricsConfigQueryParam { - // (undocumented) - queryParameters?: ServerMetricsGetServerMetricsConfigQueryParamProperties; -} - -// @public (undocumented) -export interface ServerMetricsGetServerMetricsConfigQueryParamProperties { - testId?: string; - testRunId?: string; -} - -// @public (undocumented) -export interface ServerMetricsListSupportedResourceTypes { - get(options?: ServerMetricsListSupportedResourceTypesParameters): StreamableMethod; -} - -// @public -export interface ServerMetricsListSupportedResourceTypes200Response extends HttpResponse { - // (undocumented) - body: SupportedResourceTypeOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface ServerMetricsListSupportedResourceTypesdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface ServerMetricsListSupportedResourceTypesdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & ServerMetricsListSupportedResourceTypesdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type ServerMetricsListSupportedResourceTypesParameters = RequestParameters; - -// @public (undocumented) -export interface ServerMetricsModel { - metrics?: Record; - name?: string; - testId?: string; - testRunId?: string; -} - -// @public (undocumented) -export interface ServerMetricsModelOutput { - metrics?: Record; - name?: string; - testId?: string; - testRunId?: string; -} - -// @public (undocumented) -export interface SupportedResourceTypeOutput { - // (undocumented) - value?: Array; -} - -// @public (undocumented) -export interface TestArtifacts { - inputArtifacts: InputTestArtifacts; - outputArtifacts?: OutputTestArtifacts; -} - -// @public (undocumented) -export interface TestArtifactsOutput { - inputArtifacts: InputTestArtifactsOutput; - outputArtifacts?: OutputTestArtifactsOutput; -} - -// @public (undocumented) -export interface TestCreateOrUpdateTest { - delete(options?: TestDeleteLoadTestParameters): StreamableMethod; - get(options?: TestGetLoadTestParameters): StreamableMethod; - patch(options: TestCreateOrUpdateTestParameters): StreamableMethod; -} - -// @public -export interface TestCreateOrUpdateTest200Response extends HttpResponse { - // (undocumented) - body: TestModelOutput; - // (undocumented) - status: "200"; -} - -// @public -export interface TestCreateOrUpdateTest201Response extends HttpResponse { - // (undocumented) - body: TestModelOutput; - // (undocumented) - status: "201"; -} - -// @public (undocumented) -export interface TestCreateOrUpdateTestBodyParam { - body: TestModel; -} - -// @public (undocumented) -export interface TestCreateOrUpdateTestdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestCreateOrUpdateTestdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestCreateOrUpdateTestdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export interface TestCreateOrUpdateTestMediaTypesParam { - contentType?: "application/merge-patch+json"; -} - -// @public (undocumented) -export type TestCreateOrUpdateTestParameters = TestCreateOrUpdateTestMediaTypesParam & TestCreateOrUpdateTestBodyParam & RequestParameters; - -// @public -export interface TestDeleteLoadTest204Response extends HttpResponse { - // (undocumented) - body: Record; - // (undocumented) - status: "204"; -} - -// @public (undocumented) -export interface TestDeleteLoadTestdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestDeleteLoadTestdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestDeleteLoadTestdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestDeleteLoadTestParameters = RequestParameters; - -// @public -export interface TestDeleteTestFile204Response extends HttpResponse { - // (undocumented) - body: Record; - // (undocumented) - status: "204"; -} - -// @public (undocumented) -export interface TestDeleteTestFiledefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestDeleteTestFiledefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestDeleteTestFiledefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestDeleteTestFileParameters = RequestParameters; - -// @public -export interface TestGetLoadTest200Response extends HttpResponse { - // (undocumented) - body: TestModelOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestGetLoadTestdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestGetLoadTestdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestGetLoadTestdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestGetLoadTestParameters = RequestParameters; - -// @public -export interface TestGetTestFile200Response extends HttpResponse { - // (undocumented) - body: FileUrlOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestGetTestFiledefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestGetTestFiledefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestGetTestFiledefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestGetTestFileParameters = RequestParameters; - -// @public (undocumented) -export interface TestListLoadTestSearch { - get(options?: TestListLoadTestSearchParameters): StreamableMethod; -} - -// @public -export interface TestListLoadTestSearch200Response extends HttpResponse { - // (undocumented) - body: TestModelResourceListOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestListLoadTestSearchdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestListLoadTestSearchdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestListLoadTestSearchdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestListLoadTestSearchParameters = TestListLoadTestSearchQueryParam & RequestParameters; - -// @public (undocumented) -export interface TestListLoadTestSearchQueryParam { - // (undocumented) - queryParameters?: TestListLoadTestSearchQueryParamProperties; -} - -// @public (undocumented) -export interface TestListLoadTestSearchQueryParamProperties { - continuationToken?: string; - lastUpdatedEndTime?: Date | string; - lastUpdatedStartTime?: Date | string; - maxPageSize?: number; - orderBy?: string; - search?: string; -} - -// @public (undocumented) -export interface TestListTestFiles { - get(options?: TestListTestFilesParameters): StreamableMethod; -} - -// @public -export interface TestListTestFiles200Response extends HttpResponse { - // (undocumented) - body: FileUrlListOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestListTestFilesdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestListTestFilesdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestListTestFilesdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestListTestFilesParameters = TestListTestFilesQueryParam & RequestParameters; - -// @public (undocumented) -export interface TestListTestFilesQueryParam { - // (undocumented) - queryParameters?: TestListTestFilesQueryParamProperties; -} - -// @public (undocumented) -export interface TestListTestFilesQueryParamProperties { - continuationToken?: string; -} - -// @public (undocumented) -export interface TestModel { - createdBy?: string; - createdDateTime?: Date | string; - description?: string; - displayName?: string; - environmentVariables?: Record; - inputArtifacts?: InputTestArtifacts; - keyvaultReferenceIdentityId?: string; - keyvaultReferenceIdentityType?: string; - lastModifiedBy?: string; - lastModifiedDateTime?: Date | string; - loadTestConfig?: LoadTestConfig; - passFailCriteria?: PassFailCriteria; - resourceId?: string; - secrets?: Record; - subnetId?: string; - testId?: string; -} - -// @public (undocumented) -export interface TestModelOutput { - createdBy?: string; - createdDateTime?: string; - description?: string; - displayName?: string; - environmentVariables?: Record; - inputArtifacts?: InputTestArtifactsOutput; - keyvaultReferenceIdentityId?: string; - keyvaultReferenceIdentityType?: string; - lastModifiedBy?: string; - lastModifiedDateTime?: string; - loadTestConfig?: LoadTestConfigOutput; - passFailCriteria?: PassFailCriteriaOutput; - resourceId?: string; - secrets?: Record; - subnetId?: string; - testId?: string; -} - -// @public (undocumented) -export interface TestModelResourceListOutput { - nextLink?: string; - value: Array; -} - -// @public -export interface TestRunCreateOrUpdateTestRun200Response extends HttpResponse { - // (undocumented) - body: TestRunModelOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestRunCreateOrUpdateTestRunBodyParam { - body: TestRunModel; -} - -// @public (undocumented) -export interface TestRunCreateOrUpdateTestRundefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunCreateOrUpdateTestRundefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunCreateOrUpdateTestRundefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export interface TestRunCreateOrUpdateTestRunMediaTypesParam { - contentType?: "application/merge-patch+json"; -} - -// @public (undocumented) -export type TestRunCreateOrUpdateTestRunParameters = TestRunCreateOrUpdateTestRunQueryParam & TestRunCreateOrUpdateTestRunMediaTypesParam & TestRunCreateOrUpdateTestRunBodyParam & RequestParameters; - -// @public (undocumented) -export interface TestRunCreateOrUpdateTestRunQueryParam { - // (undocumented) - queryParameters?: TestRunCreateOrUpdateTestRunQueryParamProperties; -} - -// @public (undocumented) -export interface TestRunCreateOrUpdateTestRunQueryParamProperties { - oldTestRunId?: string; -} - -// @public (undocumented) -export interface TestRunDeleteTestRun { - delete(options?: TestRunDeleteTestRunParameters): StreamableMethod; - get(options?: TestRunGetTestRunParameters): StreamableMethod; - patch(options: TestRunCreateOrUpdateTestRunParameters): StreamableMethod; -} - -// @public -export interface TestRunDeleteTestRun204Response extends HttpResponse { - // (undocumented) - body: Record; - // (undocumented) - status: "204"; -} - -// @public (undocumented) -export interface TestRunDeleteTestRundefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunDeleteTestRundefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunDeleteTestRundefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestRunDeleteTestRunParameters = RequestParameters; - -// @public -export interface TestRunGetTestRun200Response extends HttpResponse { - // (undocumented) - body: TestRunModelOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestRunGetTestRunClientMetrics { - post(options: TestRunGetTestRunClientMetricsParameters): StreamableMethod; -} - -// @public -export interface TestRunGetTestRunClientMetrics200Response extends HttpResponse { - // (undocumented) - body: ClientMetricsResultsOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestRunGetTestRunClientMetricsBodyParam { - body: ClientMetricsRequestModel; -} - -// @public (undocumented) -export interface TestRunGetTestRunClientMetricsdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunGetTestRunClientMetricsdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunGetTestRunClientMetricsdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export interface TestRunGetTestRunClientMetricsFilters { - get(options?: TestRunGetTestRunClientMetricsFiltersParameters): StreamableMethod; -} - -// @public -export interface TestRunGetTestRunClientMetricsFilters200Response extends HttpResponse { - // (undocumented) - body: ClientMetricsFiltersOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestRunGetTestRunClientMetricsFiltersdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunGetTestRunClientMetricsFiltersdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunGetTestRunClientMetricsFiltersdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestRunGetTestRunClientMetricsFiltersParameters = RequestParameters; - -// @public (undocumented) -export interface TestRunGetTestRunClientMetricsMediaTypesParam { - contentType?: "application/json"; -} - -// @public (undocumented) -export type TestRunGetTestRunClientMetricsParameters = TestRunGetTestRunClientMetricsMediaTypesParam & TestRunGetTestRunClientMetricsBodyParam & RequestParameters; - -// @public (undocumented) -export interface TestRunGetTestRundefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunGetTestRundefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunGetTestRundefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export interface TestRunGetTestRunFile { - get(options?: TestRunGetTestRunFileParameters): StreamableMethod; -} - -// @public -export interface TestRunGetTestRunFile200Response extends HttpResponse { - // (undocumented) - body: FileUrlOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestRunGetTestRunFiledefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunGetTestRunFiledefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunGetTestRunFiledefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestRunGetTestRunFileParameters = RequestParameters; - -// @public (undocumented) -export type TestRunGetTestRunParameters = RequestParameters; - -// @public (undocumented) -export interface TestRunListTestRuns { - get(options?: TestRunListTestRunsParameters): StreamableMethod; -} - -// @public -export interface TestRunListTestRuns200Response extends HttpResponse { - // (undocumented) - body: TestRunModelResourceListOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestRunListTestRunsdefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunListTestRunsdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunListTestRunsdefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestRunListTestRunsParameters = TestRunListTestRunsQueryParam & RequestParameters; - -// @public (undocumented) -export interface TestRunListTestRunsQueryParam { - // (undocumented) - queryParameters?: TestRunListTestRunsQueryParamProperties; -} - -// @public (undocumented) -export interface TestRunListTestRunsQueryParamProperties { - continuationToken?: string; - executionFrom?: Date | string; - executionTo?: Date | string; - maxPageSize?: number; - orderBy?: string; - search?: string; - status?: string; - testId?: string; -} - -// @public (undocumented) -export interface TestRunModel { - createdBy?: string; - createdDateTime?: Date | string; - description?: string; - displayName?: string; - duration?: number; - endDateTime?: Date | string; - environmentVariables?: Record; - executedDateTime?: Date | string; - lastModifiedBy?: string; - lastModifiedDateTime?: Date | string; - loadTestConfig?: LoadTestConfig; - passFailCriteria?: PassFailCriteria; - portalUrl?: string; - resourceId?: string; - secrets?: Record; - startDateTime?: Date | string; - status?: string; - subnetId?: string; - // (undocumented) - testArtifacts?: TestArtifacts; - testId?: string; - testResult?: string; - testRunId?: string; - testRunStatistics?: Record; - vusers?: number; -} - -// @public (undocumented) -export interface TestRunModelOutput { - createdBy?: string; - createdDateTime?: string; - description?: string; - displayName?: string; - duration?: number; - endDateTime?: string; - environmentVariables?: Record; - executedDateTime?: string; - lastModifiedBy?: string; - lastModifiedDateTime?: string; - loadTestConfig?: LoadTestConfigOutput; - passFailCriteria?: PassFailCriteriaOutput; - portalUrl?: string; - resourceId?: string; - secrets?: Record; - startDateTime?: string; - status?: string; - subnetId?: string; - // (undocumented) - testArtifacts?: TestArtifactsOutput; - testId?: string; - testResult?: string; - testRunId?: string; - testRunStatistics?: Record; - vusers?: number; -} - -// @public (undocumented) -export interface TestRunModelResourceListOutput { - nextLink?: string; - value: Array; -} - -// @public (undocumented) -export interface TestRunStatisticsModel { - errorCount?: number; - errorPct?: number; - maxResTime?: number; - meanResTime?: number; - medianResTime?: number; - minResTime?: number; - pct1ResTime?: number; - pct2ResTime?: number; - pct3ResTime?: number; - receivedKBytesPerSec?: number; - sampleCount?: number; - sentKBytesPerSec?: number; - throughput?: number; - transaction?: string; -} - -// @public (undocumented) -export interface TestRunStatisticsModelOutput { - errorCount?: number; - errorPct?: number; - maxResTime?: number; - meanResTime?: number; - medianResTime?: number; - minResTime?: number; - pct1ResTime?: number; - pct2ResTime?: number; - pct3ResTime?: number; - receivedKBytesPerSec?: number; - sampleCount?: number; - sentKBytesPerSec?: number; - throughput?: number; - transaction?: string; -} - -// @public (undocumented) -export interface TestRunStopTestRun { - post(options?: TestRunStopTestRunParameters): StreamableMethod; -} - -// @public -export interface TestRunStopTestRun200Response extends HttpResponse { - // (undocumented) - body: TestRunModelOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestRunStopTestRundefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunStopTestRundefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunStopTestRundefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestRunStopTestRunParameters = RequestParameters; - -// @public (undocumented) -export interface TestUploadTestFile { - delete(options?: TestDeleteTestFileParameters): StreamableMethod; - get(options?: TestGetTestFileParameters): StreamableMethod; - put(options: TestUploadTestFileParameters): StreamableMethod; -} - -// @public -export interface TestUploadTestFile201Response extends HttpResponse { - // (undocumented) - body: FileUrlOutput; - // (undocumented) - status: "201"; -} - -// @public (undocumented) -export interface TestUploadTestFileBodyParam { - // (undocumented) - body: TestUploadTestFileFormBody; -} - -// @public (undocumented) -export interface TestUploadTestFiledefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestUploadTestFiledefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestUploadTestFiledefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export interface TestUploadTestFileFormBody { - file: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; -} - -// @public (undocumented) -export interface TestUploadTestFileMediaTypesParam { - contentType?: "multipart/form-data"; -} - -// @public (undocumented) -export type TestUploadTestFileParameters = TestUploadTestFileQueryParam & TestUploadTestFileMediaTypesParam & TestUploadTestFileBodyParam & RequestParameters; - -// @public (undocumented) -export interface TestUploadTestFileQueryParam { - // (undocumented) - queryParameters?: TestUploadTestFileQueryParamProperties; -} - -// @public (undocumented) -export interface TestUploadTestFileQueryParamProperties { - fileType?: number; -} - -// @public (undocumented) -export interface TimeRangeOutput { - endTime?: string; - startTime?: string; -} - -// @public (undocumented) -export interface TimeSeriesOutput { - timestamp?: string; - value?: number; -} - -// (No @packageDocumentation comment for this package) - -``` diff --git a/sdk/loadtestservice/load-testing-rest/sample.env b/sdk/loadtestservice/load-testing-rest/sample.env index cfc174799c17..672847a3fea0 100644 --- a/sdk/loadtestservice/load-testing-rest/sample.env +++ b/sdk/loadtestservice/load-testing-rest/sample.env @@ -1,8 +1,4 @@ # App registration secret for AAD authentication -AZURE_CLIENT_ID= AZURE_CLIENT_SECRET= -AZURE_TENANT_ID= - -LOADTESTSERVICE_ENDPOINT= -SUBSCRIPTION_ID= -RESOURCE_GROUP= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.jmx b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.jmx deleted file mode 100644 index a8d909ef60fa..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.jmx +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - false - false - - - - - - - - continue - - false - 10 - - 50 - 2 - 1515063650000 - 1515063650000 - false - 60 - - true - - - - - - - microsoft.com - - - - / - GET - true - false - true - false - - - - - - - - false - - saveConfig - - - true - true - true - - true - true - true - true - false - true - true - false - false - false - true - false - false - false - true - 0 - true - true - true - true - true - true - - - - - - - - diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts deleted file mode 100644 index b321e3553f31..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { createReadStream } from "fs"; -import { v4 as uuidv4 } from "uuid"; - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - const testId = uuidv4(); // ID to be assigned to a test - const fileId = uuidv4(); // ID to be assigned to the file being uploaded - const testRunId = uuidv4(); // ID to be assigned to a testRun - const appComponentId = uuidv4(); // ID of the app components - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/loadtests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfig: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/loadtests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) - .put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - // Creating app component - const appComponentCreationResult = await client - .path("/appcomponents/{name}", appComponentId) - .patch({ - contentType: "application/merge-patch+json", - body: { - name: "app_component", - testId: testCreationResult.body.testId, - value: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } - - // Creating the test run - const testRunCreationResult = await client.path("/testruns/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - displayName: displayName, - vusers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - // Checking the test run status and printing metrics - var testStatus = null; - var getTestRunResult = null; - const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); - - //wait for terminal state - while ( - testStatus == null || - (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/testruns/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; - - //Check test status after every 5 seconds - sleep(5000); - } - - console.log(getTestRunResult); -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md deleted file mode 100644 index 9cf55039e9c3..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -page_type: sample -languages: - - javascript -products: - - azure -urlFragment: load-testing-javascript-beta ---- - -# Azure Load Testing rest client library samples for JavaScript (Beta) - -These sample programs show how to use the JavaScript client libraries for Azure Load Testing rest in some common scenarios. - -| **File Name** | **Description** | -| ------------------- | -------------------------- | -| [sample.js][sample] | creates and run a loadtest | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: - -- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node sample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node sample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing -[freesub]: https://azure.microsoft.com/free/ -[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json deleted file mode 100644 index 29a6ea7e4985..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@azure-samples/load-testing-js-beta", - "private": true, - "version": "1.0.0", - "description": "Azure Load Testing rest client library samples for JavaScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/loadtestservice/load-testing-rest" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", - "dependencies": { - "@azure-rest/load-testing": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1", - "uuid": "^9.0.0" - } -} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env deleted file mode 100644 index cfc174799c17..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env +++ /dev/null @@ -1,8 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_ID= -AZURE_CLIENT_SECRET= -AZURE_TENANT_ID= - -LOADTESTSERVICE_ENDPOINT= -SUBSCRIPTION_ID= -RESOURCE_GROUP= diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js deleted file mode 100644 index 96270ce7d6ed..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - */ - -const AzureLoadTesting = require("@azure-rest/load-testing").default, - { isUnexpected } = require("@azure-rest/load-testing"); -const { DefaultAzureCredential } = require("@azure/identity"); -const { createReadStream } = require("fs"); -const { v4: uuidv4 } = require("uuid"); - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - const testId = uuidv4(); // ID to be assigned to a test - const fileId = uuidv4(); // ID to be assigned to the file being uploaded - const testRunId = uuidv4(); // ID to be assigned to a testRun - const appComponentId = uuidv4(); // ID of the app components - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/loadtests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfig: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/loadtests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) - .put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - // Creating app component - const appComponentCreationResult = await client - .path("/appcomponents/{name}", appComponentId) - .patch({ - contentType: "application/merge-patch+json", - body: { - name: "app_component", - testId: testCreationResult.body.testId, - value: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": - { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } - - // Creating the test run - const testRunCreationResult = await client.path("/testruns/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - displayName: displayName, - vusers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - // Checking the test run status and printing metrics - var testStatus = null; - var getTestRunResult = null; - const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); - - //wait for terminal state - while ( - testStatus == null || - (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/testruns/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; - - //Check test status after every 5 seconds - sleep(5000); - } - - console.log(getTestRunResult); -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md deleted file mode 100644 index df5c287ac2a4..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md +++ /dev/null @@ -1,75 +0,0 @@ ---- -page_type: sample -languages: - - typescript -products: - - azure -urlFragment: load-testing-typescript-beta ---- - -# Azure Load Testing rest client library samples for TypeScript (Beta) - -These sample programs show how to use the TypeScript client libraries for Azure Load Testing rest in some common scenarios. - -| **File Name** | **Description** | -| ------------------- | -------------------------- | -| [sample.ts][sample] | creates and run a loadtest | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: - -- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/sample.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node dist/sample.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing -[freesub]: https://azure.microsoft.com/free/ -[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json deleted file mode 100644 index e32c8bc07e23..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@azure-samples/load-testing-ts-beta", - "private": true, - "version": "1.0.0", - "description": "Azure Load Testing rest client library samples for TypeScript (Beta)", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/loadtestservice/load-testing-rest" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", - "dependencies": { - "@azure-rest/load-testing": "next", - "dotenv": "latest", - "@azure/identity": "^2.0.1", - "uuid": "^9.0.0" - }, - "devDependencies": { - "@types/uuid": "8.3.4", - "@types/node": "^14.0.0", - "typescript": "~4.8.0", - "rimraf": "latest" - } -} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env deleted file mode 100644 index cfc174799c17..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env +++ /dev/null @@ -1,8 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_ID= -AZURE_CLIENT_SECRET= -AZURE_TENANT_ID= - -LOADTESTSERVICE_ENDPOINT= -SUBSCRIPTION_ID= -RESOURCE_GROUP= diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts deleted file mode 100644 index d295aaf2a6a0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import {createReadStream} from "fs"; -import { v4 as uuidv4 } from "uuid"; - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - const testId = uuidv4(); // ID to be assigned to a test - const fileId = uuidv4(); // ID to be assigned to the file being uploaded - const testRunId = uuidv4(); // ID to be assigned to a testRun - const appComponentId = uuidv4(); // ID of the app components - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/loadtests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfig: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/loadtests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) - .put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - // Creating app component - const appComponentCreationResult = await client - .path("/appcomponents/{name}", appComponentId) - .patch({ - contentType: "application/merge-patch+json", - body: { - name: "app_component", - testId: testCreationResult.body.testId, - value: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } - - // Creating the test run - const testRunCreationResult = await client.path("/testruns/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - displayName: displayName, - vusers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - // Checking the test run status and printing metrics - var testStatus = null; - var getTestRunResult = null; - const sleep = (ms: number) => new Promise(r => setTimeout(r, ms)); - - //wait for terminal state - while ( - testStatus == null || - (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/testruns/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; - - //Check test status after every 5 seconds - sleep(5000); - } - - console.log(getTestRunResult); -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts b/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts index beaa251ce080..fcfa0fd49e85 100644 --- a/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts +++ b/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts @@ -11,15 +11,15 @@ export default function createClient( options: ClientOptions = {} ): AzureLoadTestingClient { const baseUrl = options.baseUrl ?? `https://${Endpoint}`; - options.apiVersion = options.apiVersion ?? "2022-06-01-preview"; + options.apiVersion = options.apiVersion ?? "2022-11-01"; options = { ...options, credentials: { - scopes: ["https://cnt-prod.loadtesting.azure.com/.default"], - }, + scopes: ["https://cnt-prod.loadtesting.azure.com/.default"] + } }; - const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0-beta.1`; + const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` @@ -27,11 +27,15 @@ export default function createClient( options = { ...options, userAgentOptions: { - userAgentPrefix, - }, + userAgentPrefix + } }; - const client = getClient(baseUrl, credentials, options) as AzureLoadTestingClient; + const client = getClient( + baseUrl, + credentials, + options + ) as AzureLoadTestingClient; return client; } diff --git a/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts b/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts index 74a099a00f3a..2bcba986990a 100644 --- a/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts +++ b/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts @@ -2,327 +2,366 @@ // Licensed under the MIT license. import { - AppComponentCreateOrUpdateAppComponentsParameters, - AppComponentDeleteAppComponentsParameters, - AppComponentGetAppComponentByNameParameters, - AppComponentGetAppComponentParameters, - ServerMetricsCreateOrUpdateServerMetricsConfigParameters, - ServerMetricsGetServerMetricsConfigByNameParameters, - ServerMetricsDeleteServerMetricsConfigParameters, - ServerMetricsGetServerMetricsConfigParameters, - ServerMetricsGetServerDefaultMetricsConfigParameters, - ServerMetricsListSupportedResourceTypesParameters, - TestCreateOrUpdateTestParameters, - TestDeleteLoadTestParameters, - TestGetLoadTestParameters, - TestListLoadTestSearchParameters, - TestUploadTestFileParameters, - TestGetTestFileParameters, - TestDeleteTestFileParameters, - TestListTestFilesParameters, - TestRunDeleteTestRunParameters, - TestRunCreateOrUpdateTestRunParameters, - TestRunGetTestRunParameters, - TestRunGetTestRunFileParameters, - TestRunListTestRunsParameters, - TestRunStopTestRunParameters, - TestRunGetTestRunClientMetricsParameters, - TestRunGetTestRunClientMetricsFiltersParameters, + LoadTestAdministrationCreateOrUpdateTestParameters, + LoadTestAdministrationDeleteTestParameters, + LoadTestAdministrationGetTestParameters, + LoadTestAdministrationListTestsParameters, + LoadTestAdministrationUploadFileParameters, + LoadTestAdministrationGetFileParameters, + LoadTestAdministrationDeleteFileParameters, + LoadTestAdministrationListFilesTestParameters, + LoadTestAdministrationCreateOrUpdateAppComponentTestParameters, + LoadTestAdministrationGetAppComponentsTestParameters, + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters, + LoadTestAdministrationGetServerMetricsConfigTestParameters, + TestRunDeleteParameters, + TestRunCreateOrUpdateParameters, + TestRunGetParameters, + TestRunGetFileParameters, + TestRunListParameters, + TestRunStopParameters, + TestRunListMetricNamespacesParameters, + TestRunListMetricDefinitionsParameters, + TestRunGetMetricsParameters, + TestRunCreateOrUpdateAppComponentParameters, + TestRunGetAppComponentsParameters, + TestRunCreateOrUpdateServerMetricsConfigParameters, + TestRunGetServerMetricsConfigParameters } from "./parameters"; import { - AppComponentCreateOrUpdateAppComponents200Response, - AppComponentCreateOrUpdateAppComponents201Response, - AppComponentCreateOrUpdateAppComponentsdefaultResponse, - AppComponentDeleteAppComponents204Response, - AppComponentDeleteAppComponentsdefaultResponse, - AppComponentGetAppComponentByName200Response, - AppComponentGetAppComponentByNamedefaultResponse, - AppComponentGetAppComponent200Response, - AppComponentGetAppComponentdefaultResponse, - ServerMetricsCreateOrUpdateServerMetricsConfig200Response, - ServerMetricsCreateOrUpdateServerMetricsConfig201Response, - ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse, - ServerMetricsGetServerMetricsConfigByName200Response, - ServerMetricsGetServerMetricsConfigByNamedefaultResponse, - ServerMetricsDeleteServerMetricsConfig204Response, - ServerMetricsDeleteServerMetricsConfigdefaultResponse, - ServerMetricsGetServerMetricsConfig200Response, - ServerMetricsGetServerMetricsConfigdefaultResponse, - ServerMetricsGetServerDefaultMetricsConfig200Response, - ServerMetricsGetServerDefaultMetricsConfigdefaultResponse, - ServerMetricsListSupportedResourceTypes200Response, - ServerMetricsListSupportedResourceTypesdefaultResponse, - TestCreateOrUpdateTest200Response, - TestCreateOrUpdateTest201Response, - TestCreateOrUpdateTestdefaultResponse, - TestDeleteLoadTest204Response, - TestDeleteLoadTestdefaultResponse, - TestGetLoadTest200Response, - TestGetLoadTestdefaultResponse, - TestListLoadTestSearch200Response, - TestListLoadTestSearchdefaultResponse, - TestUploadTestFile201Response, - TestUploadTestFiledefaultResponse, - TestGetTestFile200Response, - TestGetTestFiledefaultResponse, - TestDeleteTestFile204Response, - TestDeleteTestFiledefaultResponse, - TestListTestFiles200Response, - TestListTestFilesdefaultResponse, - TestRunDeleteTestRun204Response, - TestRunDeleteTestRundefaultResponse, - TestRunCreateOrUpdateTestRun200Response, - TestRunCreateOrUpdateTestRundefaultResponse, - TestRunGetTestRun200Response, - TestRunGetTestRundefaultResponse, - TestRunGetTestRunFile200Response, - TestRunGetTestRunFiledefaultResponse, - TestRunListTestRuns200Response, - TestRunListTestRunsdefaultResponse, - TestRunStopTestRun200Response, - TestRunStopTestRundefaultResponse, - TestRunGetTestRunClientMetrics200Response, - TestRunGetTestRunClientMetricsdefaultResponse, - TestRunGetTestRunClientMetricsFilters200Response, - TestRunGetTestRunClientMetricsFiltersdefaultResponse, + LoadTestAdministrationCreateOrUpdateTest200Response, + LoadTestAdministrationCreateOrUpdateTest201Response, + LoadTestAdministrationCreateOrUpdateTestdefaultResponse, + LoadTestAdministrationDeleteTest204Response, + LoadTestAdministrationDeleteTestdefaultResponse, + LoadTestAdministrationGetTest200Response, + LoadTestAdministrationGetTestdefaultResponse, + LoadTestAdministrationListTests200Response, + LoadTestAdministrationListTestsdefaultResponse, + LoadTestAdministrationUploadFile201Response, + LoadTestAdministrationUploadFiledefaultResponse, + LoadTestAdministrationGetFile200Response, + LoadTestAdministrationGetFiledefaultResponse, + LoadTestAdministrationDeleteFile204Response, + LoadTestAdministrationDeleteFiledefaultResponse, + LoadTestAdministrationListFilesTest200Response, + LoadTestAdministrationListFilesTestdefaultResponse, + LoadTestAdministrationCreateOrUpdateAppComponentTest200Response, + LoadTestAdministrationCreateOrUpdateAppComponentTest201Response, + LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse, + LoadTestAdministrationGetAppComponentsTest200Response, + LoadTestAdministrationGetAppComponentsTestdefaultResponse, + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response, + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response, + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse, + LoadTestAdministrationGetServerMetricsConfigTest200Response, + LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse, + TestRunDelete204Response, + TestRunDeletedefaultResponse, + TestRunCreateOrUpdate200Response, + TestRunCreateOrUpdatedefaultResponse, + TestRunGet200Response, + TestRunGetdefaultResponse, + TestRunGetFile200Response, + TestRunGetFiledefaultResponse, + TestRunList200Response, + TestRunListdefaultResponse, + TestRunStop200Response, + TestRunStopdefaultResponse, + TestRunListMetricNamespaces200Response, + TestRunListMetricNamespacesdefaultResponse, + TestRunListMetricDefinitions200Response, + TestRunListMetricDefinitionsdefaultResponse, + TestRunGetMetrics200Response, + TestRunGetMetricsdefaultResponse, + TestRunCreateOrUpdateAppComponent200Response, + TestRunCreateOrUpdateAppComponent201Response, + TestRunCreateOrUpdateAppComponentdefaultResponse, + TestRunGetAppComponents200Response, + TestRunGetAppComponentsdefaultResponse, + TestRunCreateOrUpdateServerMetricsConfig200Response, + TestRunCreateOrUpdateServerMetricsConfig201Response, + TestRunCreateOrUpdateServerMetricsConfigdefaultResponse, + TestRunGetServerMetricsConfig200Response, + TestRunGetServerMetricsConfigdefaultResponse } from "./responses"; import { Client, StreamableMethod } from "@azure-rest/core-client"; -export interface AppComponentCreateOrUpdateAppComponents { - /** Associate an App Component (Azure resource) to a test or test run. */ +export interface LoadTestAdministrationCreateOrUpdateTest { + /** Create a new test or update an existing test. */ patch( - options: AppComponentCreateOrUpdateAppComponentsParameters + options: LoadTestAdministrationCreateOrUpdateTestParameters ): StreamableMethod< - | AppComponentCreateOrUpdateAppComponents200Response - | AppComponentCreateOrUpdateAppComponents201Response - | AppComponentCreateOrUpdateAppComponentsdefaultResponse + | LoadTestAdministrationCreateOrUpdateTest200Response + | LoadTestAdministrationCreateOrUpdateTest201Response + | LoadTestAdministrationCreateOrUpdateTestdefaultResponse >; - /** Delete an App Component. */ + /** Delete a test by its name. */ delete( - options?: AppComponentDeleteAppComponentsParameters + options?: LoadTestAdministrationDeleteTestParameters ): StreamableMethod< - AppComponentDeleteAppComponents204Response | AppComponentDeleteAppComponentsdefaultResponse + | LoadTestAdministrationDeleteTest204Response + | LoadTestAdministrationDeleteTestdefaultResponse >; - /** Get App Component details by App Component name. */ + /** Get load test details by test name */ get( - options?: AppComponentGetAppComponentByNameParameters + options?: LoadTestAdministrationGetTestParameters ): StreamableMethod< - AppComponentGetAppComponentByName200Response | AppComponentGetAppComponentByNamedefaultResponse + | LoadTestAdministrationGetTest200Response + | LoadTestAdministrationGetTestdefaultResponse >; } -export interface AppComponentGetAppComponent { - /** Get App Components for a test or a test run by its name. */ +export interface LoadTestAdministrationListTests { + /** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ get( - options?: AppComponentGetAppComponentParameters + options?: LoadTestAdministrationListTestsParameters ): StreamableMethod< - AppComponentGetAppComponent200Response | AppComponentGetAppComponentdefaultResponse + | LoadTestAdministrationListTests200Response + | LoadTestAdministrationListTestsdefaultResponse >; } -export interface ServerMetricsCreateOrUpdateServerMetricsConfig { - /** Configure server metrics for a test or test run */ - patch( - options: ServerMetricsCreateOrUpdateServerMetricsConfigParameters +export interface LoadTestAdministrationUploadFile { + /** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ + put( + options: LoadTestAdministrationUploadFileParameters ): StreamableMethod< - | ServerMetricsCreateOrUpdateServerMetricsConfig200Response - | ServerMetricsCreateOrUpdateServerMetricsConfig201Response - | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse + | LoadTestAdministrationUploadFile201Response + | LoadTestAdministrationUploadFiledefaultResponse >; - /** Get server metrics configuration by its name. */ + /** Get test file by the file name. */ get( - options?: ServerMetricsGetServerMetricsConfigByNameParameters + options?: LoadTestAdministrationGetFileParameters ): StreamableMethod< - | ServerMetricsGetServerMetricsConfigByName200Response - | ServerMetricsGetServerMetricsConfigByNamedefaultResponse + | LoadTestAdministrationGetFile200Response + | LoadTestAdministrationGetFiledefaultResponse >; - /** Delete server metrics configuration by its name */ + /** Delete file by the file name for a test */ delete( - options?: ServerMetricsDeleteServerMetricsConfigParameters + options?: LoadTestAdministrationDeleteFileParameters ): StreamableMethod< - | ServerMetricsDeleteServerMetricsConfig204Response - | ServerMetricsDeleteServerMetricsConfigdefaultResponse + | LoadTestAdministrationDeleteFile204Response + | LoadTestAdministrationDeleteFiledefaultResponse >; } -export interface ServerMetricsGetServerMetricsConfig { - /** Get server metrics configuration for a test or test run by its name. */ +export interface LoadTestAdministrationListFilesTest { + /** Get all test files. */ get( - options?: ServerMetricsGetServerMetricsConfigParameters + options?: LoadTestAdministrationListFilesTestParameters ): StreamableMethod< - | ServerMetricsGetServerMetricsConfig200Response - | ServerMetricsGetServerMetricsConfigdefaultResponse + | LoadTestAdministrationListFilesTest200Response + | LoadTestAdministrationListFilesTestdefaultResponse >; } -export interface ServerMetricsGetServerDefaultMetricsConfig { - /** Get all default server metrics configuration for supported resource types. */ - get( - options?: ServerMetricsGetServerDefaultMetricsConfigParameters +export interface LoadTestAdministrationCreateOrUpdateAppComponentTest { + /** Associate an app component (collection of azure resources) to a test */ + patch( + options: LoadTestAdministrationCreateOrUpdateAppComponentTestParameters ): StreamableMethod< - | ServerMetricsGetServerDefaultMetricsConfig200Response - | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse + | LoadTestAdministrationCreateOrUpdateAppComponentTest200Response + | LoadTestAdministrationCreateOrUpdateAppComponentTest201Response + | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse >; -} - -export interface ServerMetricsListSupportedResourceTypes { - /** Get all supported resource types for App Components(Azure resource types). */ + /** Get associated app component (collection of azure resources) for the given test. */ get( - options?: ServerMetricsListSupportedResourceTypesParameters + options?: LoadTestAdministrationGetAppComponentsTestParameters ): StreamableMethod< - | ServerMetricsListSupportedResourceTypes200Response - | ServerMetricsListSupportedResourceTypesdefaultResponse + | LoadTestAdministrationGetAppComponentsTest200Response + | LoadTestAdministrationGetAppComponentsTestdefaultResponse >; } -export interface TestCreateOrUpdateTest { - /** Create a new test or Update an existing test. */ +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest { + /** Configure server metrics for a test */ patch( - options: TestCreateOrUpdateTestParameters + options: LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters ): StreamableMethod< - | TestCreateOrUpdateTest200Response - | TestCreateOrUpdateTest201Response - | TestCreateOrUpdateTestdefaultResponse + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse >; - /** Delete a test by its name. */ - delete( - options?: TestDeleteLoadTestParameters - ): StreamableMethod; - /** Get load test details by test name */ - get( - options?: TestGetLoadTestParameters - ): StreamableMethod; -} - -export interface TestListLoadTestSearch { - /** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ + /** Get server metric configuration for the given test. */ get( - options?: TestListLoadTestSearchParameters - ): StreamableMethod; -} - -export interface TestUploadTestFile { - /** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ - put( - options: TestUploadTestFileParameters - ): StreamableMethod; - /** Get test file by the file name. */ - get( - options?: TestGetTestFileParameters - ): StreamableMethod; - /** Delete file by the file name for a test. */ - delete( - options?: TestDeleteTestFileParameters - ): StreamableMethod; -} - -export interface TestListTestFiles { - /** Get all test files. */ - get( - options?: TestListTestFilesParameters - ): StreamableMethod; + options?: LoadTestAdministrationGetServerMetricsConfigTestParameters + ): StreamableMethod< + | LoadTestAdministrationGetServerMetricsConfigTest200Response + | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse + >; } -export interface TestRunDeleteTestRun { +export interface TestRunDelete { /** Delete a test run by its name. */ delete( - options?: TestRunDeleteTestRunParameters - ): StreamableMethod; + options?: TestRunDeleteParameters + ): StreamableMethod; /** Create and start a new test run with the given name. */ patch( - options: TestRunCreateOrUpdateTestRunParameters + options: TestRunCreateOrUpdateParameters ): StreamableMethod< - TestRunCreateOrUpdateTestRun200Response | TestRunCreateOrUpdateTestRundefaultResponse + TestRunCreateOrUpdate200Response | TestRunCreateOrUpdatedefaultResponse >; /** Get test run details by name. */ get( - options?: TestRunGetTestRunParameters - ): StreamableMethod; + options?: TestRunGetParameters + ): StreamableMethod; } -export interface TestRunGetTestRunFile { +export interface TestRunGetFile { /** Get test run file by file name. */ get( - options?: TestRunGetTestRunFileParameters - ): StreamableMethod; + options?: TestRunGetFileParameters + ): StreamableMethod< + TestRunGetFile200Response | TestRunGetFiledefaultResponse + >; } -export interface TestRunListTestRuns { +export interface TestRunList { /** Get all test runs with given filters */ get( - options?: TestRunListTestRunsParameters - ): StreamableMethod; + options?: TestRunListParameters + ): StreamableMethod; } -export interface TestRunStopTestRun { +export interface TestRunStop { /** Stop test run by name. */ post( - options?: TestRunStopTestRunParameters - ): StreamableMethod; + options?: TestRunStopParameters + ): StreamableMethod; } -export interface TestRunGetTestRunClientMetrics { - /** Get all client metrics for a load test run. */ +export interface TestRunListMetricNamespaces { + /** Lists the metric namespaces for a load test run. */ + get( + options?: TestRunListMetricNamespacesParameters + ): StreamableMethod< + | TestRunListMetricNamespaces200Response + | TestRunListMetricNamespacesdefaultResponse + >; +} + +export interface TestRunListMetricDefinitions { + /** Lists the metric definitions for a load test run. */ + get( + options: TestRunListMetricDefinitionsParameters + ): StreamableMethod< + | TestRunListMetricDefinitions200Response + | TestRunListMetricDefinitionsdefaultResponse + >; +} + +export interface TestRunGetMetrics { + /** Lists the metric values for a load test run. */ post( - options: TestRunGetTestRunClientMetricsParameters + options: TestRunGetMetricsParameters + ): StreamableMethod< + TestRunGetMetrics200Response | TestRunGetMetricsdefaultResponse + >; +} + +export interface TestRunCreateOrUpdateAppComponent { + /** Associate an app component (collection of azure resources) to a test run */ + patch( + options: TestRunCreateOrUpdateAppComponentParameters + ): StreamableMethod< + | TestRunCreateOrUpdateAppComponent200Response + | TestRunCreateOrUpdateAppComponent201Response + | TestRunCreateOrUpdateAppComponentdefaultResponse + >; + /** Get associated app component (collection of azure resources) for the given test run. */ + get( + options?: TestRunGetAppComponentsParameters ): StreamableMethod< - TestRunGetTestRunClientMetrics200Response | TestRunGetTestRunClientMetricsdefaultResponse + TestRunGetAppComponents200Response | TestRunGetAppComponentsdefaultResponse >; } -export interface TestRunGetTestRunClientMetricsFilters { - /** Get all filters that are supported for client metrics for a given load test run */ +export interface TestRunCreateOrUpdateServerMetricsConfig { + /** Configure server metrics for a test run */ + patch( + options: TestRunCreateOrUpdateServerMetricsConfigParameters + ): StreamableMethod< + | TestRunCreateOrUpdateServerMetricsConfig200Response + | TestRunCreateOrUpdateServerMetricsConfig201Response + | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse + >; + /** Get server metric configuration for the given test run. */ get( - options?: TestRunGetTestRunClientMetricsFiltersParameters + options?: TestRunGetServerMetricsConfigParameters ): StreamableMethod< - | TestRunGetTestRunClientMetricsFilters200Response - | TestRunGetTestRunClientMetricsFiltersdefaultResponse + | TestRunGetServerMetricsConfig200Response + | TestRunGetServerMetricsConfigdefaultResponse >; } export interface Routes { - /** Resource for '/appcomponents/\{name\}' has methods for the following verbs: patch, delete, get */ - (path: "/appcomponents/{name}", name: string): AppComponentCreateOrUpdateAppComponents; - /** Resource for '/appcomponents' has methods for the following verbs: get */ - (path: "/appcomponents"): AppComponentGetAppComponent; - /** Resource for '/serverMetricsConfig/\{name\}' has methods for the following verbs: patch, get, delete */ + /** Resource for '/tests/\{testId\}' has methods for the following verbs: patch, delete, get */ + ( + path: "/tests/{testId}", + testId: string + ): LoadTestAdministrationCreateOrUpdateTest; + /** Resource for '/tests' has methods for the following verbs: get */ + (path: "/tests"): LoadTestAdministrationListTests; + /** Resource for '/tests/\{testId\}/files/\{fileId\}' has methods for the following verbs: put, get, delete */ + ( + path: "/tests/{testId}/files/{fileId}", + testId: string, + fileId: string + ): LoadTestAdministrationUploadFile; + /** Resource for '/tests/\{testId\}/files' has methods for the following verbs: get */ + ( + path: "/tests/{testId}/files", + testId: string + ): LoadTestAdministrationListFilesTest; + /** Resource for '/tests/\{testId\}/app-components' has methods for the following verbs: patch, get */ + ( + path: "/tests/{testId}/app-components", + testId: string + ): LoadTestAdministrationCreateOrUpdateAppComponentTest; + /** Resource for '/tests/\{testId\}/server-metric-configs' has methods for the following verbs: patch, get */ ( - path: "/serverMetricsConfig/{name}", - name: string - ): ServerMetricsCreateOrUpdateServerMetricsConfig; - /** Resource for '/serverMetricsConfig' has methods for the following verbs: get */ - (path: "/serverMetricsConfig"): ServerMetricsGetServerMetricsConfig; - /** Resource for '/serverMetricsConfig/default' has methods for the following verbs: get */ - (path: "/serverMetricsConfig/default"): ServerMetricsGetServerDefaultMetricsConfig; - /** Resource for '/serverMetricsConfig/supportedResourceTypes' has methods for the following verbs: get */ - (path: "/serverMetricsConfig/supportedResourceTypes"): ServerMetricsListSupportedResourceTypes; - /** Resource for '/loadtests/\{testId\}' has methods for the following verbs: patch, delete, get */ - (path: "/loadtests/{testId}", testId: string): TestCreateOrUpdateTest; - /** Resource for '/loadtests/sortAndFilter' has methods for the following verbs: get */ - (path: "/loadtests/sortAndFilter"): TestListLoadTestSearch; - /** Resource for '/loadtests/\{testId\}/files/\{fileId\}' has methods for the following verbs: put, get, delete */ - (path: "/loadtests/{testId}/files/{fileId}", testId: string, fileId: string): TestUploadTestFile; - /** Resource for '/loadtests/\{testId\}/files' has methods for the following verbs: get */ - (path: "/loadtests/{testId}/files", testId: string): TestListTestFiles; - /** Resource for '/testruns/\{testRunId\}' has methods for the following verbs: delete, patch, get */ - (path: "/testruns/{testRunId}", testRunId: string): TestRunDeleteTestRun; - /** Resource for '/testruns/\{testRunId\}/files/\{fileId\}' has methods for the following verbs: get */ + path: "/tests/{testId}/server-metric-configs", + testId: string + ): LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest; + /** Resource for '/test-runs/\{testRunId\}' has methods for the following verbs: delete, patch, get */ + (path: "/test-runs/{testRunId}", testRunId: string): TestRunDelete; + /** Resource for '/test-runs/\{testRunId\}/files/\{fileId\}' has methods for the following verbs: get */ ( - path: "/testruns/{testRunId}/files/{fileId}", + path: "/test-runs/{testRunId}/files/{fileId}", testRunId: string, fileId: string - ): TestRunGetTestRunFile; - /** Resource for '/testruns/sortAndFilter' has methods for the following verbs: get */ - (path: "/testruns/sortAndFilter"): TestRunListTestRuns; - /** Resource for '/testruns/\{testRunId\}:stop' has methods for the following verbs: post */ - (path: "/testruns/{testRunId}:stop", testRunId: string): TestRunStopTestRun; - /** Resource for '/testruns/\{testRunId\}/clientMetrics' has methods for the following verbs: post */ - (path: "/testruns/{testRunId}/clientMetrics", testRunId: string): TestRunGetTestRunClientMetrics; - /** Resource for '/testruns/\{testRunId\}/clientMetricsFilters' has methods for the following verbs: get */ + ): TestRunGetFile; + /** Resource for '/test-runs' has methods for the following verbs: get */ + (path: "/test-runs"): TestRunList; + /** Resource for '/test-runs/\{testRunId\}:stop' has methods for the following verbs: post */ + (path: "/test-runs/{testRunId}:stop", testRunId: string): TestRunStop; + /** Resource for '/test-runs/\{testRunId\}/metric-namespaces' has methods for the following verbs: get */ + ( + path: "/test-runs/{testRunId}/metric-namespaces", + testRunId: string + ): TestRunListMetricNamespaces; + /** Resource for '/test-runs/\{testRunId\}/metric-definitions' has methods for the following verbs: get */ + ( + path: "/test-runs/{testRunId}/metric-definitions", + testRunId: string + ): TestRunListMetricDefinitions; + /** Resource for '/test-runs/\{testRunId\}/metrics' has methods for the following verbs: post */ + ( + path: "/test-runs/{testRunId}/metrics", + testRunId: string + ): TestRunGetMetrics; + /** Resource for '/test-runs/\{testRunId\}/app-components' has methods for the following verbs: patch, get */ + ( + path: "/test-runs/{testRunId}/app-components", + testRunId: string + ): TestRunCreateOrUpdateAppComponent; + /** Resource for '/test-runs/\{testRunId\}/server-metric-configs' has methods for the following verbs: patch, get */ ( - path: "/testruns/{testRunId}/clientMetricsFilters", + path: "/test-runs/{testRunId}/server-metric-configs", testRunId: string - ): TestRunGetTestRunClientMetricsFilters; + ): TestRunCreateOrUpdateServerMetricsConfig; } export type AzureLoadTestingClient = Client & { diff --git a/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts b/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts index 4bbccdcd67fe..47c8de37a81c 100644 --- a/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts +++ b/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts @@ -2,281 +2,292 @@ // Licensed under the MIT license. import { - AppComponentCreateOrUpdateAppComponents200Response, - AppComponentCreateOrUpdateAppComponents201Response, - AppComponentCreateOrUpdateAppComponentsdefaultResponse, - AppComponentDeleteAppComponents204Response, - AppComponentDeleteAppComponentsdefaultResponse, - AppComponentGetAppComponentByName200Response, - AppComponentGetAppComponentByNamedefaultResponse, - AppComponentGetAppComponent200Response, - AppComponentGetAppComponentdefaultResponse, - ServerMetricsCreateOrUpdateServerMetricsConfig200Response, - ServerMetricsCreateOrUpdateServerMetricsConfig201Response, - ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse, - ServerMetricsGetServerMetricsConfigByName200Response, - ServerMetricsGetServerMetricsConfigByNamedefaultResponse, - ServerMetricsDeleteServerMetricsConfig204Response, - ServerMetricsDeleteServerMetricsConfigdefaultResponse, - ServerMetricsGetServerMetricsConfig200Response, - ServerMetricsGetServerMetricsConfigdefaultResponse, - ServerMetricsGetServerDefaultMetricsConfig200Response, - ServerMetricsGetServerDefaultMetricsConfigdefaultResponse, - ServerMetricsListSupportedResourceTypes200Response, - ServerMetricsListSupportedResourceTypesdefaultResponse, - TestCreateOrUpdateTest200Response, - TestCreateOrUpdateTest201Response, - TestCreateOrUpdateTestdefaultResponse, - TestDeleteLoadTest204Response, - TestDeleteLoadTestdefaultResponse, - TestGetLoadTest200Response, - TestGetLoadTestdefaultResponse, - TestListLoadTestSearch200Response, - TestListLoadTestSearchdefaultResponse, - TestUploadTestFile201Response, - TestUploadTestFiledefaultResponse, - TestGetTestFile200Response, - TestGetTestFiledefaultResponse, - TestDeleteTestFile204Response, - TestDeleteTestFiledefaultResponse, - TestListTestFiles200Response, - TestListTestFilesdefaultResponse, - TestRunDeleteTestRun204Response, - TestRunDeleteTestRundefaultResponse, - TestRunCreateOrUpdateTestRun200Response, - TestRunCreateOrUpdateTestRundefaultResponse, - TestRunGetTestRun200Response, - TestRunGetTestRundefaultResponse, - TestRunGetTestRunFile200Response, - TestRunGetTestRunFiledefaultResponse, - TestRunListTestRuns200Response, - TestRunListTestRunsdefaultResponse, - TestRunStopTestRun200Response, - TestRunStopTestRundefaultResponse, - TestRunGetTestRunClientMetrics200Response, - TestRunGetTestRunClientMetricsdefaultResponse, - TestRunGetTestRunClientMetricsFilters200Response, - TestRunGetTestRunClientMetricsFiltersdefaultResponse, + LoadTestAdministrationCreateOrUpdateTest200Response, + LoadTestAdministrationCreateOrUpdateTest201Response, + LoadTestAdministrationCreateOrUpdateTestdefaultResponse, + LoadTestAdministrationDeleteTest204Response, + LoadTestAdministrationDeleteTestdefaultResponse, + LoadTestAdministrationGetTest200Response, + LoadTestAdministrationGetTestdefaultResponse, + LoadTestAdministrationListTests200Response, + LoadTestAdministrationListTestsdefaultResponse, + LoadTestAdministrationUploadFile201Response, + LoadTestAdministrationUploadFiledefaultResponse, + LoadTestAdministrationGetFile200Response, + LoadTestAdministrationGetFiledefaultResponse, + LoadTestAdministrationDeleteFile204Response, + LoadTestAdministrationDeleteFiledefaultResponse, + LoadTestAdministrationListFilesTest200Response, + LoadTestAdministrationListFilesTestdefaultResponse, + LoadTestAdministrationCreateOrUpdateAppComponentTest200Response, + LoadTestAdministrationCreateOrUpdateAppComponentTest201Response, + LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse, + LoadTestAdministrationGetAppComponentsTest200Response, + LoadTestAdministrationGetAppComponentsTestdefaultResponse, + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response, + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response, + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse, + LoadTestAdministrationGetServerMetricsConfigTest200Response, + LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse, + TestRunDelete204Response, + TestRunDeletedefaultResponse, + TestRunCreateOrUpdate200Response, + TestRunCreateOrUpdatedefaultResponse, + TestRunGet200Response, + TestRunGetdefaultResponse, + TestRunGetFile200Response, + TestRunGetFiledefaultResponse, + TestRunList200Response, + TestRunListdefaultResponse, + TestRunStop200Response, + TestRunStopdefaultResponse, + TestRunListMetricNamespaces200Response, + TestRunListMetricNamespacesdefaultResponse, + TestRunListMetricDefinitions200Response, + TestRunListMetricDefinitionsdefaultResponse, + TestRunGetMetrics200Response, + TestRunGetMetricsdefaultResponse, + TestRunCreateOrUpdateAppComponent200Response, + TestRunCreateOrUpdateAppComponent201Response, + TestRunCreateOrUpdateAppComponentdefaultResponse, + TestRunGetAppComponents200Response, + TestRunGetAppComponentsdefaultResponse, + TestRunCreateOrUpdateServerMetricsConfig200Response, + TestRunCreateOrUpdateServerMetricsConfig201Response, + TestRunCreateOrUpdateServerMetricsConfigdefaultResponse, + TestRunGetServerMetricsConfig200Response, + TestRunGetServerMetricsConfigdefaultResponse } from "./responses"; const responseMap: Record = { - "PATCH /appcomponents/{name}": ["200", "201"], - "DELETE /appcomponents/{name}": ["204"], - "GET /appcomponents/{name}": ["200"], - "GET /appcomponents": ["200"], - "PATCH /serverMetricsConfig/{name}": ["200", "201"], - "GET /serverMetricsConfig/{name}": ["200"], - "DELETE /serverMetricsConfig/{name}": ["204"], - "GET /serverMetricsConfig": ["200"], - "GET /serverMetricsConfig/default": ["200"], - "GET /serverMetricsConfig/supportedResourceTypes": ["200"], - "PATCH /loadtests/{testId}": ["200", "201"], - "DELETE /loadtests/{testId}": ["204"], - "GET /loadtests/{testId}": ["200"], - "GET /loadtests/sortAndFilter": ["200"], - "PUT /loadtests/{testId}/files/{fileId}": ["201"], - "GET /loadtests/{testId}/files/{fileId}": ["200"], - "DELETE /loadtests/{testId}/files/{fileId}": ["204"], - "GET /loadtests/{testId}/files": ["200"], - "DELETE /testruns/{testRunId}": ["204"], - "PATCH /testruns/{testRunId}": ["200"], - "GET /testruns/{testRunId}": ["200"], - "GET /testruns/{testRunId}/files/{fileId}": ["200"], - "GET /testruns/sortAndFilter": ["200"], - "POST /testruns/{testRunId}:stop": ["200"], - "POST /testruns/{testRunId}/clientMetrics": ["200"], - "GET /testruns/{testRunId}/clientMetricsFilters": ["200"], + "PATCH /tests/{testId}": ["200", "201"], + "DELETE /tests/{testId}": ["204"], + "GET /tests/{testId}": ["200"], + "GET /tests": ["200"], + "PUT /tests/{testId}/files/{fileId}": ["201"], + "GET /tests/{testId}/files/{fileId}": ["200"], + "DELETE /tests/{testId}/files/{fileId}": ["204"], + "GET /tests/{testId}/files": ["200"], + "PATCH /tests/{testId}/app-components": ["200", "201"], + "GET /tests/{testId}/app-components": ["200"], + "PATCH /tests/{testId}/server-metric-configs": ["200", "201"], + "GET /tests/{testId}/server-metric-configs": ["200"], + "DELETE /test-runs/{testRunId}": ["204"], + "PATCH /test-runs/{testRunId}": ["200"], + "GET /test-runs/{testRunId}": ["200"], + "GET /test-runs/{testRunId}/files/{fileId}": ["200"], + "GET /test-runs": ["200"], + "POST /test-runs/{testRunId}:stop": ["200"], + "GET /test-runs/{testRunId}/metric-namespaces": ["200"], + "GET /test-runs/{testRunId}/metric-definitions": ["200"], + "POST /test-runs/{testRunId}/metrics": ["200"], + "PATCH /test-runs/{testRunId}/app-components": ["200", "201"], + "GET /test-runs/{testRunId}/app-components": ["200"], + "PATCH /test-runs/{testRunId}/server-metric-configs": ["200", "201"], + "GET /test-runs/{testRunId}/server-metric-configs": ["200"] }; export function isUnexpected( response: - | AppComponentCreateOrUpdateAppComponents200Response - | AppComponentCreateOrUpdateAppComponents201Response - | AppComponentCreateOrUpdateAppComponentsdefaultResponse -): response is AppComponentCreateOrUpdateAppComponentsdefaultResponse; + | LoadTestAdministrationCreateOrUpdateTest200Response + | LoadTestAdministrationCreateOrUpdateTest201Response + | LoadTestAdministrationCreateOrUpdateTestdefaultResponse +): response is LoadTestAdministrationCreateOrUpdateTestdefaultResponse; export function isUnexpected( response: - | AppComponentDeleteAppComponents204Response - | AppComponentDeleteAppComponentsdefaultResponse -): response is AppComponentDeleteAppComponentsdefaultResponse; + | LoadTestAdministrationDeleteTest204Response + | LoadTestAdministrationDeleteTestdefaultResponse +): response is LoadTestAdministrationDeleteTestdefaultResponse; export function isUnexpected( response: - | AppComponentGetAppComponentByName200Response - | AppComponentGetAppComponentByNamedefaultResponse -): response is AppComponentGetAppComponentByNamedefaultResponse; -export function isUnexpected( - response: AppComponentGetAppComponent200Response | AppComponentGetAppComponentdefaultResponse -): response is AppComponentGetAppComponentdefaultResponse; + | LoadTestAdministrationGetTest200Response + | LoadTestAdministrationGetTestdefaultResponse +): response is LoadTestAdministrationGetTestdefaultResponse; export function isUnexpected( response: - | ServerMetricsCreateOrUpdateServerMetricsConfig200Response - | ServerMetricsCreateOrUpdateServerMetricsConfig201Response - | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse -): response is ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse; + | LoadTestAdministrationListTests200Response + | LoadTestAdministrationListTestsdefaultResponse +): response is LoadTestAdministrationListTestsdefaultResponse; export function isUnexpected( response: - | ServerMetricsGetServerMetricsConfigByName200Response - | ServerMetricsGetServerMetricsConfigByNamedefaultResponse -): response is ServerMetricsGetServerMetricsConfigByNamedefaultResponse; + | LoadTestAdministrationUploadFile201Response + | LoadTestAdministrationUploadFiledefaultResponse +): response is LoadTestAdministrationUploadFiledefaultResponse; export function isUnexpected( response: - | ServerMetricsDeleteServerMetricsConfig204Response - | ServerMetricsDeleteServerMetricsConfigdefaultResponse -): response is ServerMetricsDeleteServerMetricsConfigdefaultResponse; + | LoadTestAdministrationGetFile200Response + | LoadTestAdministrationGetFiledefaultResponse +): response is LoadTestAdministrationGetFiledefaultResponse; export function isUnexpected( response: - | ServerMetricsGetServerMetricsConfig200Response - | ServerMetricsGetServerMetricsConfigdefaultResponse -): response is ServerMetricsGetServerMetricsConfigdefaultResponse; + | LoadTestAdministrationDeleteFile204Response + | LoadTestAdministrationDeleteFiledefaultResponse +): response is LoadTestAdministrationDeleteFiledefaultResponse; export function isUnexpected( response: - | ServerMetricsGetServerDefaultMetricsConfig200Response - | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse -): response is ServerMetricsGetServerDefaultMetricsConfigdefaultResponse; + | LoadTestAdministrationListFilesTest200Response + | LoadTestAdministrationListFilesTestdefaultResponse +): response is LoadTestAdministrationListFilesTestdefaultResponse; export function isUnexpected( response: - | ServerMetricsListSupportedResourceTypes200Response - | ServerMetricsListSupportedResourceTypesdefaultResponse -): response is ServerMetricsListSupportedResourceTypesdefaultResponse; + | LoadTestAdministrationCreateOrUpdateAppComponentTest200Response + | LoadTestAdministrationCreateOrUpdateAppComponentTest201Response + | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse +): response is LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse; export function isUnexpected( response: - | TestCreateOrUpdateTest200Response - | TestCreateOrUpdateTest201Response - | TestCreateOrUpdateTestdefaultResponse -): response is TestCreateOrUpdateTestdefaultResponse; + | LoadTestAdministrationGetAppComponentsTest200Response + | LoadTestAdministrationGetAppComponentsTestdefaultResponse +): response is LoadTestAdministrationGetAppComponentsTestdefaultResponse; export function isUnexpected( - response: TestDeleteLoadTest204Response | TestDeleteLoadTestdefaultResponse -): response is TestDeleteLoadTestdefaultResponse; + response: + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse +): response is LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse; export function isUnexpected( - response: TestGetLoadTest200Response | TestGetLoadTestdefaultResponse -): response is TestGetLoadTestdefaultResponse; + response: + | LoadTestAdministrationGetServerMetricsConfigTest200Response + | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse +): response is LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse; export function isUnexpected( - response: TestListLoadTestSearch200Response | TestListLoadTestSearchdefaultResponse -): response is TestListLoadTestSearchdefaultResponse; + response: TestRunDelete204Response | TestRunDeletedefaultResponse +): response is TestRunDeletedefaultResponse; export function isUnexpected( - response: TestUploadTestFile201Response | TestUploadTestFiledefaultResponse -): response is TestUploadTestFiledefaultResponse; + response: + | TestRunCreateOrUpdate200Response + | TestRunCreateOrUpdatedefaultResponse +): response is TestRunCreateOrUpdatedefaultResponse; export function isUnexpected( - response: TestGetTestFile200Response | TestGetTestFiledefaultResponse -): response is TestGetTestFiledefaultResponse; + response: TestRunGet200Response | TestRunGetdefaultResponse +): response is TestRunGetdefaultResponse; export function isUnexpected( - response: TestDeleteTestFile204Response | TestDeleteTestFiledefaultResponse -): response is TestDeleteTestFiledefaultResponse; + response: TestRunGetFile200Response | TestRunGetFiledefaultResponse +): response is TestRunGetFiledefaultResponse; export function isUnexpected( - response: TestListTestFiles200Response | TestListTestFilesdefaultResponse -): response is TestListTestFilesdefaultResponse; + response: TestRunList200Response | TestRunListdefaultResponse +): response is TestRunListdefaultResponse; export function isUnexpected( - response: TestRunDeleteTestRun204Response | TestRunDeleteTestRundefaultResponse -): response is TestRunDeleteTestRundefaultResponse; + response: TestRunStop200Response | TestRunStopdefaultResponse +): response is TestRunStopdefaultResponse; export function isUnexpected( - response: TestRunCreateOrUpdateTestRun200Response | TestRunCreateOrUpdateTestRundefaultResponse -): response is TestRunCreateOrUpdateTestRundefaultResponse; + response: + | TestRunListMetricNamespaces200Response + | TestRunListMetricNamespacesdefaultResponse +): response is TestRunListMetricNamespacesdefaultResponse; export function isUnexpected( - response: TestRunGetTestRun200Response | TestRunGetTestRundefaultResponse -): response is TestRunGetTestRundefaultResponse; + response: + | TestRunListMetricDefinitions200Response + | TestRunListMetricDefinitionsdefaultResponse +): response is TestRunListMetricDefinitionsdefaultResponse; export function isUnexpected( - response: TestRunGetTestRunFile200Response | TestRunGetTestRunFiledefaultResponse -): response is TestRunGetTestRunFiledefaultResponse; + response: TestRunGetMetrics200Response | TestRunGetMetricsdefaultResponse +): response is TestRunGetMetricsdefaultResponse; export function isUnexpected( - response: TestRunListTestRuns200Response | TestRunListTestRunsdefaultResponse -): response is TestRunListTestRunsdefaultResponse; + response: + | TestRunCreateOrUpdateAppComponent200Response + | TestRunCreateOrUpdateAppComponent201Response + | TestRunCreateOrUpdateAppComponentdefaultResponse +): response is TestRunCreateOrUpdateAppComponentdefaultResponse; export function isUnexpected( - response: TestRunStopTestRun200Response | TestRunStopTestRundefaultResponse -): response is TestRunStopTestRundefaultResponse; + response: + | TestRunGetAppComponents200Response + | TestRunGetAppComponentsdefaultResponse +): response is TestRunGetAppComponentsdefaultResponse; export function isUnexpected( response: - | TestRunGetTestRunClientMetrics200Response - | TestRunGetTestRunClientMetricsdefaultResponse -): response is TestRunGetTestRunClientMetricsdefaultResponse; + | TestRunCreateOrUpdateServerMetricsConfig200Response + | TestRunCreateOrUpdateServerMetricsConfig201Response + | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse +): response is TestRunCreateOrUpdateServerMetricsConfigdefaultResponse; export function isUnexpected( response: - | TestRunGetTestRunClientMetricsFilters200Response - | TestRunGetTestRunClientMetricsFiltersdefaultResponse -): response is TestRunGetTestRunClientMetricsFiltersdefaultResponse; + | TestRunGetServerMetricsConfig200Response + | TestRunGetServerMetricsConfigdefaultResponse +): response is TestRunGetServerMetricsConfigdefaultResponse; export function isUnexpected( response: - | AppComponentCreateOrUpdateAppComponents200Response - | AppComponentCreateOrUpdateAppComponents201Response - | AppComponentCreateOrUpdateAppComponentsdefaultResponse - | AppComponentDeleteAppComponents204Response - | AppComponentDeleteAppComponentsdefaultResponse - | AppComponentGetAppComponentByName200Response - | AppComponentGetAppComponentByNamedefaultResponse - | AppComponentGetAppComponent200Response - | AppComponentGetAppComponentdefaultResponse - | ServerMetricsCreateOrUpdateServerMetricsConfig200Response - | ServerMetricsCreateOrUpdateServerMetricsConfig201Response - | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse - | ServerMetricsGetServerMetricsConfigByName200Response - | ServerMetricsGetServerMetricsConfigByNamedefaultResponse - | ServerMetricsDeleteServerMetricsConfig204Response - | ServerMetricsDeleteServerMetricsConfigdefaultResponse - | ServerMetricsGetServerMetricsConfig200Response - | ServerMetricsGetServerMetricsConfigdefaultResponse - | ServerMetricsGetServerDefaultMetricsConfig200Response - | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse - | ServerMetricsListSupportedResourceTypes200Response - | ServerMetricsListSupportedResourceTypesdefaultResponse - | TestCreateOrUpdateTest200Response - | TestCreateOrUpdateTest201Response - | TestCreateOrUpdateTestdefaultResponse - | TestDeleteLoadTest204Response - | TestDeleteLoadTestdefaultResponse - | TestGetLoadTest200Response - | TestGetLoadTestdefaultResponse - | TestListLoadTestSearch200Response - | TestListLoadTestSearchdefaultResponse - | TestUploadTestFile201Response - | TestUploadTestFiledefaultResponse - | TestGetTestFile200Response - | TestGetTestFiledefaultResponse - | TestDeleteTestFile204Response - | TestDeleteTestFiledefaultResponse - | TestListTestFiles200Response - | TestListTestFilesdefaultResponse - | TestRunDeleteTestRun204Response - | TestRunDeleteTestRundefaultResponse - | TestRunCreateOrUpdateTestRun200Response - | TestRunCreateOrUpdateTestRundefaultResponse - | TestRunGetTestRun200Response - | TestRunGetTestRundefaultResponse - | TestRunGetTestRunFile200Response - | TestRunGetTestRunFiledefaultResponse - | TestRunListTestRuns200Response - | TestRunListTestRunsdefaultResponse - | TestRunStopTestRun200Response - | TestRunStopTestRundefaultResponse - | TestRunGetTestRunClientMetrics200Response - | TestRunGetTestRunClientMetricsdefaultResponse - | TestRunGetTestRunClientMetricsFilters200Response - | TestRunGetTestRunClientMetricsFiltersdefaultResponse + | LoadTestAdministrationCreateOrUpdateTest200Response + | LoadTestAdministrationCreateOrUpdateTest201Response + | LoadTestAdministrationCreateOrUpdateTestdefaultResponse + | LoadTestAdministrationDeleteTest204Response + | LoadTestAdministrationDeleteTestdefaultResponse + | LoadTestAdministrationGetTest200Response + | LoadTestAdministrationGetTestdefaultResponse + | LoadTestAdministrationListTests200Response + | LoadTestAdministrationListTestsdefaultResponse + | LoadTestAdministrationUploadFile201Response + | LoadTestAdministrationUploadFiledefaultResponse + | LoadTestAdministrationGetFile200Response + | LoadTestAdministrationGetFiledefaultResponse + | LoadTestAdministrationDeleteFile204Response + | LoadTestAdministrationDeleteFiledefaultResponse + | LoadTestAdministrationListFilesTest200Response + | LoadTestAdministrationListFilesTestdefaultResponse + | LoadTestAdministrationCreateOrUpdateAppComponentTest200Response + | LoadTestAdministrationCreateOrUpdateAppComponentTest201Response + | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse + | LoadTestAdministrationGetAppComponentsTest200Response + | LoadTestAdministrationGetAppComponentsTestdefaultResponse + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse + | LoadTestAdministrationGetServerMetricsConfigTest200Response + | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse + | TestRunDelete204Response + | TestRunDeletedefaultResponse + | TestRunCreateOrUpdate200Response + | TestRunCreateOrUpdatedefaultResponse + | TestRunGet200Response + | TestRunGetdefaultResponse + | TestRunGetFile200Response + | TestRunGetFiledefaultResponse + | TestRunList200Response + | TestRunListdefaultResponse + | TestRunStop200Response + | TestRunStopdefaultResponse + | TestRunListMetricNamespaces200Response + | TestRunListMetricNamespacesdefaultResponse + | TestRunListMetricDefinitions200Response + | TestRunListMetricDefinitionsdefaultResponse + | TestRunGetMetrics200Response + | TestRunGetMetricsdefaultResponse + | TestRunCreateOrUpdateAppComponent200Response + | TestRunCreateOrUpdateAppComponent201Response + | TestRunCreateOrUpdateAppComponentdefaultResponse + | TestRunGetAppComponents200Response + | TestRunGetAppComponentsdefaultResponse + | TestRunCreateOrUpdateServerMetricsConfig200Response + | TestRunCreateOrUpdateServerMetricsConfig201Response + | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse + | TestRunGetServerMetricsConfig200Response + | TestRunGetServerMetricsConfigdefaultResponse ): response is - | AppComponentCreateOrUpdateAppComponentsdefaultResponse - | AppComponentDeleteAppComponentsdefaultResponse - | AppComponentGetAppComponentByNamedefaultResponse - | AppComponentGetAppComponentdefaultResponse - | ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse - | ServerMetricsGetServerMetricsConfigByNamedefaultResponse - | ServerMetricsDeleteServerMetricsConfigdefaultResponse - | ServerMetricsGetServerMetricsConfigdefaultResponse - | ServerMetricsGetServerDefaultMetricsConfigdefaultResponse - | ServerMetricsListSupportedResourceTypesdefaultResponse - | TestCreateOrUpdateTestdefaultResponse - | TestDeleteLoadTestdefaultResponse - | TestGetLoadTestdefaultResponse - | TestListLoadTestSearchdefaultResponse - | TestUploadTestFiledefaultResponse - | TestGetTestFiledefaultResponse - | TestDeleteTestFiledefaultResponse - | TestListTestFilesdefaultResponse - | TestRunDeleteTestRundefaultResponse - | TestRunCreateOrUpdateTestRundefaultResponse - | TestRunGetTestRundefaultResponse - | TestRunGetTestRunFiledefaultResponse - | TestRunListTestRunsdefaultResponse - | TestRunStopTestRundefaultResponse - | TestRunGetTestRunClientMetricsdefaultResponse - | TestRunGetTestRunClientMetricsFiltersdefaultResponse { + | LoadTestAdministrationCreateOrUpdateTestdefaultResponse + | LoadTestAdministrationDeleteTestdefaultResponse + | LoadTestAdministrationGetTestdefaultResponse + | LoadTestAdministrationListTestsdefaultResponse + | LoadTestAdministrationUploadFiledefaultResponse + | LoadTestAdministrationGetFiledefaultResponse + | LoadTestAdministrationDeleteFiledefaultResponse + | LoadTestAdministrationListFilesTestdefaultResponse + | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse + | LoadTestAdministrationGetAppComponentsTestdefaultResponse + | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse + | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse + | TestRunDeletedefaultResponse + | TestRunCreateOrUpdatedefaultResponse + | TestRunGetdefaultResponse + | TestRunGetFiledefaultResponse + | TestRunListdefaultResponse + | TestRunStopdefaultResponse + | TestRunListMetricNamespacesdefaultResponse + | TestRunListMetricDefinitionsdefaultResponse + | TestRunGetMetricsdefaultResponse + | TestRunCreateOrUpdateAppComponentdefaultResponse + | TestRunGetAppComponentsdefaultResponse + | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse + | TestRunGetServerMetricsConfigdefaultResponse { const lroOriginal = response.headers["x-ms-original-url"]; const url = new URL(lroOriginal ?? response.request.url); const method = response.request.method; @@ -300,11 +311,17 @@ function geParametrizedPathSuccess(path: string): string[] { // If the candidate and actual paths don't match in size // we move on to the next candidate path - if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) { + if ( + candidateParts.length === pathParts.length && + hasParametrizedPath(key) + ) { // track if we have found a match to return the values found. let found = true; for (let i = 0; i < candidateParts.length; i++) { - if (candidateParts[i].startsWith("{") && candidateParts[i].endsWith("}")) { + if ( + candidateParts[i].startsWith("{") && + candidateParts[i].endsWith("}") + ) { // If the current part of the candidate is a "template" part // it is a match with the actual path part on hand // skip as the parameterized part can match anything diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 888ad97f366f..799aeb85ecb1 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -1,113 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export interface AppComponentsMap { - /** Azure Load Testing resource Id */ - resourceId?: string; - /** [Required, if testRunId is not given] Load test unique identifier */ - testId?: string; - /** [Required if testId is not given] Load test run unique identifier */ - testRunId?: string; - /** AppComponent name */ - name?: string; - /** AppComponents Map { resource id (Fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ - value: Record; -} - -export interface AppComponent { - /** Fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} */ - resourceId: string; - /** Azure resource name */ - resourceName: string; - /** Azure resource type */ - resourceType: string; - /** Azure resource display name */ - displayName?: string; - /** Resource group name of the Azure resource */ - resourceGroup?: string; - /** Subscription Id of the Azure resource */ - subscriptionId?: string; - /** Kind of Azure resource type */ - kind?: string; -} - -export interface ServerMetricsModel { - /** Server metrics config name. */ - name?: string; - /** [Required, if testRunId is not given] Load test unique identifier */ - testId?: string; - /** [Required, if testId is not given] Load test run unique identifier */ - testRunId?: string; - /** Metrics map {metric id : metrics object} (Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition for metric id). */ - metrics?: Record; -} - -export interface ResourceMetricModel { - /** Unique identifier for metric. */ - id?: string; - /** Azure resource Id. */ - resourceId: string; - /** Metric name space. */ - metricnamespace: string; - /** Metric description. */ - displayDescription?: string; - /** Metric name object. */ - name: ServerMetricName; - /** Metric aggregation. */ - aggregation: string; - /** Metric unit. */ - unit?: string; - /** Azure resource type. */ - resourceType: string; -} - -export interface ServerMetricName { - /** Metric name value. */ - value: string; - /** Metric localized name. */ - localizedValue: string; -} - -export interface TestModel { +export interface Test { + /** Pass fail criteria for a test. */ + passFailCriteria?: PassFailCriteria; + /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */ + secrets?: Record; + /** Certificates metadata */ + certificate?: CertificateMetadata; + /** Environment variables which are defined as a set of pairs. */ + environmentVariables?: Record; + /** The load test configuration. */ + loadTestConfiguration?: LoadTestConfiguration; + /** The input artifacts for the test. */ + inputArtifacts?: TestInputArtifacts; /** Unique test name as identifier. */ testId?: string; /** The test description. */ description?: string; /** Display name of a test. */ displayName?: string; - /** Fully qualified resource Id e.g /subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ - resourceId?: string; - /** The load test configuration. */ - loadTestConfig?: LoadTestConfig; - /** Pass fail criteria for a test. */ - passFailCriteria?: PassFailCriteria; - /** The created DateTime(ISO 8601 literal format) of the test model. */ - createdDateTime?: Date | string; - /** The user that created the test model. */ - createdBy?: string; - /** The last Modified DateTime(ISO 8601 literal format) of the test model. */ - lastModifiedDateTime?: Date | string; - /** The user that last modified the test model. */ - lastModifiedBy?: string; - /** The input artifacts for the test. */ - inputArtifacts?: InputTestArtifacts; - /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */ - secrets?: Record; - /** Environment variables which are defined as a set of pairs. */ - environmentVariables?: Record; /** Subnet ID on which the load test instances should run. */ subnetId?: string; /** Type of the managed identity referencing the Key vault. */ keyvaultReferenceIdentityType?: string; /** Resource Id of the managed identity referencing the Key vault. */ keyvaultReferenceIdentityId?: string; -} - -export interface LoadTestConfig { - /** The number of engine instances to execute load test. Supported values are in range of 1-45. Required for creating a new test. */ - engineInstances?: number; - /** Whether all the input CSV files should be split evenly across all engines. */ - splitAllCSVs?: boolean; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: Date | string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: Date | string; + /** The user that last modified. */ + lastModifiedBy?: string; } export interface PassFailCriteria { @@ -116,124 +42,257 @@ export interface PassFailCriteria { } export interface PassFailMetric { - /** The client metric on which the criteria should be applied. Allowed values - ‘response_time_ms’ , ‘latency’, ‘error’, ‘requests’, ‘requests_per_sec’. */ - clientmetric?: string; - /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric ,‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests. */ - aggregate?: string; - /** The comparison operator. Supported types ‘>’ */ + /** The client metric on which the criteria should be applied. */ + clientmetric?: + | "response_time_ms" + | "latency" + | "error" + | "requests" + | "requests_per_sec"; + /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests */ + aggregate?: + | "count" + | "percentage" + | "avg" + | "p50" + | "p90" + | "p95" + | "p99" + | "min" + | "max"; + /** The comparison operator. Supported types ‘>’, ‘<’ */ condition?: string; - /** Request name for which the Pass fail criteria has to be applied. */ + /** Request name for which the Pass fail criteria has to be applied */ requestName?: string; /** The value to compare with the client metric. Allowed values - ‘error : [0.0 , 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms. */ value?: number; - /** Either ‘stop’ or ‘continue’ after the threshold is met. Default is ‘continue’. */ - action?: string; + /** Action taken after the threshold is met. Default is ‘continue’. */ + action?: "stop" | "continue"; /** The actual value of the client metric for the test run. */ actualValue?: number; - /** Outcome of the test run. possible outcome - ‘passed’ , ‘failed’ , ‘undetermined’. */ - result?: string; + /** Outcome of the test run. */ + result?: "passed" | "undetermined" | "failed"; } -export interface InputTestArtifacts { - /** FileUrl Model. */ - configUrl?: FileUrl; - /** FileUrl Model. */ - testScriptUrl?: FileUrl; - /** FileUrl Model. */ - userPropUrl?: FileUrl; - /** FileUrl Model. */ - inputArtifactsZipFileurl?: FileUrl; - /** The input artifacts file { name : url } map for the test run. */ - additionalUrls?: Array; +export interface Secret { + /** The value of the secret for the respective type */ + value?: string; + /** Type of secret */ + type?: "AKV_SECRET_URI" | "SECRET_VALUE"; } -export interface FileUrl { +export interface CertificateMetadata { + /** The value of the certificate for respective type */ + value?: string; + /** Type of certificate */ + type?: "AKV_CERT_URI"; + /** Name of the certificate. */ + name?: string; +} + +export interface LoadTestConfiguration { + /** The number of engine instances to execute load test. Supported values are in range of 1-45. Required for creating a new test. */ + engineInstances?: number; + /** If false, Azure Load Testing copies and processes your input files unmodified across all test engine instances. If true, Azure Load Testing splits the CSV input data evenly across all engine instances. If you provide multiple CSV files, each file will be split evenly. */ + splitAllCSVs?: boolean; + /** If true, optionalLoadTestConfig is required and JMX script for the load test is not required to upload. */ + quickStartTest?: boolean; + /** Optional load test config */ + optionalLoadTestConfig?: OptionalLoadTestConfig; +} + +export interface OptionalLoadTestConfig { + /** Test URL. Provide the complete HTTP URL. For example, http://contoso-app.azurewebsites.net/login */ + endpointUrl?: string; + /** No of concurrent virtual users */ + vusers?: number; + /** Ramp up time */ + rampUpTime?: number; + /** Test run duration */ + duration?: number; +} + +export interface TestInputArtifacts { + /** File info */ + configFileInfo?: FileInfo; + /** File info */ + testScriptFileInfo?: FileInfo; + /** File info */ + userPropFileInfo?: FileInfo; + /** File info */ + inputArtifactsZipFileInfo?: FileInfo; + /** Additional supported files for the test run */ + additionalFileInfo?: Array; +} + +export interface FileInfo { /** File URL. */ url?: string; - /** File unique identifier. */ + /** Unique name for test file. */ fileId?: string; /** Name of the file. */ filename?: string; - /** Integer representation of the file type (0 = JMX_FILE, 1 = USER_PROPERTIES, 2 = ADDITIONAL_ARTIFACTS) */ - fileType?: "0" | "1" | "2"; - /** Expiry time of the file */ - expireTime?: Date | string; + /** File type */ + fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; + /** Expiry time of the file (ISO 8601 literal format) */ + expireDateTime?: Date | string; /** Validation status of the file */ - validationStatus?: string; + validationStatus?: + | "NOT_VALIDATED" + | "VALIDATION_SUCCESS" + | "VALIDATION_FAILURE" + | "VALIDATION_INITIATED" + | "VALIDATION_NOT_REQUIRED"; } -export interface SecretMetadata { - /** The value of the secret, of type AKV_SECRET_URI or SECRET_VALUE */ +export interface TestAppComponents { + /** Test identifier */ + testId?: string; + /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ + components: Record; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: Date | string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: Date | string; + /** The user that last modified. */ + lastModifiedBy?: string; +} + +export interface AppComponent { + /** fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} */ + resourceId?: string; + /** Azure resource name, required while creating the app component. */ + resourceName?: string; + /** Azure resource type, required while creating the app component. */ + resourceType?: string; + /** Azure resource display name */ + displayName?: string; + /** Resource group name of the Azure resource */ + resourceGroup?: string; + /** Subscription Id of the Azure resource */ + subscriptionId?: string; + /** Kind of Azure resource type */ + kind?: string; +} + +export interface TestServerMetricConfig { + /** Test identifier */ + testId?: string; + /** Azure resource metrics collection {metric id : metrics object} (Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition for metric id). */ + metrics?: Record; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: Date | string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: Date | string; + /** The user that last modified. */ + lastModifiedBy?: string; +} + +export interface ResourceMetric { + /** Unique name for metric. */ + id?: string; + /** Azure resource id. */ + resourceId: string; + /** Metric name space. */ + metricNamespace: string; + /** Metric description. */ + displayDescription?: string; + /** The localizable string class. */ + name: LocalizableString; + /** Metric aggregation. */ + aggregation: string; + /** Metric unit. */ + unit?: string; + /** Azure resource type. */ + resourceType: string; +} + +export interface LocalizableString { + /** The locale specific value. */ + localizedValue?: string; + /** The invariant value. */ value?: string; - /** Type of secret. eg. AKV_SECRET_URI/SECRET_VALUE */ - type?: string; } -export interface TestRunModel { - /** Unique test run name as identifier. */ +export interface TestRun { + /** Pass fail criteria for a test. */ + passFailCriteria?: PassFailCriteria; + /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */ + secrets?: Record; + /** Certificates metadata */ + certificate?: CertificateMetadata; + /** Environment variables which are defined as a set of pairs. */ + environmentVariables?: Record; + /** Error details if there is any failure in load test run */ + errorDetails?: Array; + /** Test run statistics. */ + testRunStatistics?: Record; + /** The load test configuration. */ + loadTestConfiguration?: LoadTestConfiguration; + /** Collection of test run artifacts */ + testArtifacts?: TestRunArtifacts; + /** Test result for pass/Fail criteria used during the test run. */ + testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED"; + /** Unique test run name as identifier */ testRunId?: string; - /** Display name of a test run. */ + /** Display name of a testRun. */ displayName?: string; /** Associated test Id. */ testId?: string; - /** Load test resource Id. */ - resourceId?: string; /** The test run description. */ description?: string; /** The test run status. */ - status?: string; + status?: + | "ACCEPTED" + | "NOTSTARTED" + | "PROVISIONING" + | "PROVISIONED" + | "CONFIGURING" + | "CONFIGURED" + | "EXECUTING" + | "EXECUTED" + | "DEPROVISIONING" + | "DEPROVISIONED" + | "DONE" + | "CANCELLING" + | "CANCELLED" + | "FAILED" + | "VALIDATION_SUCCESS" + | "VALIDATION_FAILURE"; /** The test run start DateTime(ISO 8601 literal format). */ startDateTime?: Date | string; /** The test run end DateTime(ISO 8601 literal format). */ endDateTime?: Date | string; - /** The load test configuration. */ - loadTestConfig?: LoadTestConfig; - /** Test result for pass/Fail criteria used during the test run. possible outcome - ‘Passed’ , ‘Failed’ , ‘Not Applicable’. */ - testResult?: string; - /** Pass fail criteria for a test. */ - passFailCriteria?: PassFailCriteria; - testArtifacts?: TestArtifacts; - /** Test run initiated time */ + /** Test run initiated time. */ executedDateTime?: Date | string; /** Number of virtual users, for which test has been run. */ vusers?: number; - /** Test run statistics */ - testRunStatistics?: Record; - /** The created DateTime(ISO 8601 literal format) of the test run. */ - createdDateTime?: Date | string; - /** The user that created the test run. */ - createdBy?: string; - /** The last updated DateTime(ISO 8601 literal format) of the test run. */ - lastModifiedDateTime?: Date | string; - /** The user that updated the test run. */ - lastModifiedBy?: string; /** Portal url. */ portalUrl?: string; - /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */ - secrets?: Record; - /** Environment variables which are defined as a set of pairs. */ - environmentVariables?: Record; /** Test run duration in milliseconds. */ duration?: number; /** Subnet ID on which the load test instances should run. */ subnetId?: string; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: Date | string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: Date | string; + /** The user that last modified. */ + lastModifiedBy?: string; } -export interface TestArtifacts { - /** The input artifacts for the test. */ - inputArtifacts: InputTestArtifacts; - /** The output artifacts for the test run. */ - outputArtifacts?: OutputTestArtifacts; -} - -export interface OutputTestArtifacts { - /** FileUrl Model. */ - resultUrl?: FileUrl; - /** FileUrl Model. */ - logsUrl?: FileUrl; +export interface ErrorDetails { + /** Error details in case test run was not successfully run. */ + message?: string; } -export interface TestRunStatisticsModel { +export interface TestRunStatistics { /** Transaction name. */ transaction?: string; /** Sampler count. */ @@ -260,21 +319,75 @@ export interface TestRunStatisticsModel { throughput?: number; /** Received network bytes. */ receivedKBytesPerSec?: number; - /** Sent network bytes. */ + /** Send network bytes. */ sentKBytesPerSec?: number; } -export interface ClientMetricsRequestModel { - /** List of request samplers, maximum supported samplers for queries are 20. In case of empty, it will return metrics for maximum 20 samplers */ - requestSamplers?: Array; - /** List of errors, maximum supported errors for queries are 20. In case of empty, by default will return metrics for maximum 20 errors */ - errors?: Array; - /** List of percentiles values for response time, supported values 50,90,99,95. Default value is 50th percentile. */ - percentiles?: Array; - /** For test duration less than 10 minutes group by time interval can be any one of 5s,10s,1m,5m.\n\nFor test duration greater than 10 minutes, group by time interval can be any one of 1m,5m,1h. Default value is 1m. */ - groupByInterval?: string; - /** Start time */ - startTime: Date | string; - /** End time */ - endTime: Date | string; +export interface TestRunArtifacts { + /** The input artifacts for the test run. */ + inputArtifacts?: TestRunInputArtifacts; + /** The output artifacts for the test run. */ + outputArtifacts?: TestRunOutputArtifacts; +} + +export interface TestRunInputArtifacts { + /** File info */ + configFileInfo?: FileInfo; + /** File info */ + testScriptFileInfo?: FileInfo; + /** File info */ + userPropFileInfo?: FileInfo; + /** File info */ + inputArtifactsZipFileInfo?: FileInfo; + /** Additional supported files for the test run */ + additionalFileInfo?: Array; +} + +export interface TestRunOutputArtifacts { + /** File info */ + resultUrl?: FileInfo; + /** File info */ + logsUrl?: FileInfo; +} + +export interface MetricRequestPayload { + /** The MetadataFilter is used to reduce the set of metric data returned. Example: Metric contains metadata like SamplerName, Error. To retrieve all the time series data where SamplerName is equals to HTTPRequest1 or HTTPRequest2, the MetadataFilter value will be {"SamplerName", ["HTTPRequest1", "HTTPRequest2"} */ + filters?: Array; +} + +export interface MetadataFilter { + /** The invariant metadata name */ + name?: string; + /** The metadata values. Maximum values can be 20. */ + values?: Array; +} + +export interface TestRunAppComponents { + /** Test run identifier */ + testRunId?: string; + /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ + components: Record; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: Date | string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: Date | string; + /** The user that last modified. */ + lastModifiedBy?: string; +} + +export interface TestRunServerMetricConfig { + /** Test run identifier */ + testRunId?: string; + /** Azure resource metrics collection {metric id : metrics object} (Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition for metric id). */ + metrics?: Record; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: Date | string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: Date | string; + /** The user that last modified. */ + lastModifiedBy?: string; } diff --git a/sdk/loadtestservice/load-testing-rest/src/outputModels.ts b/sdk/loadtestservice/load-testing-rest/src/outputModels.ts index 5609cabc4928..950412b1b442 100644 --- a/sdk/loadtestservice/load-testing-rest/src/outputModels.ts +++ b/sdk/loadtestservice/load-testing-rest/src/outputModels.ts @@ -1,151 +1,39 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export interface AppComponentsMapOutput { - /** Azure Load Testing resource Id */ - resourceId?: string; - /** [Required, if testRunId is not given] Load test unique identifier */ - testId?: string; - /** [Required if testId is not given] Load test run unique identifier */ - testRunId?: string; - /** AppComponent name */ - name?: string; - /** AppComponents Map { resource id (Fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ - value: Record; -} - -export interface AppComponentOutput { - /** Fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} */ - resourceId: string; - /** Azure resource name */ - resourceName: string; - /** Azure resource type */ - resourceType: string; - /** Azure resource display name */ - displayName?: string; - /** Resource group name of the Azure resource */ - resourceGroup?: string; - /** Subscription Id of the Azure resource */ - subscriptionId?: string; - /** Kind of Azure resource type */ - kind?: string; -} - -export interface ErrorResponseBodyOutput { - /** Error from a REST request. */ - error?: ErrorModelOutput; -} - -export interface ErrorModelOutput { - /** The error code. */ - code?: string; - /** The error message. */ - message?: string; - /** The error target. */ - target?: string; - /** Additional details and inner errors. */ - details?: Array; -} - -export interface ServerMetricsModelOutput { - /** Server metrics config name. */ - name?: string; - /** [Required, if testRunId is not given] Load test unique identifier */ - testId?: string; - /** [Required, if testId is not given] Load test run unique identifier */ - testRunId?: string; - /** Metrics map {metric id : metrics object} (Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition for metric id). */ - metrics?: Record; -} - -export interface ResourceMetricModelOutput { - /** Unique identifier for metric. */ - id?: string; - /** Azure resource Id. */ - resourceId: string; - /** Metric name space. */ - metricnamespace: string; - /** Metric description. */ - displayDescription?: string; - /** Metric name object. */ - name: ServerMetricNameOutput; - /** Metric aggregation. */ - aggregation: string; - /** Metric unit. */ - unit?: string; - /** Azure resource type. */ - resourceType: string; -} - -export interface ServerMetricNameOutput { - /** Metric name value. */ - value: string; - /** Metric localized name. */ - localizedValue: string; -} - -export interface DefaultServerMetricsConfigListModelOutput { - /** Default metrics map {resourceType : list of metrics config} (Refer for metrics structure: https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition) */ - defaultMetrics?: Record>; -} - -export interface DefaultServerMetricsConfigModelOutput { - metricnamespace?: string; - aggregation?: string; - name?: LocalizedNameOutput; - unit?: string; - displayDescription?: string; -} - -export interface LocalizedNameOutput { - value?: string; - localizedValue?: string; -} - -export interface SupportedResourceTypeOutput { - value?: Array; -} - -export interface TestModelOutput { +export interface TestOutput { + /** Pass fail criteria for a test. */ + passFailCriteria?: PassFailCriteriaOutput; + /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */ + secrets?: Record; + /** Certificates metadata */ + certificate?: CertificateMetadataOutput; + /** Environment variables which are defined as a set of pairs. */ + environmentVariables?: Record; + /** The load test configuration. */ + loadTestConfiguration?: LoadTestConfigurationOutput; + /** The input artifacts for the test. */ + inputArtifacts?: TestInputArtifactsOutput; /** Unique test name as identifier. */ testId?: string; /** The test description. */ description?: string; /** Display name of a test. */ displayName?: string; - /** Fully qualified resource Id e.g /subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ - resourceId?: string; - /** The load test configuration. */ - loadTestConfig?: LoadTestConfigOutput; - /** Pass fail criteria for a test. */ - passFailCriteria?: PassFailCriteriaOutput; - /** The created DateTime(ISO 8601 literal format) of the test model. */ - createdDateTime?: string; - /** The user that created the test model. */ - createdBy?: string; - /** The last Modified DateTime(ISO 8601 literal format) of the test model. */ - lastModifiedDateTime?: string; - /** The user that last modified the test model. */ - lastModifiedBy?: string; - /** The input artifacts for the test. */ - inputArtifacts?: InputTestArtifactsOutput; - /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */ - secrets?: Record; - /** Environment variables which are defined as a set of pairs. */ - environmentVariables?: Record; /** Subnet ID on which the load test instances should run. */ subnetId?: string; /** Type of the managed identity referencing the Key vault. */ keyvaultReferenceIdentityType?: string; /** Resource Id of the managed identity referencing the Key vault. */ keyvaultReferenceIdentityId?: string; -} - -export interface LoadTestConfigOutput { - /** The number of engine instances to execute load test. Supported values are in range of 1-45. Required for creating a new test. */ - engineInstances?: number; - /** Whether all the input CSV files should be split evenly across all engines. */ - splitAllCSVs?: boolean; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: string; + /** The user that last modified. */ + lastModifiedBy?: string; } export interface PassFailCriteriaOutput { @@ -154,138 +42,287 @@ export interface PassFailCriteriaOutput { } export interface PassFailMetricOutput { - /** The client metric on which the criteria should be applied. Allowed values - ‘response_time_ms’ , ‘latency’, ‘error’, ‘requests’, ‘requests_per_sec’. */ - clientmetric?: string; - /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric ,‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests. */ - aggregate?: string; - /** The comparison operator. Supported types ‘>’ */ + /** The client metric on which the criteria should be applied. */ + clientmetric?: + | "response_time_ms" + | "latency" + | "error" + | "requests" + | "requests_per_sec"; + /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests */ + aggregate?: + | "count" + | "percentage" + | "avg" + | "p50" + | "p90" + | "p95" + | "p99" + | "min" + | "max"; + /** The comparison operator. Supported types ‘>’, ‘<’ */ condition?: string; - /** Request name for which the Pass fail criteria has to be applied. */ + /** Request name for which the Pass fail criteria has to be applied */ requestName?: string; /** The value to compare with the client metric. Allowed values - ‘error : [0.0 , 100.0] unit- % ’, response_time_ms and latency : any integer value unit- ms. */ value?: number; - /** Either ‘stop’ or ‘continue’ after the threshold is met. Default is ‘continue’. */ - action?: string; + /** Action taken after the threshold is met. Default is ‘continue’. */ + action?: "stop" | "continue"; /** The actual value of the client metric for the test run. */ actualValue?: number; - /** Outcome of the test run. possible outcome - ‘passed’ , ‘failed’ , ‘undetermined’. */ - result?: string; + /** Outcome of the test run. */ + result?: "passed" | "undetermined" | "failed"; +} + +export interface SecretOutput { + /** The value of the secret for the respective type */ + value?: string; + /** Type of secret */ + type?: "AKV_SECRET_URI" | "SECRET_VALUE"; +} + +export interface CertificateMetadataOutput { + /** The value of the certificate for respective type */ + value?: string; + /** Type of certificate */ + type?: "AKV_CERT_URI"; + /** Name of the certificate. */ + name?: string; +} + +export interface LoadTestConfigurationOutput { + /** The number of engine instances to execute load test. Supported values are in range of 1-45. Required for creating a new test. */ + engineInstances?: number; + /** If false, Azure Load Testing copies and processes your input files unmodified across all test engine instances. If true, Azure Load Testing splits the CSV input data evenly across all engine instances. If you provide multiple CSV files, each file will be split evenly. */ + splitAllCSVs?: boolean; + /** If true, optionalLoadTestConfig is required and JMX script for the load test is not required to upload. */ + quickStartTest?: boolean; + /** Optional load test config */ + optionalLoadTestConfig?: OptionalLoadTestConfigOutput; } -export interface InputTestArtifactsOutput { - /** FileUrl Model. */ - configUrl?: FileUrlOutput; - /** FileUrl Model. */ - testScriptUrl?: FileUrlOutput; - /** FileUrl Model. */ - userPropUrl?: FileUrlOutput; - /** FileUrl Model. */ - inputArtifactsZipFileurl?: FileUrlOutput; - /** The input artifacts file { name : url } map for the test run. */ - additionalUrls?: Array; +export interface OptionalLoadTestConfigOutput { + /** Test URL. Provide the complete HTTP URL. For example, http://contoso-app.azurewebsites.net/login */ + endpointUrl?: string; + /** No of concurrent virtual users */ + vusers?: number; + /** Ramp up time */ + rampUpTime?: number; + /** Test run duration */ + duration?: number; +} + +export interface TestInputArtifactsOutput { + /** File info */ + configFileInfo?: FileInfoOutput; + /** File info */ + testScriptFileInfo?: FileInfoOutput; + /** File info */ + userPropFileInfo?: FileInfoOutput; + /** File info */ + inputArtifactsZipFileInfo?: FileInfoOutput; + /** Additional supported files for the test run */ + additionalFileInfo?: Array; } -export interface FileUrlOutput { +export interface FileInfoOutput { /** File URL. */ url?: string; - /** File unique identifier. */ + /** Unique name for test file. */ fileId?: string; /** Name of the file. */ filename?: string; - /** Integer representation of the file type (0 = JMX_FILE, 1 = USER_PROPERTIES, 2 = ADDITIONAL_ARTIFACTS) */ - fileType?: "0" | "1" | "2"; - /** Expiry time of the file */ - expireTime?: string; + /** File type */ + fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; + /** Expiry time of the file (ISO 8601 literal format) */ + expireDateTime?: string; /** Validation status of the file */ - validationStatus?: string; + validationStatus?: + | "NOT_VALIDATED" + | "VALIDATION_SUCCESS" + | "VALIDATION_FAILURE" + | "VALIDATION_INITIATED" + | "VALIDATION_NOT_REQUIRED"; } -export interface SecretMetadataOutput { - /** The value of the secret, of type AKV_SECRET_URI or SECRET_VALUE */ - value?: string; - /** Type of secret. eg. AKV_SECRET_URI/SECRET_VALUE */ - type?: string; +export interface ErrorResponseBodyOutput { + /** Error from a REST request. */ + error: ErrorModelOutput; } -export interface TestModelResourceListOutput { - /** List of Resources */ - value: Array; - /** Link for the next list of resources in case of paginated results, if applicable */ +export interface ErrorModelOutput { + /** The error code. */ + code: string; + /** The error message. */ + message: string; + /** The error target. */ + target?: string; + /** Additional details and inner errors. */ + details?: Array; +} + +export interface TestsListOutput { + /** List of tests */ + value: Array; + /** Link for the next list of tests in case of paginated results, if applicable */ nextLink?: string; } -export interface FileUrlListOutput { - /** List of file URLs. */ - value: Array; +export interface FileInfoListOutput { + /** List of file info. */ + value: Array; /** Link for the next list of file URLs, if applicable */ nextLink?: string; } -export interface TestRunModelOutput { - /** Unique test run name as identifier. */ +export interface TestAppComponentsOutput { + /** Test identifier */ + testId?: string; + /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ + components: Record; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: string; + /** The user that last modified. */ + lastModifiedBy?: string; +} + +export interface AppComponentOutput { + /** fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} */ + resourceId?: string; + /** Azure resource name, required while creating the app component. */ + resourceName?: string; + /** Azure resource type, required while creating the app component. */ + resourceType?: string; + /** Azure resource display name */ + displayName?: string; + /** Resource group name of the Azure resource */ + resourceGroup?: string; + /** Subscription Id of the Azure resource */ + subscriptionId?: string; + /** Kind of Azure resource type */ + kind?: string; +} + +export interface TestServerMetricConfigOutput { + /** Test identifier */ + testId?: string; + /** Azure resource metrics collection {metric id : metrics object} (Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition for metric id). */ + metrics?: Record; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: string; + /** The user that last modified. */ + lastModifiedBy?: string; +} + +export interface ResourceMetricOutput { + /** Unique name for metric. */ + id?: string; + /** Azure resource id. */ + resourceId: string; + /** Metric name space. */ + metricNamespace: string; + /** Metric description. */ + displayDescription?: string; + /** The localizable string class. */ + name: LocalizableStringOutput; + /** Metric aggregation. */ + aggregation: string; + /** Metric unit. */ + unit?: string; + /** Azure resource type. */ + resourceType: string; +} + +export interface LocalizableStringOutput { + /** The locale specific value. */ + localizedValue?: string; + /** The invariant value. */ + value?: string; +} + +export interface TestRunOutput { + /** Pass fail criteria for a test. */ + passFailCriteria?: PassFailCriteriaOutput; + /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */ + secrets?: Record; + /** Certificates metadata */ + certificate?: CertificateMetadataOutput; + /** Environment variables which are defined as a set of pairs. */ + environmentVariables?: Record; + /** Error details if there is any failure in load test run */ + errorDetails?: Array; + /** Test run statistics. */ + testRunStatistics?: Record; + /** The load test configuration. */ + loadTestConfiguration?: LoadTestConfigurationOutput; + /** Collection of test run artifacts */ + testArtifacts?: TestRunArtifactsOutput; + /** Test result for pass/Fail criteria used during the test run. */ + testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED"; + /** Unique test run name as identifier */ testRunId?: string; - /** Display name of a test run. */ + /** Display name of a testRun. */ displayName?: string; /** Associated test Id. */ testId?: string; - /** Load test resource Id. */ - resourceId?: string; /** The test run description. */ description?: string; /** The test run status. */ - status?: string; + status?: + | "ACCEPTED" + | "NOTSTARTED" + | "PROVISIONING" + | "PROVISIONED" + | "CONFIGURING" + | "CONFIGURED" + | "EXECUTING" + | "EXECUTED" + | "DEPROVISIONING" + | "DEPROVISIONED" + | "DONE" + | "CANCELLING" + | "CANCELLED" + | "FAILED" + | "VALIDATION_SUCCESS" + | "VALIDATION_FAILURE"; /** The test run start DateTime(ISO 8601 literal format). */ startDateTime?: string; /** The test run end DateTime(ISO 8601 literal format). */ endDateTime?: string; - /** The load test configuration. */ - loadTestConfig?: LoadTestConfigOutput; - /** Test result for pass/Fail criteria used during the test run. possible outcome - ‘Passed’ , ‘Failed’ , ‘Not Applicable’. */ - testResult?: string; - /** Pass fail criteria for a test. */ - passFailCriteria?: PassFailCriteriaOutput; - testArtifacts?: TestArtifactsOutput; - /** Test run initiated time */ + /** Test run initiated time. */ executedDateTime?: string; /** Number of virtual users, for which test has been run. */ vusers?: number; - /** Test run statistics */ - testRunStatistics?: Record; - /** The created DateTime(ISO 8601 literal format) of the test run. */ - createdDateTime?: string; - /** The user that created the test run. */ - createdBy?: string; - /** The last updated DateTime(ISO 8601 literal format) of the test run. */ - lastModifiedDateTime?: string; - /** The user that updated the test run. */ - lastModifiedBy?: string; /** Portal url. */ portalUrl?: string; - /** Secrets can be stored in an Azure Key Vault or any other secret store. If the secret is stored in an Azure Key Vault, the value should be the secret identifier and the type should be AKV_SECRET_URI. If the secret is stored elsewhere, the secret value should be provided directly and the type should be SECRET_VALUE. */ - secrets?: Record; - /** Environment variables which are defined as a set of pairs. */ - environmentVariables?: Record; /** Test run duration in milliseconds. */ duration?: number; /** Subnet ID on which the load test instances should run. */ subnetId?: string; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: string; + /** The user that last modified. */ + lastModifiedBy?: string; } -export interface TestArtifactsOutput { - /** The input artifacts for the test. */ - inputArtifacts: InputTestArtifactsOutput; - /** The output artifacts for the test run. */ - outputArtifacts?: OutputTestArtifactsOutput; -} - -export interface OutputTestArtifactsOutput { - /** FileUrl Model. */ - resultUrl?: FileUrlOutput; - /** FileUrl Model. */ - logsUrl?: FileUrlOutput; +export interface ErrorDetailsOutput { + /** Error details in case test run was not successfully run. */ + message?: string; } -export interface TestRunStatisticsModelOutput { +export interface TestRunStatisticsOutput { /** Transaction name. */ transaction?: string; /** Sampler count. */ @@ -312,58 +349,193 @@ export interface TestRunStatisticsModelOutput { throughput?: number; /** Received network bytes. */ receivedKBytesPerSec?: number; - /** Sent network bytes. */ + /** Send network bytes. */ sentKBytesPerSec?: number; } -export interface TestRunModelResourceListOutput { - /** List of Resources */ - value: Array; - /** Link for the next list of resources in case of paginated results, if applicable */ +export interface TestRunArtifactsOutput { + /** The input artifacts for the test run. */ + inputArtifacts?: TestRunInputArtifactsOutput; + /** The output artifacts for the test run. */ + outputArtifacts?: TestRunOutputArtifactsOutput; +} + +export interface TestRunInputArtifactsOutput { + /** File info */ + configFileInfo?: FileInfoOutput; + /** File info */ + testScriptFileInfo?: FileInfoOutput; + /** File info */ + userPropFileInfo?: FileInfoOutput; + /** File info */ + inputArtifactsZipFileInfo?: FileInfoOutput; + /** Additional supported files for the test run */ + additionalFileInfo?: Array; +} + +export interface TestRunOutputArtifactsOutput { + /** File info */ + resultUrl?: FileInfoOutput; + /** File info */ + logsUrl?: FileInfoOutput; +} + +export interface TestRunsListOutput { + /** List of test runs */ + value: Array; + /** Link for the next list of test runs in case of paginated results, if applicable */ nextLink?: string; } -export interface ClientMetricsResultsOutput { - /** Test run name for which client metrics results is required. */ - testRunId?: string; - timeSeries?: SeriesOutput; +export interface MetricNamespaceCollectionOutput { + /** The values for the metric namespaces. */ + value: Array; } -export interface SeriesOutput { - /** Active users time series data. */ - activeUsers?: Record>; - /** Response time, time series data. */ - responseTime?: Record>; - /** Throughput time series data. */ - throughput?: Record>; - /** Errors time series data. */ - errors?: Record>; +export interface MetricNamespaceOutput { + /** The escaped name of the namespace. */ + name?: string; + /** The fully qualified metric namespace name. */ + metricNamespaceName?: string; } -export interface TimeSeriesOutput { - /** Timestamp(ISO 8601 literal format). */ - timestamp?: string; - /** Value at timestamp. */ - value?: number; +export interface MetricDefinitionCollectionOutput { + /** the values for the metric definitions. */ + value: Array; +} + +export interface MetricDefinitionOutput { + /** The name and the display name of the dimension, i.e. it is a localizable string. */ + dimensions?: Array; + /** Detailed description of this metric. */ + displayDescription?: string; + /** The localizable string class. */ + name?: LocalizableStringOutput; + /** The namespace the metric belongs to. */ + namespace?: string; + /** the primary aggregation type value defining how to use the values for display. */ + primaryAggregationType?: + | "Average" + | "Count" + | "Minimum" + | "Maximum" + | "None" + | "Total" + | "Percentile90" + | "Percentile95" + | "Percentile99"; + /** the collection of what aggregation types are supported. */ + supportedAggregationTypes?: Array; + /** The unit of the metric. */ + unit?: + | "NotSpecified" + | "Percent" + | "Count" + | "Seconds" + | "Milliseconds" + | "Bytes" + | "BytesPerSecond" + | "CountPerSecond"; + /** Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. */ + metricAvailabilities?: Array; } -export interface ClientMetricsFiltersOutput { - /** Test run name for which client metrics filters is required. */ +export interface MetricAvailabilityOutput { + /** The time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'PT1H', etc. */ + timeGrain?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; +} + +export interface ResponseOutput { + /** Test run identifier */ testRunId?: string; - filters?: FiltersOutput; - timeRange?: TimeRangeOutput; + /** The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. */ + interval?: string; + /** The namespace of the metrics being queried. */ + namespace?: string; + /** The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. */ + timespan?: string; + /** The result data of a query. */ + value?: MetricOutput; +} + +export interface MetricOutput { + /** The localizable string class. */ + name?: LocalizableStringOutput; + /** The time series returned when a data query is performed. */ + timeseries?: Array; + /** The unit of the metric. */ + unit?: + | "NotSpecified" + | "Percent" + | "Count" + | "Seconds" + | "Milliseconds" + | "Bytes" + | "BytesPerSecond" + | "CountPerSecond"; +} + +export interface TimeSeriesElementOutput { + /** An array of data points representing the metric values. This is only returned if a result type of "Data" is specified. */ + data?: Array; + /** The metadata values */ + metadatavalues?: Array; +} + +export interface MetricValueOutput { + /** The average value in the time range. */ + average?: number; + /** The number of samples in the time range. Can be used to determine the number of values that contributed to the average value. */ + count?: number; + /** The greatest value in the time range. */ + maximum?: number; + /** The least value in the time range. */ + minimum?: number; + /** The timestamp for the metric value in ISO 8601 format. */ + timeStamp?: string; + /** The sum of all of the values in the time range. */ + total?: number; + /** 90th percentile value in the time range. */ + percentile90?: number; + /** 95th percentile value in the time range. */ + percentile95?: number; + /** 99th percentile value in the time range. */ + percentile99?: number; +} + +export interface MetadataValueOutput { + /** The localizable string class. */ + name?: LocalizableStringOutput; + /** The value of the metadata. */ + value?: string; } -export interface FiltersOutput { - /** List of request sampler for the test run, for which client metrics can be filtered. */ - requestSamplerValues?: Array; - /** List of errors occurred for the test run, for which client metrics can be filtered. */ - errorFiltersValues?: Array; +export interface TestRunAppComponentsOutput { + /** Test run identifier */ + testRunId?: string; + /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ + components: Record; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: string; + /** The user that last modified. */ + lastModifiedBy?: string; } -export interface TimeRangeOutput { - /** start DateTime(ISO 8601 literal format) for the requested client metrics filter. */ - startTime?: string; - /** end DateTime(ISO 8601 literal format) for the requested client metrics filter. */ - endTime?: string; +export interface TestRunServerMetricConfigOutput { + /** Test run identifier */ + testRunId?: string; + /** Azure resource metrics collection {metric id : metrics object} (Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition for metric id). */ + metrics?: Record; + /** The creation datetime(ISO 8601 literal format). */ + createdDateTime?: string; + /** The user that created. */ + createdBy?: string; + /** The last Modified datetime(ISO 8601 literal format). */ + lastModifiedDateTime?: string; + /** The user that last modified. */ + lastModifiedBy?: string; } diff --git a/sdk/loadtestservice/load-testing-rest/src/paginateHelper.ts b/sdk/loadtestservice/load-testing-rest/src/paginateHelper.ts index 477bace4a37f..17be16382f32 100644 --- a/sdk/loadtestservice/load-testing-rest/src/paginateHelper.ts +++ b/sdk/loadtestservice/load-testing-rest/src/paginateHelper.ts @@ -1,8 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; -import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import { + getPagedAsyncIterator, + PagedAsyncIterableIterator, + PagedResult +} from "@azure/core-paging"; +import { + Client, + createRestError, + PathUncheckedResponse +} from "@azure-rest/core-client"; /** * Helper type to extract the type of an array @@ -67,16 +75,18 @@ export function paginate( typeof customGetPage === "function" ? customGetPage : async (pageLink: string) => { - const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get(); + const result = firstRun + ? initialResponse + : await client.pathUnchecked(pageLink).get(); firstRun = false; checkPagingRequest(result); const nextLink = getNextLink(result.body, nextLinkName); const values = getElements(result.body, itemName); return { page: values, - nextPageLink: nextLink, + nextPageLink: nextLink }; - }, + } }; return getPagedAsyncIterator(pagedResult); @@ -93,7 +103,9 @@ function getNextLink(body: unknown, nextLinkName?: string): string | undefined { const nextLink = (body as Record)[nextLinkName]; if (typeof nextLink !== "string" && typeof nextLink !== "undefined") { - throw new Error(`Body Property ${nextLinkName} should be a string or undefined`); + throw new Error( + `Body Property ${nextLinkName} should be a string or undefined` + ); } return nextLink; @@ -121,7 +133,18 @@ function getElements(body: unknown, itemName: string): T[] { * Checks if a request failed */ function checkPagingRequest(response: PathUncheckedResponse): void { - const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"]; + const Http2xxStatusCodes = [ + "200", + "201", + "202", + "203", + "204", + "205", + "206", + "207", + "208", + "226" + ]; if (!Http2xxStatusCodes.includes(response.status)) { throw createRestError( `Pagination failed with unexpected statusCode ${response.status}`, diff --git a/sdk/loadtestservice/load-testing-rest/src/parameters.ts b/sdk/loadtestservice/load-testing-rest/src/parameters.ts index 7b1b2197bade..e6da084ab9dd 100644 --- a/sdk/loadtestservice/load-testing-rest/src/parameters.ts +++ b/sdk/loadtestservice/load-testing-rest/src/parameters.ts @@ -3,224 +3,259 @@ import { RequestParameters } from "@azure-rest/core-client"; import { - AppComponentsMap, - ServerMetricsModel, - TestModel, - TestRunModel, - ClientMetricsRequestModel, + Test, + TestAppComponents, + TestServerMetricConfig, + TestRun, + MetricRequestPayload, + TestRunAppComponents, + TestRunServerMetricConfig } from "./models"; -export interface AppComponentCreateOrUpdateAppComponentsBodyParam { - /** App Component model. */ - body: AppComponentsMap; -} - -export interface AppComponentCreateOrUpdateAppComponentsMediaTypesParam { - /** Request content type */ - contentType?: "application/merge-patch+json"; -} - -export type AppComponentCreateOrUpdateAppComponentsParameters = AppComponentCreateOrUpdateAppComponentsMediaTypesParam & - AppComponentCreateOrUpdateAppComponentsBodyParam & - RequestParameters; -export type AppComponentDeleteAppComponentsParameters = RequestParameters; -export type AppComponentGetAppComponentByNameParameters = RequestParameters; - -export interface AppComponentGetAppComponentQueryParamProperties { - /** [Required, if testId is not provided] Test run Id. */ - testRunId?: string; - /** Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$. */ - testId?: string; -} - -export interface AppComponentGetAppComponentQueryParam { - queryParameters?: AppComponentGetAppComponentQueryParamProperties; -} - -export type AppComponentGetAppComponentParameters = AppComponentGetAppComponentQueryParam & - RequestParameters; - -export interface ServerMetricsCreateOrUpdateServerMetricsConfigBodyParam { - /** Server metrics configuration model */ - body: ServerMetricsModel; -} - -export interface ServerMetricsCreateOrUpdateServerMetricsConfigMediaTypesParam { - /** Request content type */ - contentType?: "application/merge-patch+json"; -} - -export type ServerMetricsCreateOrUpdateServerMetricsConfigParameters = ServerMetricsCreateOrUpdateServerMetricsConfigMediaTypesParam & - ServerMetricsCreateOrUpdateServerMetricsConfigBodyParam & - RequestParameters; -export type ServerMetricsGetServerMetricsConfigByNameParameters = RequestParameters; -export type ServerMetricsDeleteServerMetricsConfigParameters = RequestParameters; - -export interface ServerMetricsGetServerMetricsConfigQueryParamProperties { - /** [Required, if testId is not provided] Test run Id. */ - testRunId?: string; - /** Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$. */ - testId?: string; -} - -export interface ServerMetricsGetServerMetricsConfigQueryParam { - queryParameters?: ServerMetricsGetServerMetricsConfigQueryParamProperties; -} - -export type ServerMetricsGetServerMetricsConfigParameters = ServerMetricsGetServerMetricsConfigQueryParam & - RequestParameters; -export type ServerMetricsGetServerDefaultMetricsConfigParameters = RequestParameters; -export type ServerMetricsListSupportedResourceTypesParameters = RequestParameters; - -export interface TestCreateOrUpdateTestBodyParam { +export interface LoadTestAdministrationCreateOrUpdateTestBodyParam { /** Load test model */ - body: TestModel; + body: Test; } -export interface TestCreateOrUpdateTestMediaTypesParam { +export interface LoadTestAdministrationCreateOrUpdateTestMediaTypesParam { /** Request content type */ contentType?: "application/merge-patch+json"; } -export type TestCreateOrUpdateTestParameters = TestCreateOrUpdateTestMediaTypesParam & - TestCreateOrUpdateTestBodyParam & +export type LoadTestAdministrationCreateOrUpdateTestParameters = LoadTestAdministrationCreateOrUpdateTestMediaTypesParam & + LoadTestAdministrationCreateOrUpdateTestBodyParam & RequestParameters; -export type TestDeleteLoadTestParameters = RequestParameters; -export type TestGetLoadTestParameters = RequestParameters; +export type LoadTestAdministrationDeleteTestParameters = RequestParameters; +export type LoadTestAdministrationGetTestParameters = RequestParameters; -export interface TestListLoadTestSearchQueryParamProperties { +export interface LoadTestAdministrationListTestsQueryParamProperties { /** Sort on one of the field - lastModifiedDateTime, displayName, createdBy in (field asc/desc) format. eg: displayName asc. */ - orderBy?: string; + orderby?: string; /** Filter search based on searchable fields - testId, createdBy. */ search?: string; /** Start DateTime(ISO 8601 literal format) of the last updated time range to filter tests. */ - lastUpdatedStartTime?: Date | string; + lastModifiedStartTime?: Date | string; /** End DateTime(ISO 8601 literal format) of the last updated time range to filter tests. */ - lastUpdatedEndTime?: Date | string; - /** Continuation token to get the next page of response. */ + lastModifiedEndTime?: Date | string; + /** Continuation token to get the next page of response */ continuationToken?: string; /** Number of results in response. */ - maxPageSize?: number; + maxpagesize?: number; } -export interface TestListLoadTestSearchQueryParam { - queryParameters?: TestListLoadTestSearchQueryParamProperties; +export interface LoadTestAdministrationListTestsQueryParam { + queryParameters?: LoadTestAdministrationListTestsQueryParamProperties; } -export type TestListLoadTestSearchParameters = TestListLoadTestSearchQueryParam & RequestParameters; +export type LoadTestAdministrationListTestsParameters = LoadTestAdministrationListTestsQueryParam & + RequestParameters; -export interface TestUploadTestFileBodyParam { - body: TestUploadTestFileFormBody; +export interface LoadTestAdministrationUploadFileBodyParam { + body: LoadTestAdministrationUploadFileFormBody; } -export interface TestUploadTestFileFormBody { +export interface LoadTestAdministrationUploadFileFormBody { /** - * The file to be uploaded. + * The file to be uploaded as multipart form-data. * * Value may contain any sequence of octets */ - file: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; + file: + | string + | Uint8Array + | ReadableStream + | NodeJS.ReadableStream; } -export interface TestUploadTestFileQueryParamProperties { - /** Integer representation of the file type (0 = JMX_FILE, 1 = USER_PROPERTIES, 2 = ADDITIONAL_ARTIFACTS). */ - fileType?: number; +export interface LoadTestAdministrationUploadFileQueryParamProperties { + /** File type */ + fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; } -export interface TestUploadTestFileQueryParam { - queryParameters?: TestUploadTestFileQueryParamProperties; +export interface LoadTestAdministrationUploadFileQueryParam { + queryParameters?: LoadTestAdministrationUploadFileQueryParamProperties; } -export interface TestUploadTestFileMediaTypesParam { +export interface LoadTestAdministrationUploadFileMediaTypesParam { /** Request content type */ contentType?: "multipart/form-data"; } -export type TestUploadTestFileParameters = TestUploadTestFileQueryParam & - TestUploadTestFileMediaTypesParam & - TestUploadTestFileBodyParam & +export type LoadTestAdministrationUploadFileParameters = LoadTestAdministrationUploadFileQueryParam & + LoadTestAdministrationUploadFileMediaTypesParam & + LoadTestAdministrationUploadFileBodyParam & RequestParameters; -export type TestGetTestFileParameters = RequestParameters; -export type TestDeleteTestFileParameters = RequestParameters; +export type LoadTestAdministrationGetFileParameters = RequestParameters; +export type LoadTestAdministrationDeleteFileParameters = RequestParameters; -export interface TestListTestFilesQueryParamProperties { - /** Continuation token to get the next page of response. */ +export interface LoadTestAdministrationListFilesTestQueryParamProperties { + /** Continuation token to get the next page of response */ continuationToken?: string; } -export interface TestListTestFilesQueryParam { - queryParameters?: TestListTestFilesQueryParamProperties; +export interface LoadTestAdministrationListFilesTestQueryParam { + queryParameters?: LoadTestAdministrationListFilesTestQueryParamProperties; +} + +export type LoadTestAdministrationListFilesTestParameters = LoadTestAdministrationListFilesTestQueryParam & + RequestParameters; + +export interface LoadTestAdministrationCreateOrUpdateAppComponentTestBodyParam { + /** App Component model. */ + body: TestAppComponents; } -export type TestListTestFilesParameters = TestListTestFilesQueryParam & RequestParameters; -export type TestRunDeleteTestRunParameters = RequestParameters; +export interface LoadTestAdministrationCreateOrUpdateAppComponentTestMediaTypesParam { + /** Request content type */ + contentType?: "application/merge-patch+json"; +} -export interface TestRunCreateOrUpdateTestRunBodyParam { +export type LoadTestAdministrationCreateOrUpdateAppComponentTestParameters = LoadTestAdministrationCreateOrUpdateAppComponentTestMediaTypesParam & + LoadTestAdministrationCreateOrUpdateAppComponentTestBodyParam & + RequestParameters; +export type LoadTestAdministrationGetAppComponentsTestParameters = RequestParameters; + +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestBodyParam { + /** Server metric configuration model. */ + body: TestServerMetricConfig; +} + +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestMediaTypesParam { + /** Request content type */ + contentType?: "application/merge-patch+json"; +} + +export type LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters = LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestMediaTypesParam & + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestBodyParam & + RequestParameters; +export type LoadTestAdministrationGetServerMetricsConfigTestParameters = RequestParameters; +export type TestRunDeleteParameters = RequestParameters; + +export interface TestRunCreateOrUpdateBodyParam { /** Load test run model */ - body: TestRunModel; + body: TestRun; } -export interface TestRunCreateOrUpdateTestRunQueryParamProperties { - /** Existing test run Id that should be rerun. */ +export interface TestRunCreateOrUpdateQueryParamProperties { + /** 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. */ oldTestRunId?: string; } -export interface TestRunCreateOrUpdateTestRunQueryParam { - queryParameters?: TestRunCreateOrUpdateTestRunQueryParamProperties; +export interface TestRunCreateOrUpdateQueryParam { + queryParameters?: TestRunCreateOrUpdateQueryParamProperties; } -export interface TestRunCreateOrUpdateTestRunMediaTypesParam { +export interface TestRunCreateOrUpdateMediaTypesParam { /** Request content type */ contentType?: "application/merge-patch+json"; } -export type TestRunCreateOrUpdateTestRunParameters = TestRunCreateOrUpdateTestRunQueryParam & - TestRunCreateOrUpdateTestRunMediaTypesParam & - TestRunCreateOrUpdateTestRunBodyParam & +export type TestRunCreateOrUpdateParameters = TestRunCreateOrUpdateQueryParam & + TestRunCreateOrUpdateMediaTypesParam & + TestRunCreateOrUpdateBodyParam & RequestParameters; -export type TestRunGetTestRunParameters = RequestParameters; -export type TestRunGetTestRunFileParameters = RequestParameters; +export type TestRunGetParameters = RequestParameters; +export type TestRunGetFileParameters = RequestParameters; -export interface TestRunListTestRunsQueryParamProperties { +export interface TestRunListQueryParamProperties { /** Sort on one of the field - status, displayName, executedDateTime in (field asc/desc) format. eg: displayName asc. */ - orderBy?: string; - /** Continuation token to get the next page of response. */ + orderby?: string; + /** Continuation token to get the next page of response */ continuationToken?: string; /** Filter search based on searchable fields - description, executedUser. */ search?: string; - /** The end DateTime(ISO 8601 literal format) of test-run execution time filter range. */ + /** Unique name of an existing load test. */ + testId?: string; + /** Start DateTime(ISO 8601 literal format) of test-run execution time filter range. */ executionFrom?: Date | string; - /** The start DateTime(ISO 8601 literal format) of test-run execution time filter range. */ + /** End DateTime(ISO 8601 literal format) of test-run execution time filter range. */ executionTo?: Date | string; - /** - * Comma separated list of test run status, value can be - "ACCEPTED", "NOTSTARTED","PROVISIONING","PROVISIONED","CONFIGURING", - * "CONFIGURED","EXECUTING","EXECUTED","DEPROVISIONING","DEPROVISIONED","DONE","CANCELLED","FAILED". - */ + /** Comma separated list of test run status. */ status?: string; /** Number of results in response. */ - maxPageSize?: number; - /** Unique name for load test, must be a valid URL character ^[a-z0-9_-]*$. */ - testId?: string; + maxpagesize?: number; +} + +export interface TestRunListQueryParam { + queryParameters?: TestRunListQueryParamProperties; +} + +export type TestRunListParameters = TestRunListQueryParam & RequestParameters; +export type TestRunStopParameters = RequestParameters; +export type TestRunListMetricNamespacesParameters = RequestParameters; + +export interface TestRunListMetricDefinitionsQueryParamProperties { + /** Metric namespace to query metric definitions for. */ + metricNamespace: string; +} + +export interface TestRunListMetricDefinitionsQueryParam { + queryParameters: TestRunListMetricDefinitionsQueryParamProperties; } -export interface TestRunListTestRunsQueryParam { - queryParameters?: TestRunListTestRunsQueryParamProperties; +export type TestRunListMetricDefinitionsParameters = TestRunListMetricDefinitionsQueryParam & + RequestParameters; + +export interface TestRunGetMetricsBodyParam { + /** Metric metadata filter to fetch the set of metric */ + body?: MetricRequestPayload; } -export type TestRunListTestRunsParameters = TestRunListTestRunsQueryParam & RequestParameters; -export type TestRunStopTestRunParameters = RequestParameters; +export interface TestRunGetMetricsQueryParamProperties { + /** The list of aggregation types (comma separated) to retrieve. */ + aggregation?: string; + /** The interval (i.e. timegrain) of the query. */ + interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; + /** Metric name */ + metricname: string; + /** Metric namespace to query metric definitions for. */ + metricNamespace: string; + /** Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. */ + resultType: "Data" | "Metadata"; + /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */ + timespan: string; +} -export interface TestRunGetTestRunClientMetricsBodyParam { - /** Client metrics request model */ - body: ClientMetricsRequestModel; +export interface TestRunGetMetricsQueryParam { + queryParameters: TestRunGetMetricsQueryParamProperties; } -export interface TestRunGetTestRunClientMetricsMediaTypesParam { +export interface TestRunGetMetricsMediaTypesParam { /** Request content type */ contentType?: "application/json"; } -export type TestRunGetTestRunClientMetricsParameters = TestRunGetTestRunClientMetricsMediaTypesParam & - TestRunGetTestRunClientMetricsBodyParam & +export type TestRunGetMetricsParameters = TestRunGetMetricsQueryParam & + TestRunGetMetricsMediaTypesParam & + TestRunGetMetricsBodyParam & + RequestParameters; + +export interface TestRunCreateOrUpdateAppComponentBodyParam { + /** App Component model. */ + body: TestRunAppComponents; +} + +export interface TestRunCreateOrUpdateAppComponentMediaTypesParam { + /** Request content type */ + contentType?: "application/merge-patch+json"; +} + +export type TestRunCreateOrUpdateAppComponentParameters = TestRunCreateOrUpdateAppComponentMediaTypesParam & + TestRunCreateOrUpdateAppComponentBodyParam & + RequestParameters; +export type TestRunGetAppComponentsParameters = RequestParameters; + +export interface TestRunCreateOrUpdateServerMetricsConfigBodyParam { + /** Server metric configuration model. */ + body: TestRunServerMetricConfig; +} + +export interface TestRunCreateOrUpdateServerMetricsConfigMediaTypesParam { + /** Request content type */ + contentType?: "application/merge-patch+json"; +} + +export type TestRunCreateOrUpdateServerMetricsConfigParameters = TestRunCreateOrUpdateServerMetricsConfigMediaTypesParam & + TestRunCreateOrUpdateServerMetricsConfigBodyParam & RequestParameters; -export type TestRunGetTestRunClientMetricsFiltersParameters = RequestParameters; +export type TestRunGetServerMetricsConfigParameters = RequestParameters; diff --git a/sdk/loadtestservice/load-testing-rest/src/responses.ts b/sdk/loadtestservice/load-testing-rest/src/responses.ts index 8eb9b6c71dc2..65a8483cf5ce 100644 --- a/sdk/loadtestservice/load-testing-rest/src/responses.ts +++ b/sdk/loadtestservice/load-testing-rest/src/responses.ts @@ -4,504 +4,538 @@ import { RawHttpHeaders } from "@azure/core-rest-pipeline"; import { HttpResponse } from "@azure-rest/core-client"; import { - AppComponentsMapOutput, + TestOutput, ErrorResponseBodyOutput, - ServerMetricsModelOutput, - DefaultServerMetricsConfigListModelOutput, - SupportedResourceTypeOutput, - TestModelOutput, - TestModelResourceListOutput, - FileUrlOutput, - FileUrlListOutput, - TestRunModelOutput, - TestRunModelResourceListOutput, - ClientMetricsResultsOutput, - ClientMetricsFiltersOutput, + TestsListOutput, + FileInfoOutput, + FileInfoListOutput, + TestAppComponentsOutput, + TestServerMetricConfigOutput, + TestRunOutput, + TestRunsListOutput, + MetricNamespaceCollectionOutput, + MetricDefinitionCollectionOutput, + ResponseOutput, + TestRunAppComponentsOutput, + TestRunServerMetricConfigOutput } from "./outputModels"; -/** Associate an App Component (Azure resource) to a test or test run. */ -export interface AppComponentCreateOrUpdateAppComponents200Response extends HttpResponse { +/** Create a new test or update an existing test. */ +export interface LoadTestAdministrationCreateOrUpdateTest200Response + extends HttpResponse { status: "200"; - body: AppComponentsMapOutput; + body: TestOutput; } -/** Associate an App Component (Azure resource) to a test or test run. */ -export interface AppComponentCreateOrUpdateAppComponents201Response extends HttpResponse { +/** Create a new test or update an existing test. */ +export interface LoadTestAdministrationCreateOrUpdateTest201Response + extends HttpResponse { status: "201"; - body: AppComponentsMapOutput; + body: TestOutput; } -export interface AppComponentCreateOrUpdateAppComponentsdefaultHeaders { +export interface LoadTestAdministrationCreateOrUpdateTestdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Associate an App Component (Azure resource) to a test or test run. */ -export interface AppComponentCreateOrUpdateAppComponentsdefaultResponse extends HttpResponse { +/** Create a new test or update an existing test. */ +export interface LoadTestAdministrationCreateOrUpdateTestdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & AppComponentCreateOrUpdateAppComponentsdefaultHeaders; + headers: RawHttpHeaders & + LoadTestAdministrationCreateOrUpdateTestdefaultHeaders; } -/** Delete an App Component. */ -export interface AppComponentDeleteAppComponents204Response extends HttpResponse { +/** Delete a test by its name. */ +export interface LoadTestAdministrationDeleteTest204Response + extends HttpResponse { status: "204"; body: Record; } -export interface AppComponentDeleteAppComponentsdefaultHeaders { +export interface LoadTestAdministrationDeleteTestdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Delete an App Component. */ -export interface AppComponentDeleteAppComponentsdefaultResponse extends HttpResponse { +/** Delete a test by its name. */ +export interface LoadTestAdministrationDeleteTestdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & AppComponentDeleteAppComponentsdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationDeleteTestdefaultHeaders; } -/** Get App Component details by App Component name. */ -export interface AppComponentGetAppComponentByName200Response extends HttpResponse { +/** Get load test details by test name */ +export interface LoadTestAdministrationGetTest200Response extends HttpResponse { status: "200"; - body: AppComponentsMapOutput; + body: TestOutput; } -export interface AppComponentGetAppComponentByNamedefaultHeaders { +export interface LoadTestAdministrationGetTestdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get App Component details by App Component name. */ -export interface AppComponentGetAppComponentByNamedefaultResponse extends HttpResponse { +/** Get load test details by test name */ +export interface LoadTestAdministrationGetTestdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & AppComponentGetAppComponentByNamedefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationGetTestdefaultHeaders; } -/** Get App Components for a test or a test run by its name. */ -export interface AppComponentGetAppComponent200Response extends HttpResponse { +/** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ +export interface LoadTestAdministrationListTests200Response + extends HttpResponse { status: "200"; - body: AppComponentsMapOutput; + body: TestsListOutput; } -export interface AppComponentGetAppComponentdefaultHeaders { +export interface LoadTestAdministrationListTestsdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get App Components for a test or a test run by its name. */ -export interface AppComponentGetAppComponentdefaultResponse extends HttpResponse { +/** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ +export interface LoadTestAdministrationListTestsdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & AppComponentGetAppComponentdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationListTestsdefaultHeaders; } -/** Configure server metrics for a test or test run */ -export interface ServerMetricsCreateOrUpdateServerMetricsConfig200Response extends HttpResponse { - status: "200"; - body: ServerMetricsModelOutput; -} - -/** Configure server metrics for a test or test run */ -export interface ServerMetricsCreateOrUpdateServerMetricsConfig201Response extends HttpResponse { +/** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ +export interface LoadTestAdministrationUploadFile201Response + extends HttpResponse { status: "201"; - body: ServerMetricsModelOutput; + body: FileInfoOutput; } -export interface ServerMetricsCreateOrUpdateServerMetricsConfigdefaultHeaders { +export interface LoadTestAdministrationUploadFiledefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Configure server metrics for a test or test run */ -export interface ServerMetricsCreateOrUpdateServerMetricsConfigdefaultResponse +/** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ +export interface LoadTestAdministrationUploadFiledefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & ServerMetricsCreateOrUpdateServerMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationUploadFiledefaultHeaders; } -/** Get server metrics configuration by its name. */ -export interface ServerMetricsGetServerMetricsConfigByName200Response extends HttpResponse { +/** Get test file by the file name. */ +export interface LoadTestAdministrationGetFile200Response extends HttpResponse { status: "200"; - body: ServerMetricsModelOutput; + body: FileInfoOutput; } -export interface ServerMetricsGetServerMetricsConfigByNamedefaultHeaders { +export interface LoadTestAdministrationGetFiledefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get server metrics configuration by its name. */ -export interface ServerMetricsGetServerMetricsConfigByNamedefaultResponse extends HttpResponse { +/** Get test file by the file name. */ +export interface LoadTestAdministrationGetFiledefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & ServerMetricsGetServerMetricsConfigByNamedefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationGetFiledefaultHeaders; } -/** Delete server metrics configuration by its name */ -export interface ServerMetricsDeleteServerMetricsConfig204Response extends HttpResponse { +/** Delete file by the file name for a test */ +export interface LoadTestAdministrationDeleteFile204Response + extends HttpResponse { status: "204"; body: Record; } -export interface ServerMetricsDeleteServerMetricsConfigdefaultHeaders { +export interface LoadTestAdministrationDeleteFiledefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Delete server metrics configuration by its name */ -export interface ServerMetricsDeleteServerMetricsConfigdefaultResponse extends HttpResponse { +/** Delete file by the file name for a test */ +export interface LoadTestAdministrationDeleteFiledefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & ServerMetricsDeleteServerMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationDeleteFiledefaultHeaders; } -/** Get server metrics configuration for a test or test run by its name. */ -export interface ServerMetricsGetServerMetricsConfig200Response extends HttpResponse { +/** Get all test files. */ +export interface LoadTestAdministrationListFilesTest200Response + extends HttpResponse { status: "200"; - body: ServerMetricsModelOutput; + body: FileInfoListOutput; } -export interface ServerMetricsGetServerMetricsConfigdefaultHeaders { +export interface LoadTestAdministrationListFilesTestdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get server metrics configuration for a test or test run by its name. */ -export interface ServerMetricsGetServerMetricsConfigdefaultResponse extends HttpResponse { +/** Get all test files. */ +export interface LoadTestAdministrationListFilesTestdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & ServerMetricsGetServerMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationListFilesTestdefaultHeaders; } -/** Get all default server metrics configuration for supported resource types. */ -export interface ServerMetricsGetServerDefaultMetricsConfig200Response extends HttpResponse { +/** Associate an app component (collection of azure resources) to a test */ +export interface LoadTestAdministrationCreateOrUpdateAppComponentTest200Response + extends HttpResponse { status: "200"; - body: DefaultServerMetricsConfigListModelOutput; + body: TestAppComponentsOutput; } -export interface ServerMetricsGetServerDefaultMetricsConfigdefaultHeaders { +/** Associate an app component (collection of azure resources) to a test */ +export interface LoadTestAdministrationCreateOrUpdateAppComponentTest201Response + extends HttpResponse { + status: "201"; + body: TestAppComponentsOutput; +} + +export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get all default server metrics configuration for supported resource types. */ -export interface ServerMetricsGetServerDefaultMetricsConfigdefaultResponse extends HttpResponse { +/** Associate an app component (collection of azure resources) to a test */ +export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & ServerMetricsGetServerDefaultMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & + LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders; } -/** Get all supported resource types for App Components(Azure resource types). */ -export interface ServerMetricsListSupportedResourceTypes200Response extends HttpResponse { +/** Get associated app component (collection of azure resources) for the given test. */ +export interface LoadTestAdministrationGetAppComponentsTest200Response + extends HttpResponse { status: "200"; - body: SupportedResourceTypeOutput; + body: TestAppComponentsOutput; } -export interface ServerMetricsListSupportedResourceTypesdefaultHeaders { +export interface LoadTestAdministrationGetAppComponentsTestdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get all supported resource types for App Components(Azure resource types). */ -export interface ServerMetricsListSupportedResourceTypesdefaultResponse extends HttpResponse { +/** Get associated app component (collection of azure resources) for the given test. */ +export interface LoadTestAdministrationGetAppComponentsTestdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & ServerMetricsListSupportedResourceTypesdefaultHeaders; + headers: RawHttpHeaders & + LoadTestAdministrationGetAppComponentsTestdefaultHeaders; } -/** Create a new test or Update an existing test. */ -export interface TestCreateOrUpdateTest200Response extends HttpResponse { +/** Configure server metrics for a test */ +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response + extends HttpResponse { status: "200"; - body: TestModelOutput; + body: TestServerMetricConfigOutput; } -/** Create a new test or Update an existing test. */ -export interface TestCreateOrUpdateTest201Response extends HttpResponse { +/** Configure server metrics for a test */ +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response + extends HttpResponse { status: "201"; - body: TestModelOutput; + body: TestServerMetricConfigOutput; } -export interface TestCreateOrUpdateTestdefaultHeaders { +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Create a new test or Update an existing test. */ -export interface TestCreateOrUpdateTestdefaultResponse extends HttpResponse { +/** Configure server metrics for a test */ +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestCreateOrUpdateTestdefaultHeaders; + headers: RawHttpHeaders & + LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultHeaders; } -/** Delete a test by its name. */ -export interface TestDeleteLoadTest204Response extends HttpResponse { - status: "204"; - body: Record; +/** Get server metric configuration for the given test. */ +export interface LoadTestAdministrationGetServerMetricsConfigTest200Response + extends HttpResponse { + status: "200"; + body: TestServerMetricConfigOutput; } -export interface TestDeleteLoadTestdefaultHeaders { +export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Delete a test by its name. */ -export interface TestDeleteLoadTestdefaultResponse extends HttpResponse { +/** Get server metric configuration for the given test. */ +export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestDeleteLoadTestdefaultHeaders; + headers: RawHttpHeaders & + LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders; } -/** Get load test details by test name */ -export interface TestGetLoadTest200Response extends HttpResponse { - status: "200"; - body: TestModelOutput; +/** Delete a test run by its name. */ +export interface TestRunDelete204Response extends HttpResponse { + status: "204"; + body: Record; } -export interface TestGetLoadTestdefaultHeaders { +export interface TestRunDeletedefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get load test details by test name */ -export interface TestGetLoadTestdefaultResponse extends HttpResponse { +/** Delete a test run by its name. */ +export interface TestRunDeletedefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestGetLoadTestdefaultHeaders; + headers: RawHttpHeaders & TestRunDeletedefaultHeaders; } -/** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ -export interface TestListLoadTestSearch200Response extends HttpResponse { +/** Create and start a new test run with the given name. */ +export interface TestRunCreateOrUpdate200Response extends HttpResponse { status: "200"; - body: TestModelResourceListOutput; + body: TestRunOutput; } -export interface TestListLoadTestSearchdefaultHeaders { +export interface TestRunCreateOrUpdatedefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ -export interface TestListLoadTestSearchdefaultResponse extends HttpResponse { +/** Create and start a new test run with the given name. */ +export interface TestRunCreateOrUpdatedefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestListLoadTestSearchdefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdatedefaultHeaders; } -/** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ -export interface TestUploadTestFile201Response extends HttpResponse { - status: "201"; - body: FileUrlOutput; +/** Get test run details by name. */ +export interface TestRunGet200Response extends HttpResponse { + status: "200"; + body: TestRunOutput; } -export interface TestUploadTestFiledefaultHeaders { +export interface TestRunGetdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ -export interface TestUploadTestFiledefaultResponse extends HttpResponse { +/** Get test run details by name. */ +export interface TestRunGetdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestUploadTestFiledefaultHeaders; + headers: RawHttpHeaders & TestRunGetdefaultHeaders; } -/** Get test file by the file name. */ -export interface TestGetTestFile200Response extends HttpResponse { +/** Get test run file by file name. */ +export interface TestRunGetFile200Response extends HttpResponse { status: "200"; - body: FileUrlOutput; + body: FileInfoOutput; } -export interface TestGetTestFiledefaultHeaders { +export interface TestRunGetFiledefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get test file by the file name. */ -export interface TestGetTestFiledefaultResponse extends HttpResponse { +/** Get test run file by file name. */ +export interface TestRunGetFiledefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestGetTestFiledefaultHeaders; + headers: RawHttpHeaders & TestRunGetFiledefaultHeaders; } -/** Delete file by the file name for a test. */ -export interface TestDeleteTestFile204Response extends HttpResponse { - status: "204"; - body: Record; +/** Get all test runs with given filters */ +export interface TestRunList200Response extends HttpResponse { + status: "200"; + body: TestRunsListOutput; } -export interface TestDeleteTestFiledefaultHeaders { +export interface TestRunListdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Delete file by the file name for a test. */ -export interface TestDeleteTestFiledefaultResponse extends HttpResponse { +/** Get all test runs with given filters */ +export interface TestRunListdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestDeleteTestFiledefaultHeaders; + headers: RawHttpHeaders & TestRunListdefaultHeaders; } -/** Get all test files. */ -export interface TestListTestFiles200Response extends HttpResponse { +/** Stop test run by name. */ +export interface TestRunStop200Response extends HttpResponse { status: "200"; - body: FileUrlListOutput; + body: TestRunOutput; } -export interface TestListTestFilesdefaultHeaders { +export interface TestRunStopdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get all test files. */ -export interface TestListTestFilesdefaultResponse extends HttpResponse { +/** Stop test run by name. */ +export interface TestRunStopdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestListTestFilesdefaultHeaders; + headers: RawHttpHeaders & TestRunStopdefaultHeaders; } -/** Delete a test run by its name. */ -export interface TestRunDeleteTestRun204Response extends HttpResponse { - status: "204"; - body: Record; +/** Lists the metric namespaces for a load test run. */ +export interface TestRunListMetricNamespaces200Response extends HttpResponse { + status: "200"; + body: MetricNamespaceCollectionOutput; } -export interface TestRunDeleteTestRundefaultHeaders { +export interface TestRunListMetricNamespacesdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Delete a test run by its name. */ -export interface TestRunDeleteTestRundefaultResponse extends HttpResponse { +/** Lists the metric namespaces for a load test run. */ +export interface TestRunListMetricNamespacesdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunDeleteTestRundefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricNamespacesdefaultHeaders; } -/** Create and start a new test run with the given name. */ -export interface TestRunCreateOrUpdateTestRun200Response extends HttpResponse { +/** Lists the metric definitions for a load test run. */ +export interface TestRunListMetricDefinitions200Response extends HttpResponse { status: "200"; - body: TestRunModelOutput; + body: MetricDefinitionCollectionOutput; } -export interface TestRunCreateOrUpdateTestRundefaultHeaders { +export interface TestRunListMetricDefinitionsdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Create and start a new test run with the given name. */ -export interface TestRunCreateOrUpdateTestRundefaultResponse extends HttpResponse { +/** Lists the metric definitions for a load test run. */ +export interface TestRunListMetricDefinitionsdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunCreateOrUpdateTestRundefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricDefinitionsdefaultHeaders; } -/** Get test run details by name. */ -export interface TestRunGetTestRun200Response extends HttpResponse { +/** Lists the metric values for a load test run. */ +export interface TestRunGetMetrics200Response extends HttpResponse { status: "200"; - body: TestRunModelOutput; + body: ResponseOutput; } -export interface TestRunGetTestRundefaultHeaders { +export interface TestRunGetMetricsdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get test run details by name. */ -export interface TestRunGetTestRundefaultResponse extends HttpResponse { +/** Lists the metric values for a load test run. */ +export interface TestRunGetMetricsdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetTestRundefaultHeaders; + headers: RawHttpHeaders & TestRunGetMetricsdefaultHeaders; } -/** Get test run file by file name. */ -export interface TestRunGetTestRunFile200Response extends HttpResponse { +/** Associate an app component (collection of azure resources) to a test run */ +export interface TestRunCreateOrUpdateAppComponent200Response + extends HttpResponse { status: "200"; - body: FileUrlOutput; -} - -export interface TestRunGetTestRunFiledefaultHeaders { - /** The error code for specific error that occurred. */ - "x-ms-error-code"?: string; + body: TestRunAppComponentsOutput; } -/** Get test run file by file name. */ -export interface TestRunGetTestRunFiledefaultResponse extends HttpResponse { - status: string; - body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetTestRunFiledefaultHeaders; -} - -/** Get all test runs with given filters */ -export interface TestRunListTestRuns200Response extends HttpResponse { - status: "200"; - body: TestRunModelResourceListOutput; +/** Associate an app component (collection of azure resources) to a test run */ +export interface TestRunCreateOrUpdateAppComponent201Response + extends HttpResponse { + status: "201"; + body: TestRunAppComponentsOutput; } -export interface TestRunListTestRunsdefaultHeaders { +export interface TestRunCreateOrUpdateAppComponentdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get all test runs with given filters */ -export interface TestRunListTestRunsdefaultResponse extends HttpResponse { +/** Associate an app component (collection of azure resources) to a test run */ +export interface TestRunCreateOrUpdateAppComponentdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunListTestRunsdefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentdefaultHeaders; } -/** Stop test run by name. */ -export interface TestRunStopTestRun200Response extends HttpResponse { +/** Get associated app component (collection of azure resources) for the given test run. */ +export interface TestRunGetAppComponents200Response extends HttpResponse { status: "200"; - body: TestRunModelOutput; + body: TestRunAppComponentsOutput; } -export interface TestRunStopTestRundefaultHeaders { +export interface TestRunGetAppComponentsdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Stop test run by name. */ -export interface TestRunStopTestRundefaultResponse extends HttpResponse { +/** Get associated app component (collection of azure resources) for the given test run. */ +export interface TestRunGetAppComponentsdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunStopTestRundefaultHeaders; + headers: RawHttpHeaders & TestRunGetAppComponentsdefaultHeaders; } -/** Get all client metrics for a load test run. */ -export interface TestRunGetTestRunClientMetrics200Response extends HttpResponse { +/** Configure server metrics for a test run */ +export interface TestRunCreateOrUpdateServerMetricsConfig200Response + extends HttpResponse { status: "200"; - body: ClientMetricsResultsOutput; + body: TestRunServerMetricConfigOutput; } -export interface TestRunGetTestRunClientMetricsdefaultHeaders { +/** Configure server metrics for a test run */ +export interface TestRunCreateOrUpdateServerMetricsConfig201Response + extends HttpResponse { + status: "201"; + body: TestRunServerMetricConfigOutput; +} + +export interface TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get all client metrics for a load test run. */ -export interface TestRunGetTestRunClientMetricsdefaultResponse extends HttpResponse { +/** Configure server metrics for a test run */ +export interface TestRunCreateOrUpdateServerMetricsConfigdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetTestRunClientMetricsdefaultHeaders; + headers: RawHttpHeaders & + TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders; } -/** Get all filters that are supported for client metrics for a given load test run */ -export interface TestRunGetTestRunClientMetricsFilters200Response extends HttpResponse { +/** Get server metric configuration for the given test run. */ +export interface TestRunGetServerMetricsConfig200Response extends HttpResponse { status: "200"; - body: ClientMetricsFiltersOutput; + body: TestRunServerMetricConfigOutput; } -export interface TestRunGetTestRunClientMetricsFiltersdefaultHeaders { +export interface TestRunGetServerMetricsConfigdefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get all filters that are supported for client metrics for a given load test run */ -export interface TestRunGetTestRunClientMetricsFiltersdefaultResponse extends HttpResponse { +/** Get server metric configuration for the given test run. */ +export interface TestRunGetServerMetricsConfigdefaultResponse + extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetTestRunClientMetricsFiltersdefaultHeaders; + headers: RawHttpHeaders & TestRunGetServerMetricsConfigdefaultHeaders; } diff --git a/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts deleted file mode 100644 index 9cfd49def5a0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, env } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createRecorder, createClient } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; - -describe("Create app component", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create the app components", async () => { - const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; - const result = await client.path("/appcomponents/{name}", "appcomp123").patch({ - contentType: "application/merge-patch+json", - body: { - name: "app_component", - testId: "abc", - value: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - assert.include(["200", "201"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts deleted file mode 100644 index 264737c8c6e0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createClient, createRecorder } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; -import * as fs from "fs"; -import { isNode } from "@azure/core-util"; - -describe("File Upload", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - let readStream: fs.ReadStream; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - if (!isNode || isPlaybackMode()) { - this.skip(); - } - client = createClient(recorder); - readStream = fs.createReadStream("./test/public/sample.jmx"); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should upload the test file", async () => { - const result = await client.path("/loadtests/{testId}/files/{fileId}", "abc", "xyz12365").put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, - }); - - assert.include(["201"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts deleted file mode 100644 index 5d1730a3bb60..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { assert } from "chai"; -import { createClient, createRecorder } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; -import { Recorder } from "@azure-tools/test-recorder"; - -describe("Test Creation", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create a loadtest", async () => { - const result = await client.path("/loadtests/{testId}", "abc").patch({ - contentType: "application/merge-patch+json", - body: { - displayName: "sample_test", - description: "", - loadTestConfig: { - engineInstances: 1, - splitAllCSVs: false, - }, - }, - }); - - assert.include(["200", "201"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx b/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx deleted file mode 100644 index a8d909ef60fa..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - false - false - - - - - - - - continue - - false - 10 - - 50 - 2 - 1515063650000 - 1515063650000 - false - 60 - - true - - - - - - - microsoft.com - - - - / - GET - true - false - true - false - - - - - - - - false - - saveConfig - - - true - true - true - - true - true - true - true - false - true - true - false - false - false - true - false - false - false - true - 0 - true - true - true - true - true - true - - - - - - - - diff --git a/sdk/loadtestservice/load-testing-rest/test/public/sampleTest.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..94aac19dfb0b --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/sampleTest.spec.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createRecorder } from "./utils/recordedClient"; +import { Context } from "mocha"; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = await createRecorder(this); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + assert.equal(1, 1); + }); +}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts deleted file mode 100644 index 478d912459a0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createRecorder, createClient } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; - -describe("Test Run Creation", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create a test run", async () => { - const result = await client.path("/testruns/{testRunId}", "abcde").patch({ - contentType: "application/merge-patch+json", - body: { - testId: "abc", - displayName: "sample_testrun", - vusers: 10, - }, - }); - - assert.include(["200"], result.status); - }); - - it("should get a test run", async () => { - const result = await client.path("/testruns/{testRunId}", "abcde").get(); - - assert.include(["200"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/utils/recordedClient.ts b/sdk/loadtestservice/load-testing-rest/test/public/utils/recordedClient.ts index 3945f0537e9e..a233982406d0 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/utils/recordedClient.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/utils/recordedClient.ts @@ -1,50 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import AzureLoadTesting, { AzureLoadTestingClient } from "../../../src"; + import { Context } from "mocha"; -import { Recorder, env, RecorderStartOptions } from "@azure-tools/test-recorder"; +import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; import "./env"; -import { ClientOptions } from "@azure-rest/core-client"; -import { createTestCredential } from "@azure-tools/test-credential"; - -const credential = createTestCredential(); - const envSetupForPlayback: Record = { - LOADTESTSERVICE_ENDPOINT: "endpoint", + ENDPOINT: "https://endpoint", AZURE_CLIENT_ID: "azure_client_id", AZURE_CLIENT_SECRET: "azure_client_secret", AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id", + SUBSCRIPTION_ID: "azure_subscription_id" }; const recorderEnvSetup: RecorderStartOptions = { - envSetupForPlayback, - sanitizerOptions: { - generalSanitizers: [ - { - regex: true, - target: 'https://\\w+\\.blob\\.core\\.windows\\.net/[^"]+', - value: "https://storageurl.com/", - }, - { regex: true, target: '"secrets": [^,]+', value: '"secrets": null' }, - { regex: true, target: '"credentials": [^,]+', value: '"credentials": null' }, - { regex: true, target: '"credentials": [^,]+', value: '"credentials": null' }, - ], - }, + envSetupForPlayback }; -export function createClient( - recorder: Recorder, - options: ClientOptions = {} -): AzureLoadTestingClient { - return AzureLoadTesting( - env.LOADTESTSERVICE_ENDPOINT || "", - credential, - recorder.configureClientOptions(options) - ); -} - /** * creates the recorder and reads the environment variables from the `.env` file. * Should be called first in the test suite to make sure environment variables are diff --git a/sdk/loadtestservice/load-testing-rest/tsconfig.json b/sdk/loadtestservice/load-testing-rest/tsconfig.json index bbe4cf4f1da5..064a66156b54 100644 --- a/sdk/loadtestservice/load-testing-rest/tsconfig.json +++ b/sdk/loadtestservice/load-testing-rest/tsconfig.json @@ -1,15 +1,5 @@ { "extends": "../../../tsconfig.package", - "compilerOptions": { - "outDir": "./dist-esm", - "declaration": true, - "declarationDir": "./types", - "esModuleInterop": true, - "paths": { - "@azure-rest/load-testing": ["./src/index"] - }, - "types": [], - "lib": ["DOM"] - }, - "include": ["src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"] + "compilerOptions": { "outDir": "./dist-esm", "declarationDir": "./types" }, + "include": ["src/**/*.ts", "./test/**/*.ts"] } From c8a512133bc0ae98c0ce61a241155896d214e727 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Tue, 15 Nov 2022 15:58:56 +0530 Subject: [PATCH 03/60] Added polling Helper --- .../load-testing-rest/src/pollingHelper.ts | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts diff --git a/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts new file mode 100644 index 000000000000..7e1e7cdff70c --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Client, HttpResponse } from "@azure-rest/core-client"; +import { + LongRunningOperation, + LroEngine, + LroEngineOptions, + LroResponse, + PollerLike, + PollOperationState, +} from "@azure/core-lro"; + +/** + * Helper function that builds a Poller object to help polling a long running operation. + * @param client - Client to use for sending the request to get additional pages. + * @param initialResponse - The initial response. + * @param options - Options to set a resume state or custom polling interval. + * @returns - A poller object to poll for operation state updates and eventually get the final response. + */ +export function getLongRunningPoller( + client: Client, + initialResponse: TResult, + options: LroEngineOptions> = {} +): PollerLike, TResult> { + const poller: LongRunningOperation = { + requestMethod: initialResponse.request.method, + // Override this so we can poll on requests sent while recording + requestPath: + initialResponse.request.headers.get("x-recording-upstream-base-uri") ?? + initialResponse.request.url, + sendInitialRequest: async () => { + // In the case of Rest Clients we are building the LRO poller object from a response that's the reason + // we are not triggering the initial request here, just extracting the information from the + // response we were provided. + return getLroResponse(initialResponse); + }, + sendPollRequest: async (path) => { + // This is the callback that is going to be called to poll the service + // to get the latest status. We use the client provided and the polling path + // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location + // depending on the lro pattern that the service implements. If non is provided we default to the initial path. + const response = await client.pathUnchecked(path ?? initialResponse.request.url).get(); + const lroResponse = getLroResponse(response as TResult); + lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url; + return lroResponse; + }, + }; + + return new LroEngine(poller, options); +} + +/** + * Converts a Rest Client response to a response that the LRO engine knows about + * @param response - a rest client http response + * @returns - An LRO response that the LRO engine can work with + */ +function getLroResponse(response: TResult): LroResponse { + if (Number.isNaN(response.status)) { + throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} From d9d53dc4850d6511e5e9c8eaf38490df7943797d Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Tue, 15 Nov 2022 17:18:09 +0530 Subject: [PATCH 04/60] Added initial sample and tests --- .../load-testing-rest/samples-dev/sample.jmx | 89 ++++++++++++ .../load-testing-rest/samples-dev/sample.ts | 130 ++++++++++++++++++ .../test/public/appComponents.spec.ts | 44 ++++++ .../test/public/fileUpload.spec.ts | 40 ++++++ .../test/public/loadtest.spec.ts | 38 +++++ .../load-testing-rest/test/public/sample.jmx | 89 ++++++++++++ .../test/public/sampleTest.spec.ts | 23 ---- .../test/public/testrun.spec.ts | 41 ++++++ .../test/public/utils/recordedClient.ts | 38 ++++- 9 files changed, 504 insertions(+), 28 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sample.jmx create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/sample.jmx delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/sampleTest.spec.ts create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.jmx b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.jmx new file mode 100644 index 000000000000..a8d909ef60fa --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.jmx @@ -0,0 +1,89 @@ + + + + + + false + false + + + + + + + + continue + + false + 10 + + 50 + 2 + 1515063650000 + 1515063650000 + false + 60 + + true + + + + + + + microsoft.com + + + + / + GET + true + false + true + false + + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts new file mode 100644 index 000000000000..23330e55e37f --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; +import { v4 as uuidv4 } from "uuid"; + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + const testId = uuidv4(); // ID to be assigned to a test + const fileId = uuidv4(); // ID to be assigned to the file being uploaded + const testRunId = uuidv4(); // ID to be assigned to a testRun + const appComponentId = uuidv4(); // ID of the app components + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/loadtests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfig: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/loadtests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) + .put({ + contentType: "multipart/form-data", + body: { + file: readStream, + }, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + // Creating app component + const appComponentCreationResult = await client + .path("/appcomponents/{name}", appComponentId) + .patch({ + contentType: "application/merge-patch+json", + body: { + name: "app_component", + testId: testCreationResult.body.testId, + value: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } + + // Creating the test run + const testRunCreationResult = await client.path("/testruns/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + displayName: displayName, + vusers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testStatus = null; + var getTestRunResult = null; + const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/testruns/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + console.log(getTestRunResult); + +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts new file mode 100644 index 000000000000..9cfd49def5a0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder, env } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createRecorder, createClient } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; + +describe("Create app component", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + client = createClient(recorder); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create the app components", async () => { + const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; + const result = await client.path("/appcomponents/{name}", "appcomp123").patch({ + contentType: "application/merge-patch+json", + body: { + name: "app_component", + testId: "abc", + value: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + assert.include(["200", "201"], result.status); + }); +}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts new file mode 100644 index 000000000000..264737c8c6e0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createClient, createRecorder } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; +import * as fs from "fs"; +import { isNode } from "@azure/core-util"; + +describe("File Upload", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + let readStream: fs.ReadStream; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + if (!isNode || isPlaybackMode()) { + this.skip(); + } + client = createClient(recorder); + readStream = fs.createReadStream("./test/public/sample.jmx"); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should upload the test file", async () => { + const result = await client.path("/loadtests/{testId}/files/{fileId}", "abc", "xyz12365").put({ + contentType: "multipart/form-data", + body: { + file: readStream, + }, + }); + + assert.include(["201"], result.status); + }); +}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts new file mode 100644 index 000000000000..5d1730a3bb60 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { createClient, createRecorder } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; +import { Recorder } from "@azure-tools/test-recorder"; + +describe("Test Creation", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + client = createClient(recorder); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create a loadtest", async () => { + const result = await client.path("/loadtests/{testId}", "abc").patch({ + contentType: "application/merge-patch+json", + body: { + displayName: "sample_test", + description: "", + loadTestConfig: { + engineInstances: 1, + splitAllCSVs: false, + }, + }, + }); + + assert.include(["200", "201"], result.status); + }); +}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx b/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx new file mode 100644 index 000000000000..a8d909ef60fa --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx @@ -0,0 +1,89 @@ + + + + + + false + false + + + + + + + + continue + + false + 10 + + 50 + 2 + 1515063650000 + 1515063650000 + false + 60 + + true + + + + + + + microsoft.com + + + + / + GET + true + false + true + false + + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + diff --git a/sdk/loadtestservice/load-testing-rest/test/public/sampleTest.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/sampleTest.spec.ts deleted file mode 100644 index 94aac19dfb0b..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/sampleTest.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createRecorder } from "./utils/recordedClient"; -import { Context } from "mocha"; - -describe("My test", () => { - let recorder: Recorder; - - beforeEach(async function(this: Context) { - recorder = await createRecorder(this); - }); - - afterEach(async function() { - await recorder.stop(); - }); - - it("sample test", async function() { - assert.equal(1, 1); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts new file mode 100644 index 000000000000..478d912459a0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createRecorder, createClient } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; + +describe("Test Run Creation", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + client = createClient(recorder); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create a test run", async () => { + const result = await client.path("/testruns/{testRunId}", "abcde").patch({ + contentType: "application/merge-patch+json", + body: { + testId: "abc", + displayName: "sample_testrun", + vusers: 10, + }, + }); + + assert.include(["200"], result.status); + }); + + it("should get a test run", async () => { + const result = await client.path("/testruns/{testRunId}", "abcde").get(); + + assert.include(["200"], result.status); + }); +}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/utils/recordedClient.ts b/sdk/loadtestservice/load-testing-rest/test/public/utils/recordedClient.ts index a233982406d0..3945f0537e9e 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/utils/recordedClient.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/utils/recordedClient.ts @@ -1,22 +1,50 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. - +import AzureLoadTesting, { AzureLoadTestingClient } from "../../../src"; import { Context } from "mocha"; -import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; +import { Recorder, env, RecorderStartOptions } from "@azure-tools/test-recorder"; import "./env"; +import { ClientOptions } from "@azure-rest/core-client"; +import { createTestCredential } from "@azure-tools/test-credential"; + +const credential = createTestCredential(); + const envSetupForPlayback: Record = { - ENDPOINT: "https://endpoint", + LOADTESTSERVICE_ENDPOINT: "endpoint", AZURE_CLIENT_ID: "azure_client_id", AZURE_CLIENT_SECRET: "azure_client_secret", AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" + SUBSCRIPTION_ID: "azure_subscription_id", }; const recorderEnvSetup: RecorderStartOptions = { - envSetupForPlayback + envSetupForPlayback, + sanitizerOptions: { + generalSanitizers: [ + { + regex: true, + target: 'https://\\w+\\.blob\\.core\\.windows\\.net/[^"]+', + value: "https://storageurl.com/", + }, + { regex: true, target: '"secrets": [^,]+', value: '"secrets": null' }, + { regex: true, target: '"credentials": [^,]+', value: '"credentials": null' }, + { regex: true, target: '"credentials": [^,]+', value: '"credentials": null' }, + ], + }, }; +export function createClient( + recorder: Recorder, + options: ClientOptions = {} +): AzureLoadTestingClient { + return AzureLoadTesting( + env.LOADTESTSERVICE_ENDPOINT || "", + credential, + recorder.configureClientOptions(options) + ); +} + /** * creates the recorder and reads the environment variables from the `.env` file. * Should be called first in the test suite to make sure environment variables are From 854a281c39e7bcca89d6f886a8d5fa1362fe9e83 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:11:58 +0530 Subject: [PATCH 05/60] Added API Review --- .../load-testing-rest/package.json | 65 +- .../review/load-testing.api.md | 1673 +++++++++++++++++ .../load-testing-rest/tsconfig.json | 14 +- 3 files changed, 1725 insertions(+), 27 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/review/load-testing.api.md diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index 7c009e6e8037..3e418f8c3493 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -4,14 +4,23 @@ "author": "Microsoft Corporation", "version": "1.0.0", "description": "", - "keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"], + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], "license": "MIT", "main": "dist/index.js", "module": "./dist-esm/src/index.js", "types": "./types/load-testing.d.ts", "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md", "repository": "github:Azure/azure-sdk-for-js", - "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, "files": [ "dist/", "dist-esm/src/", @@ -22,10 +31,15 @@ ], "//metadata": { "constantPaths": [ - { "path": "swagger/README.md", "prefix": "package-version" } + { + "path": "swagger/README.md", + "prefix": "package-version" + } ] }, - "engines": { "node": ">=12.0.0" }, + "engines": { + "node": ">=12.0.0" + }, "scripts": { "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", @@ -56,34 +70,28 @@ "sideEffects": false, "autoPublish": false, "dependencies": { - "@azure/core-auth": "^1.3.0", "@azure-rest/core-client": "1.0.0-beta.10", + "@azure/core-auth": "^1.3.0", + "@azure/core-paging": "^1.2.0", "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0", - "@azure/core-paging": "^1.2.0" + "@azure/core-lro": "~2.4.0" }, "devDependencies": { + "@azure-tools/test-credential": "~1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure/identity": "^2.0.1", "@microsoft/api-extractor": "7.18.11", - "autorest": "latest", + "@types/chai": "^4.2.8", + "@types/mocha": "^10.0.0", "@types/node": "^12.0.0", + "autorest": "latest", + "chai": "^4.2.0", + "cross-env": "^7.0.2", "dotenv": "^8.2.0", "eslint": "^7.15.0", - "mkdirp": "^1.0.4", - "prettier": "2.2.1", - "rimraf": "^3.0.0", - "source-map-support": "^0.5.9", - "typescript": "~4.2.0", - "@azure/dev-tool": "^1.0.0", - "@azure/eslint-plugin-azure-sdk": "^3.0.0", - "@azure-tools/test-credential": "^1.0.0", - "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^2.0.0", - "mocha": "^7.1.1", - "mocha-junit-reporter": "^1.18.0", - "cross-env": "^7.0.2", - "@types/chai": "^4.2.8", - "chai": "^4.2.0", + "karma": "^6.2.0", "karma-chrome-launcher": "^3.0.0", "karma-coverage": "^2.0.0", "karma-edge-launcher": "^0.4.2", @@ -91,12 +99,19 @@ "karma-firefox-launcher": "^1.1.0", "karma-ie-launcher": "^1.0.0", "karma-junit-reporter": "^2.0.1", - "karma-mocha-reporter": "^2.2.5", "karma-mocha": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", "karma-source-map-support": "~1.4.0", "karma-sourcemap-loader": "^0.3.8", - "karma": "^6.2.0", - "nyc": "^14.0.0" + "mkdirp": "^1.0.4", + "mocha": "^7.1.1", + "mocha-junit-reporter": "^1.18.0", + "nyc": "^14.0.0", + "prettier": "2.2.1", + "rimraf": "^3.0.0", + "source-map-support": "^0.5.9", + "typescript": "~4.2.0", + "@azure/core-lro": "~2.4.1" }, "browser": { "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" diff --git a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md new file mode 100644 index 000000000000..dc93492e6259 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md @@ -0,0 +1,1673 @@ +## API Report File for "@azure-rest/load-testing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +/// + +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { HttpResponse } from '@azure-rest/core-client'; +import { PagedAsyncIterableIterator } from '@azure/core-paging'; +import { PathUncheckedResponse } from '@azure-rest/core-client'; +import { RawHttpHeaders } from '@azure/core-rest-pipeline'; +import { RequestParameters } from '@azure-rest/core-client'; +import { StreamableMethod } from '@azure-rest/core-client'; +import { TokenCredential } from '@azure/core-auth'; + +// @public (undocumented) +export interface AppComponent { + displayName?: string; + kind?: string; + resourceGroup?: string; + resourceId?: string; + resourceName?: string; + resourceType?: string; + subscriptionId?: string; +} + +// @public (undocumented) +export interface AppComponentOutput { + displayName?: string; + kind?: string; + resourceGroup?: string; + resourceId?: string; + resourceName?: string; + resourceType?: string; + subscriptionId?: string; +} + +// @public (undocumented) +export type AzureLoadTestingClient = Client & { + path: Routes; +}; + +// @public (undocumented) +export interface CertificateMetadata { + name?: string; + type?: "AKV_CERT_URI"; + value?: string; +} + +// @public (undocumented) +export interface CertificateMetadataOutput { + name?: string; + type?: "AKV_CERT_URI"; + value?: string; +} + +// @public (undocumented) +function createClient(Endpoint: string, credentials: TokenCredential, options?: ClientOptions): AzureLoadTestingClient; +export default createClient; + +// @public (undocumented) +export interface ErrorDetails { + message?: string; +} + +// @public (undocumented) +export interface ErrorDetailsOutput { + message?: string; +} + +// @public (undocumented) +export interface ErrorModelOutput { + code: string; + details?: Array; + message: string; + target?: string; +} + +// @public (undocumented) +export interface ErrorResponseBodyOutput { + error: ErrorModelOutput; +} + +// @public (undocumented) +export interface FileInfo { + expireDateTime?: Date | string; + fileId?: string; + filename?: string; + fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; + url?: string; + validationStatus?: "NOT_VALIDATED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED"; +} + +// @public (undocumented) +export interface FileInfoListOutput { + nextLink?: string; + value: Array; +} + +// @public (undocumented) +export interface FileInfoOutput { + expireDateTime?: string; + fileId?: string; + filename?: string; + fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; + url?: string; + validationStatus?: "NOT_VALIDATED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED"; +} + +// @public +export type GetArrayType = T extends Array ? TData : never; + +// @public +export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ + page: TPage; + nextPageLink?: string; +}>; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationCreateOrUpdateTest200Response | LoadTestAdministrationCreateOrUpdateTest201Response | LoadTestAdministrationCreateOrUpdateTestdefaultResponse): response is LoadTestAdministrationCreateOrUpdateTestdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationDeleteTest204Response | LoadTestAdministrationDeleteTestdefaultResponse): response is LoadTestAdministrationDeleteTestdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationGetTest200Response | LoadTestAdministrationGetTestdefaultResponse): response is LoadTestAdministrationGetTestdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationListTests200Response | LoadTestAdministrationListTestsdefaultResponse): response is LoadTestAdministrationListTestsdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationUploadFile201Response | LoadTestAdministrationUploadFiledefaultResponse): response is LoadTestAdministrationUploadFiledefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationGetFile200Response | LoadTestAdministrationGetFiledefaultResponse): response is LoadTestAdministrationGetFiledefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationDeleteFile204Response | LoadTestAdministrationDeleteFiledefaultResponse): response is LoadTestAdministrationDeleteFiledefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationListFilesTest200Response | LoadTestAdministrationListFilesTestdefaultResponse): response is LoadTestAdministrationListFilesTestdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationCreateOrUpdateAppComponentTest200Response | LoadTestAdministrationCreateOrUpdateAppComponentTest201Response | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse): response is LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationGetAppComponentsTest200Response | LoadTestAdministrationGetAppComponentsTestdefaultResponse): response is LoadTestAdministrationGetAppComponentsTestdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse): response is LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: LoadTestAdministrationGetServerMetricsConfigTest200Response | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse): response is LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunDelete204Response | TestRunDeletedefaultResponse): response is TestRunDeletedefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdatedefaultResponse): response is TestRunCreateOrUpdatedefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunGet200Response | TestRunGetdefaultResponse): response is TestRunGetdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunGetFile200Response | TestRunGetFiledefaultResponse): response is TestRunGetFiledefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunList200Response | TestRunListdefaultResponse): response is TestRunListdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunStop200Response | TestRunStopdefaultResponse): response is TestRunStopdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesdefaultResponse): response is TestRunListMetricNamespacesdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsdefaultResponse): response is TestRunListMetricDefinitionsdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunGetMetrics200Response | TestRunGetMetricsdefaultResponse): response is TestRunGetMetricsdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunCreateOrUpdateAppComponent200Response | TestRunCreateOrUpdateAppComponent201Response | TestRunCreateOrUpdateAppComponentdefaultResponse): response is TestRunCreateOrUpdateAppComponentdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunGetAppComponents200Response | TestRunGetAppComponentsdefaultResponse): response is TestRunGetAppComponentsdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunCreateOrUpdateServerMetricsConfig200Response | TestRunCreateOrUpdateServerMetricsConfig201Response | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse): response is TestRunCreateOrUpdateServerMetricsConfigdefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigdefaultResponse): response is TestRunGetServerMetricsConfigdefaultResponse; + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateAppComponentTest { + get(options?: LoadTestAdministrationGetAppComponentsTestParameters): StreamableMethod; + patch(options: LoadTestAdministrationCreateOrUpdateAppComponentTestParameters): StreamableMethod; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateAppComponentTest200Response extends HttpResponse { + // (undocumented) + body: TestAppComponentsOutput; + // (undocumented) + status: "200"; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateAppComponentTest201Response extends HttpResponse { + // (undocumented) + body: TestAppComponentsOutput; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateAppComponentTestBodyParam { + body: TestAppComponents; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateAppComponentTestMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type LoadTestAdministrationCreateOrUpdateAppComponentTestParameters = LoadTestAdministrationCreateOrUpdateAppComponentTestMediaTypesParam & LoadTestAdministrationCreateOrUpdateAppComponentTestBodyParam & RequestParameters; + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest { + get(options?: LoadTestAdministrationGetServerMetricsConfigTestParameters): StreamableMethod; + patch(options: LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters): StreamableMethod; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response extends HttpResponse { + // (undocumented) + body: TestServerMetricConfigOutput; + // (undocumented) + status: "200"; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response extends HttpResponse { + // (undocumented) + body: TestServerMetricConfigOutput; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestBodyParam { + body: TestServerMetricConfig; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters = LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestMediaTypesParam & LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestBodyParam & RequestParameters; + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateTest { + delete(options?: LoadTestAdministrationDeleteTestParameters): StreamableMethod; + get(options?: LoadTestAdministrationGetTestParameters): StreamableMethod; + patch(options: LoadTestAdministrationCreateOrUpdateTestParameters): StreamableMethod; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateTest200Response extends HttpResponse { + // (undocumented) + body: TestOutput; + // (undocumented) + status: "200"; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateTest201Response extends HttpResponse { + // (undocumented) + body: TestOutput; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateTestBodyParam { + body: Test; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateTestdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationCreateOrUpdateTestdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateTestdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface LoadTestAdministrationCreateOrUpdateTestMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type LoadTestAdministrationCreateOrUpdateTestParameters = LoadTestAdministrationCreateOrUpdateTestMediaTypesParam & LoadTestAdministrationCreateOrUpdateTestBodyParam & RequestParameters; + +// @public +export interface LoadTestAdministrationDeleteFile204Response extends HttpResponse { + // (undocumented) + body: Record; + // (undocumented) + status: "204"; +} + +// @public (undocumented) +export interface LoadTestAdministrationDeleteFiledefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationDeleteFiledefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationDeleteFiledefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type LoadTestAdministrationDeleteFileParameters = RequestParameters; + +// @public +export interface LoadTestAdministrationDeleteTest204Response extends HttpResponse { + // (undocumented) + body: Record; + // (undocumented) + status: "204"; +} + +// @public (undocumented) +export interface LoadTestAdministrationDeleteTestdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationDeleteTestdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationDeleteTestdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type LoadTestAdministrationDeleteTestParameters = RequestParameters; + +// @public +export interface LoadTestAdministrationGetAppComponentsTest200Response extends HttpResponse { + // (undocumented) + body: TestAppComponentsOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface LoadTestAdministrationGetAppComponentsTestdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationGetAppComponentsTestdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationGetAppComponentsTestdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type LoadTestAdministrationGetAppComponentsTestParameters = RequestParameters; + +// @public +export interface LoadTestAdministrationGetFile200Response extends HttpResponse { + // (undocumented) + body: FileInfoOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface LoadTestAdministrationGetFiledefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationGetFiledefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationGetFiledefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type LoadTestAdministrationGetFileParameters = RequestParameters; + +// @public +export interface LoadTestAdministrationGetServerMetricsConfigTest200Response extends HttpResponse { + // (undocumented) + body: TestServerMetricConfigOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type LoadTestAdministrationGetServerMetricsConfigTestParameters = RequestParameters; + +// @public +export interface LoadTestAdministrationGetTest200Response extends HttpResponse { + // (undocumented) + body: TestOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface LoadTestAdministrationGetTestdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationGetTestdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationGetTestdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type LoadTestAdministrationGetTestParameters = RequestParameters; + +// @public (undocumented) +export interface LoadTestAdministrationListFilesTest { + get(options?: LoadTestAdministrationListFilesTestParameters): StreamableMethod; +} + +// @public +export interface LoadTestAdministrationListFilesTest200Response extends HttpResponse { + // (undocumented) + body: FileInfoListOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface LoadTestAdministrationListFilesTestdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationListFilesTestdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationListFilesTestdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type LoadTestAdministrationListFilesTestParameters = LoadTestAdministrationListFilesTestQueryParam & RequestParameters; + +// @public (undocumented) +export interface LoadTestAdministrationListFilesTestQueryParam { + // (undocumented) + queryParameters?: LoadTestAdministrationListFilesTestQueryParamProperties; +} + +// @public (undocumented) +export interface LoadTestAdministrationListFilesTestQueryParamProperties { + continuationToken?: string; +} + +// @public (undocumented) +export interface LoadTestAdministrationListTests { + get(options?: LoadTestAdministrationListTestsParameters): StreamableMethod; +} + +// @public +export interface LoadTestAdministrationListTests200Response extends HttpResponse { + // (undocumented) + body: TestsListOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface LoadTestAdministrationListTestsdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationListTestsdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationListTestsdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type LoadTestAdministrationListTestsParameters = LoadTestAdministrationListTestsQueryParam & RequestParameters; + +// @public (undocumented) +export interface LoadTestAdministrationListTestsQueryParam { + // (undocumented) + queryParameters?: LoadTestAdministrationListTestsQueryParamProperties; +} + +// @public (undocumented) +export interface LoadTestAdministrationListTestsQueryParamProperties { + continuationToken?: string; + lastModifiedEndTime?: Date | string; + lastModifiedStartTime?: Date | string; + maxpagesize?: number; + orderby?: string; + search?: string; +} + +// @public (undocumented) +export interface LoadTestAdministrationUploadFile { + delete(options?: LoadTestAdministrationDeleteFileParameters): StreamableMethod; + get(options?: LoadTestAdministrationGetFileParameters): StreamableMethod; + put(options: LoadTestAdministrationUploadFileParameters): StreamableMethod; +} + +// @public +export interface LoadTestAdministrationUploadFile201Response extends HttpResponse { + // (undocumented) + body: FileInfoOutput; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface LoadTestAdministrationUploadFileBodyParam { + // (undocumented) + body: LoadTestAdministrationUploadFileFormBody; +} + +// @public (undocumented) +export interface LoadTestAdministrationUploadFiledefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface LoadTestAdministrationUploadFiledefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & LoadTestAdministrationUploadFiledefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface LoadTestAdministrationUploadFileFormBody { + file: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; +} + +// @public (undocumented) +export interface LoadTestAdministrationUploadFileMediaTypesParam { + contentType?: "multipart/form-data"; +} + +// @public (undocumented) +export type LoadTestAdministrationUploadFileParameters = LoadTestAdministrationUploadFileQueryParam & LoadTestAdministrationUploadFileMediaTypesParam & LoadTestAdministrationUploadFileBodyParam & RequestParameters; + +// @public (undocumented) +export interface LoadTestAdministrationUploadFileQueryParam { + // (undocumented) + queryParameters?: LoadTestAdministrationUploadFileQueryParamProperties; +} + +// @public (undocumented) +export interface LoadTestAdministrationUploadFileQueryParamProperties { + fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; +} + +// @public (undocumented) +export interface LoadTestConfiguration { + engineInstances?: number; + optionalLoadTestConfig?: OptionalLoadTestConfig; + quickStartTest?: boolean; + splitAllCSVs?: boolean; +} + +// @public (undocumented) +export interface LoadTestConfigurationOutput { + engineInstances?: number; + optionalLoadTestConfig?: OptionalLoadTestConfigOutput; + quickStartTest?: boolean; + splitAllCSVs?: boolean; +} + +// @public (undocumented) +export interface LocalizableString { + localizedValue?: string; + value?: string; +} + +// @public (undocumented) +export interface LocalizableStringOutput { + localizedValue?: string; + value?: string; +} + +// @public (undocumented) +export interface MetadataFilter { + name?: string; + values?: Array; +} + +// @public (undocumented) +export interface MetadataValueOutput { + name?: LocalizableStringOutput; + value?: string; +} + +// @public (undocumented) +export interface MetricAvailabilityOutput { + timeGrain?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; +} + +// @public (undocumented) +export interface MetricDefinitionCollectionOutput { + value: Array; +} + +// @public (undocumented) +export interface MetricDefinitionOutput { + dimensions?: Array; + displayDescription?: string; + metricAvailabilities?: Array; + name?: LocalizableStringOutput; + namespace?: string; + primaryAggregationType?: "Average" | "Count" | "Minimum" | "Maximum" | "None" | "Total" | "Percentile90" | "Percentile95" | "Percentile99"; + supportedAggregationTypes?: Array; + unit?: "NotSpecified" | "Percent" | "Count" | "Seconds" | "Milliseconds" | "Bytes" | "BytesPerSecond" | "CountPerSecond"; +} + +// @public (undocumented) +export interface MetricNamespaceCollectionOutput { + value: Array; +} + +// @public (undocumented) +export interface MetricNamespaceOutput { + metricNamespaceName?: string; + name?: string; +} + +// @public (undocumented) +export interface MetricOutput { + name?: LocalizableStringOutput; + timeseries?: Array; + unit?: "NotSpecified" | "Percent" | "Count" | "Seconds" | "Milliseconds" | "Bytes" | "BytesPerSecond" | "CountPerSecond"; +} + +// @public (undocumented) +export interface MetricRequestPayload { + filters?: Array; +} + +// @public (undocumented) +export interface MetricValueOutput { + average?: number; + count?: number; + maximum?: number; + minimum?: number; + percentile90?: number; + percentile95?: number; + percentile99?: number; + timeStamp?: string; + total?: number; +} + +// @public (undocumented) +export interface OptionalLoadTestConfig { + duration?: number; + endpointUrl?: string; + rampUpTime?: number; + vusers?: number; +} + +// @public (undocumented) +export interface OptionalLoadTestConfigOutput { + duration?: number; + endpointUrl?: string; + rampUpTime?: number; + vusers?: number; +} + +// @public +export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; + +// @public +export type PaginateReturn = TResult extends { + body: { + value?: infer TPage; + }; +} ? GetArrayType : Array; + +// @public +export interface PagingOptions { + customGetPage?: GetPage[]>; +} + +// @public (undocumented) +export interface PassFailCriteria { + passFailMetrics?: Record; +} + +// @public (undocumented) +export interface PassFailCriteriaOutput { + passFailMetrics?: Record; +} + +// @public (undocumented) +export interface PassFailMetric { + action?: "stop" | "continue"; + actualValue?: number; + aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; + clientmetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; + condition?: string; + requestName?: string; + result?: "passed" | "undetermined" | "failed"; + value?: number; +} + +// @public (undocumented) +export interface PassFailMetricOutput { + action?: "stop" | "continue"; + actualValue?: number; + aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; + clientmetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; + condition?: string; + requestName?: string; + result?: "passed" | "undetermined" | "failed"; + value?: number; +} + +// @public (undocumented) +export interface ResourceMetric { + aggregation: string; + displayDescription?: string; + id?: string; + metricNamespace: string; + name: LocalizableString; + resourceId: string; + resourceType: string; + unit?: string; +} + +// @public (undocumented) +export interface ResourceMetricOutput { + aggregation: string; + displayDescription?: string; + id?: string; + metricNamespace: string; + name: LocalizableStringOutput; + resourceId: string; + resourceType: string; + unit?: string; +} + +// @public (undocumented) +export interface ResponseOutput { + interval?: string; + namespace?: string; + testRunId?: string; + timespan?: string; + value?: MetricOutput; +} + +// @public (undocumented) +export interface Routes { + (path: "/tests/{testId}", testId: string): LoadTestAdministrationCreateOrUpdateTest; + (path: "/tests"): LoadTestAdministrationListTests; + (path: "/tests/{testId}/files/{fileId}", testId: string, fileId: string): LoadTestAdministrationUploadFile; + (path: "/tests/{testId}/files", testId: string): LoadTestAdministrationListFilesTest; + (path: "/tests/{testId}/app-components", testId: string): LoadTestAdministrationCreateOrUpdateAppComponentTest; + (path: "/tests/{testId}/server-metric-configs", testId: string): LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest; + (path: "/test-runs/{testRunId}", testRunId: string): TestRunDelete; + (path: "/test-runs/{testRunId}/files/{fileId}", testRunId: string, fileId: string): TestRunGetFile; + (path: "/test-runs"): TestRunList; + (path: "/test-runs/{testRunId}:stop", testRunId: string): TestRunStop; + (path: "/test-runs/{testRunId}/metric-namespaces", testRunId: string): TestRunListMetricNamespaces; + (path: "/test-runs/{testRunId}/metric-definitions", testRunId: string): TestRunListMetricDefinitions; + (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunGetMetrics; + (path: "/test-runs/{testRunId}/app-components", testRunId: string): TestRunCreateOrUpdateAppComponent; + (path: "/test-runs/{testRunId}/server-metric-configs", testRunId: string): TestRunCreateOrUpdateServerMetricsConfig; +} + +// @public (undocumented) +export interface Secret { + type?: "AKV_SECRET_URI" | "SECRET_VALUE"; + value?: string; +} + +// @public (undocumented) +export interface SecretOutput { + type?: "AKV_SECRET_URI" | "SECRET_VALUE"; + value?: string; +} + +// @public (undocumented) +export interface Test { + certificate?: CertificateMetadata; + createdBy?: string; + createdDateTime?: Date | string; + description?: string; + displayName?: string; + environmentVariables?: Record; + inputArtifacts?: TestInputArtifacts; + keyvaultReferenceIdentityId?: string; + keyvaultReferenceIdentityType?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: Date | string; + loadTestConfiguration?: LoadTestConfiguration; + passFailCriteria?: PassFailCriteria; + secrets?: Record; + subnetId?: string; + testId?: string; +} + +// @public (undocumented) +export interface TestAppComponents { + components: Record; + createdBy?: string; + createdDateTime?: Date | string; + lastModifiedBy?: string; + lastModifiedDateTime?: Date | string; + testId?: string; +} + +// @public (undocumented) +export interface TestAppComponentsOutput { + components: Record; + createdBy?: string; + createdDateTime?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: string; + testId?: string; +} + +// @public (undocumented) +export interface TestInputArtifacts { + additionalFileInfo?: Array; + configFileInfo?: FileInfo; + inputArtifactsZipFileInfo?: FileInfo; + testScriptFileInfo?: FileInfo; + userPropFileInfo?: FileInfo; +} + +// @public (undocumented) +export interface TestInputArtifactsOutput { + additionalFileInfo?: Array; + configFileInfo?: FileInfoOutput; + inputArtifactsZipFileInfo?: FileInfoOutput; + testScriptFileInfo?: FileInfoOutput; + userPropFileInfo?: FileInfoOutput; +} + +// @public (undocumented) +export interface TestOutput { + certificate?: CertificateMetadataOutput; + createdBy?: string; + createdDateTime?: string; + description?: string; + displayName?: string; + environmentVariables?: Record; + inputArtifacts?: TestInputArtifactsOutput; + keyvaultReferenceIdentityId?: string; + keyvaultReferenceIdentityType?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: string; + loadTestConfiguration?: LoadTestConfigurationOutput; + passFailCriteria?: PassFailCriteriaOutput; + secrets?: Record; + subnetId?: string; + testId?: string; +} + +// @public (undocumented) +export interface TestRun { + certificate?: CertificateMetadata; + createdBy?: string; + createdDateTime?: Date | string; + description?: string; + displayName?: string; + duration?: number; + endDateTime?: Date | string; + environmentVariables?: Record; + errorDetails?: Array; + executedDateTime?: Date | string; + lastModifiedBy?: string; + lastModifiedDateTime?: Date | string; + loadTestConfiguration?: LoadTestConfiguration; + passFailCriteria?: PassFailCriteria; + portalUrl?: string; + secrets?: Record; + startDateTime?: Date | string; + status?: "ACCEPTED" | "NOTSTARTED" | "PROVISIONING" | "PROVISIONED" | "CONFIGURING" | "CONFIGURED" | "EXECUTING" | "EXECUTED" | "DEPROVISIONING" | "DEPROVISIONED" | "DONE" | "CANCELLING" | "CANCELLED" | "FAILED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE"; + subnetId?: string; + testArtifacts?: TestRunArtifacts; + testId?: string; + testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED"; + testRunId?: string; + testRunStatistics?: Record; + vusers?: number; +} + +// @public (undocumented) +export interface TestRunAppComponents { + components: Record; + createdBy?: string; + createdDateTime?: Date | string; + lastModifiedBy?: string; + lastModifiedDateTime?: Date | string; + testRunId?: string; +} + +// @public (undocumented) +export interface TestRunAppComponentsOutput { + components: Record; + createdBy?: string; + createdDateTime?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: string; + testRunId?: string; +} + +// @public (undocumented) +export interface TestRunArtifacts { + inputArtifacts?: TestRunInputArtifacts; + outputArtifacts?: TestRunOutputArtifacts; +} + +// @public (undocumented) +export interface TestRunArtifactsOutput { + inputArtifacts?: TestRunInputArtifactsOutput; + outputArtifacts?: TestRunOutputArtifactsOutput; +} + +// @public +export interface TestRunCreateOrUpdate200Response extends HttpResponse { + // (undocumented) + body: TestRunOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateAppComponent { + get(options?: TestRunGetAppComponentsParameters): StreamableMethod; + patch(options: TestRunCreateOrUpdateAppComponentParameters): StreamableMethod; +} + +// @public +export interface TestRunCreateOrUpdateAppComponent200Response extends HttpResponse { + // (undocumented) + body: TestRunAppComponentsOutput; + // (undocumented) + status: "200"; +} + +// @public +export interface TestRunCreateOrUpdateAppComponent201Response extends HttpResponse { + // (undocumented) + body: TestRunAppComponentsOutput; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateAppComponentBodyParam { + body: TestRunAppComponents; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateAppComponentdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunCreateOrUpdateAppComponentdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateAppComponentMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type TestRunCreateOrUpdateAppComponentParameters = TestRunCreateOrUpdateAppComponentMediaTypesParam & TestRunCreateOrUpdateAppComponentBodyParam & RequestParameters; + +// @public (undocumented) +export interface TestRunCreateOrUpdateBodyParam { + body: TestRun; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdatedefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunCreateOrUpdatedefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunCreateOrUpdatedefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type TestRunCreateOrUpdateParameters = TestRunCreateOrUpdateQueryParam & TestRunCreateOrUpdateMediaTypesParam & TestRunCreateOrUpdateBodyParam & RequestParameters; + +// @public (undocumented) +export interface TestRunCreateOrUpdateQueryParam { + // (undocumented) + queryParameters?: TestRunCreateOrUpdateQueryParamProperties; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateQueryParamProperties { + oldTestRunId?: string; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateServerMetricsConfig { + get(options?: TestRunGetServerMetricsConfigParameters): StreamableMethod; + patch(options: TestRunCreateOrUpdateServerMetricsConfigParameters): StreamableMethod; +} + +// @public +export interface TestRunCreateOrUpdateServerMetricsConfig200Response extends HttpResponse { + // (undocumented) + body: TestRunServerMetricConfigOutput; + // (undocumented) + status: "200"; +} + +// @public +export interface TestRunCreateOrUpdateServerMetricsConfig201Response extends HttpResponse { + // (undocumented) + body: TestRunServerMetricConfigOutput; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateServerMetricsConfigBodyParam { + body: TestRunServerMetricConfig; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunCreateOrUpdateServerMetricsConfigdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface TestRunCreateOrUpdateServerMetricsConfigMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type TestRunCreateOrUpdateServerMetricsConfigParameters = TestRunCreateOrUpdateServerMetricsConfigMediaTypesParam & TestRunCreateOrUpdateServerMetricsConfigBodyParam & RequestParameters; + +// @public (undocumented) +export interface TestRunDelete { + delete(options?: TestRunDeleteParameters): StreamableMethod; + get(options?: TestRunGetParameters): StreamableMethod; + patch(options: TestRunCreateOrUpdateParameters): StreamableMethod; +} + +// @public +export interface TestRunDelete204Response extends HttpResponse { + // (undocumented) + body: Record; + // (undocumented) + status: "204"; +} + +// @public (undocumented) +export interface TestRunDeletedefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunDeletedefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunDeletedefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunDeleteParameters = RequestParameters; + +// @public +export interface TestRunGet200Response extends HttpResponse { + // (undocumented) + body: TestRunOutput; + // (undocumented) + status: "200"; +} + +// @public +export interface TestRunGetAppComponents200Response extends HttpResponse { + // (undocumented) + body: TestRunAppComponentsOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunGetAppComponentsdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunGetAppComponentsdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunGetAppComponentsdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunGetAppComponentsParameters = RequestParameters; + +// @public (undocumented) +export interface TestRunGetdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunGetdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunGetdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface TestRunGetFile { + get(options?: TestRunGetFileParameters): StreamableMethod; +} + +// @public +export interface TestRunGetFile200Response extends HttpResponse { + // (undocumented) + body: FileInfoOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunGetFiledefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunGetFiledefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunGetFiledefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunGetFileParameters = RequestParameters; + +// @public (undocumented) +export interface TestRunGetMetrics { + post(options: TestRunGetMetricsParameters): StreamableMethod; +} + +// @public +export interface TestRunGetMetrics200Response extends HttpResponse { + // (undocumented) + body: ResponseOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunGetMetricsBodyParam { + body?: MetricRequestPayload; +} + +// @public (undocumented) +export interface TestRunGetMetricsdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunGetMetricsdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunGetMetricsdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface TestRunGetMetricsMediaTypesParam { + contentType?: "application/json"; +} + +// @public (undocumented) +export type TestRunGetMetricsParameters = TestRunGetMetricsQueryParam & TestRunGetMetricsMediaTypesParam & TestRunGetMetricsBodyParam & RequestParameters; + +// @public (undocumented) +export interface TestRunGetMetricsQueryParam { + // (undocumented) + queryParameters: TestRunGetMetricsQueryParamProperties; +} + +// @public (undocumented) +export interface TestRunGetMetricsQueryParamProperties { + aggregation?: string; + interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; + metricname: string; + metricNamespace: string; + resultType: "Data" | "Metadata"; + timespan: string; +} + +// @public (undocumented) +export type TestRunGetParameters = RequestParameters; + +// @public +export interface TestRunGetServerMetricsConfig200Response extends HttpResponse { + // (undocumented) + body: TestRunServerMetricConfigOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunGetServerMetricsConfigdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunGetServerMetricsConfigdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunGetServerMetricsConfigdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunGetServerMetricsConfigParameters = RequestParameters; + +// @public (undocumented) +export interface TestRunInputArtifacts { + additionalFileInfo?: Array; + configFileInfo?: FileInfo; + inputArtifactsZipFileInfo?: FileInfo; + testScriptFileInfo?: FileInfo; + userPropFileInfo?: FileInfo; +} + +// @public (undocumented) +export interface TestRunInputArtifactsOutput { + additionalFileInfo?: Array; + configFileInfo?: FileInfoOutput; + inputArtifactsZipFileInfo?: FileInfoOutput; + testScriptFileInfo?: FileInfoOutput; + userPropFileInfo?: FileInfoOutput; +} + +// @public (undocumented) +export interface TestRunList { + get(options?: TestRunListParameters): StreamableMethod; +} + +// @public +export interface TestRunList200Response extends HttpResponse { + // (undocumented) + body: TestRunsListOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunListdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunListdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunListdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface TestRunListMetricDefinitions { + get(options: TestRunListMetricDefinitionsParameters): StreamableMethod; +} + +// @public +export interface TestRunListMetricDefinitions200Response extends HttpResponse { + // (undocumented) + body: MetricDefinitionCollectionOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunListMetricDefinitionsdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunListMetricDefinitionsdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunListMetricDefinitionsdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunListMetricDefinitionsParameters = TestRunListMetricDefinitionsQueryParam & RequestParameters; + +// @public (undocumented) +export interface TestRunListMetricDefinitionsQueryParam { + // (undocumented) + queryParameters: TestRunListMetricDefinitionsQueryParamProperties; +} + +// @public (undocumented) +export interface TestRunListMetricDefinitionsQueryParamProperties { + metricNamespace: string; +} + +// @public (undocumented) +export interface TestRunListMetricNamespaces { + get(options?: TestRunListMetricNamespacesParameters): StreamableMethod; +} + +// @public +export interface TestRunListMetricNamespaces200Response extends HttpResponse { + // (undocumented) + body: MetricNamespaceCollectionOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunListMetricNamespacesdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunListMetricNamespacesdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunListMetricNamespacesdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunListMetricNamespacesParameters = RequestParameters; + +// @public (undocumented) +export type TestRunListParameters = TestRunListQueryParam & RequestParameters; + +// @public (undocumented) +export interface TestRunListQueryParam { + // (undocumented) + queryParameters?: TestRunListQueryParamProperties; +} + +// @public (undocumented) +export interface TestRunListQueryParamProperties { + continuationToken?: string; + executionFrom?: Date | string; + executionTo?: Date | string; + maxpagesize?: number; + orderby?: string; + search?: string; + status?: string; + testId?: string; +} + +// @public (undocumented) +export interface TestRunOutput { + certificate?: CertificateMetadataOutput; + createdBy?: string; + createdDateTime?: string; + description?: string; + displayName?: string; + duration?: number; + endDateTime?: string; + environmentVariables?: Record; + errorDetails?: Array; + executedDateTime?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: string; + loadTestConfiguration?: LoadTestConfigurationOutput; + passFailCriteria?: PassFailCriteriaOutput; + portalUrl?: string; + secrets?: Record; + startDateTime?: string; + status?: "ACCEPTED" | "NOTSTARTED" | "PROVISIONING" | "PROVISIONED" | "CONFIGURING" | "CONFIGURED" | "EXECUTING" | "EXECUTED" | "DEPROVISIONING" | "DEPROVISIONED" | "DONE" | "CANCELLING" | "CANCELLED" | "FAILED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE"; + subnetId?: string; + testArtifacts?: TestRunArtifactsOutput; + testId?: string; + testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED"; + testRunId?: string; + testRunStatistics?: Record; + vusers?: number; +} + +// @public (undocumented) +export interface TestRunOutputArtifacts { + logsUrl?: FileInfo; + resultUrl?: FileInfo; +} + +// @public (undocumented) +export interface TestRunOutputArtifactsOutput { + logsUrl?: FileInfoOutput; + resultUrl?: FileInfoOutput; +} + +// @public (undocumented) +export interface TestRunServerMetricConfig { + createdBy?: string; + createdDateTime?: Date | string; + lastModifiedBy?: string; + lastModifiedDateTime?: Date | string; + metrics?: Record; + testRunId?: string; +} + +// @public (undocumented) +export interface TestRunServerMetricConfigOutput { + createdBy?: string; + createdDateTime?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: string; + metrics?: Record; + testRunId?: string; +} + +// @public (undocumented) +export interface TestRunsListOutput { + nextLink?: string; + value: Array; +} + +// @public (undocumented) +export interface TestRunStatistics { + errorCount?: number; + errorPct?: number; + maxResTime?: number; + meanResTime?: number; + medianResTime?: number; + minResTime?: number; + pct1ResTime?: number; + pct2ResTime?: number; + pct3ResTime?: number; + receivedKBytesPerSec?: number; + sampleCount?: number; + sentKBytesPerSec?: number; + throughput?: number; + transaction?: string; +} + +// @public (undocumented) +export interface TestRunStatisticsOutput { + errorCount?: number; + errorPct?: number; + maxResTime?: number; + meanResTime?: number; + medianResTime?: number; + minResTime?: number; + pct1ResTime?: number; + pct2ResTime?: number; + pct3ResTime?: number; + receivedKBytesPerSec?: number; + sampleCount?: number; + sentKBytesPerSec?: number; + throughput?: number; + transaction?: string; +} + +// @public (undocumented) +export interface TestRunStop { + post(options?: TestRunStopParameters): StreamableMethod; +} + +// @public +export interface TestRunStop200Response extends HttpResponse { + // (undocumented) + body: TestRunOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunStopdefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunStopdefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunStopdefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunStopParameters = RequestParameters; + +// @public (undocumented) +export interface TestServerMetricConfig { + createdBy?: string; + createdDateTime?: Date | string; + lastModifiedBy?: string; + lastModifiedDateTime?: Date | string; + metrics?: Record; + testId?: string; +} + +// @public (undocumented) +export interface TestServerMetricConfigOutput { + createdBy?: string; + createdDateTime?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: string; + metrics?: Record; + testId?: string; +} + +// @public (undocumented) +export interface TestsListOutput { + nextLink?: string; + value: Array; +} + +// @public (undocumented) +export interface TimeSeriesElementOutput { + data?: Array; + metadatavalues?: Array; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/loadtestservice/load-testing-rest/tsconfig.json b/sdk/loadtestservice/load-testing-rest/tsconfig.json index 064a66156b54..bbe4cf4f1da5 100644 --- a/sdk/loadtestservice/load-testing-rest/tsconfig.json +++ b/sdk/loadtestservice/load-testing-rest/tsconfig.json @@ -1,5 +1,15 @@ { "extends": "../../../tsconfig.package", - "compilerOptions": { "outDir": "./dist-esm", "declarationDir": "./types" }, - "include": ["src/**/*.ts", "./test/**/*.ts"] + "compilerOptions": { + "outDir": "./dist-esm", + "declaration": true, + "declarationDir": "./types", + "esModuleInterop": true, + "paths": { + "@azure-rest/load-testing": ["./src/index"] + }, + "types": [], + "lib": ["DOM"] + }, + "include": ["src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"] } From 383a2ee26b7c4f2a6e63595d2ef700a28149b03c Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:57:25 +0530 Subject: [PATCH 06/60] Added samples for JS and TS --- .../load-testing-rest/package.json | 19 ++- .../samples-dev/createAppComponent.ts | 67 +++++++++ .../samples-dev/createOrUpdateTest.ts | 37 +++++ .../samples-dev/createTestRunAndGetMetrics.ts | 63 +++++++++ .../samples-dev/fileUpload.ts | 61 ++++++++ .../load-testing-rest/samples-dev/sample.ts | 130 ------------------ .../samples/v1/javascript/README.md | 68 +++++++++ .../v1/javascript/createAppComponent.js | 67 +++++++++ .../v1/javascript/createOrUpdateTest.js | 35 +++++ .../javascript/createTestRunAndGetMetrics.js | 62 +++++++++ .../samples/v1/javascript/fileUpload.js | 61 ++++++++ .../samples/v1/javascript/package.json | 34 +++++ .../samples/v1/javascript/sample.env | 4 + .../samples/v1/typescript/README.md | 81 +++++++++++ .../samples/v1/typescript/package.json | 44 ++++++ .../samples/v1/typescript/sample.env | 4 + .../v1/typescript/src/createAppComponent.ts | 67 +++++++++ .../v1/typescript/src/createOrUpdateTest.ts | 37 +++++ .../src/createTestRunAndGetMetrics.ts | 63 +++++++++ .../samples/v1/typescript/src/fileUpload.ts | 61 ++++++++ .../samples/v1/typescript/tsconfig.json | 17 +++ .../test/public/appComponents.spec.ts | 44 ------ .../test/public/fileUpload.spec.ts | 40 ------ .../test/public/loadtest.spec.ts | 38 ----- .../test/public/testrun.spec.ts | 41 ------ .../load-testing-rest/tsconfig.json | 5 +- 26 files changed, 952 insertions(+), 298 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index 3e418f8c3493..d5d932657e6b 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -37,6 +37,15 @@ } ] }, + "//sampleConfiguration": { + "productName": "Azure Load Testing rest", + "productSlugs": [ + "azure" + ], + "requiredResources": { + "Azure LoadTesting Service instance": "https://learn.microsoft.com/en-us/azure/load-testing/" + } + }, "engines": { "node": ">=12.0.0" }, @@ -72,20 +81,22 @@ "dependencies": { "@azure-rest/core-client": "1.0.0-beta.10", "@azure/core-auth": "^1.3.0", + "@azure/core-lro": "~2.4.0", "@azure/core-paging": "^1.2.0", "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", - "tslib": "^2.2.0", - "@azure/core-lro": "~2.4.0" + "tslib": "^2.2.0" }, "devDependencies": { "@azure-tools/test-credential": "~1.0.0", "@azure-tools/test-recorder": "^2.0.0", + "@azure/core-lro": "~2.4.0", "@azure/identity": "^2.0.1", "@microsoft/api-extractor": "7.18.11", "@types/chai": "^4.2.8", "@types/mocha": "^10.0.0", "@types/node": "^12.0.0", + "@types/uuid": "^8.3.4", "autorest": "latest", "chai": "^4.2.0", "cross-env": "^7.0.2", @@ -110,8 +121,8 @@ "prettier": "2.2.1", "rimraf": "^3.0.0", "source-map-support": "^0.5.9", - "typescript": "~4.2.0", - "@azure/core-lro": "~2.4.1" + "uuid": "^9.0.0", + "typescript": "~4.2.0" }, "browser": { "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts new file mode 100644 index 000000000000..c012938aa390 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts new file mode 100644 index 000000000000..d357c3c70e4a --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting/*, { isUnexpected }*/ from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the Load test + await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration : { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts new file mode 100644 index 000000000000..49fc76a717be --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts @@ -0,0 +1,63 @@ +/** + * This sample demonstrates how to run a test and get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + vusers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testStatus = null; + var getTestRunResult = null; + const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + console.log(getTestRunResult); + +} +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts new file mode 100644 index 000000000000..41d84e35d994 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; +import { v4 as uuidv4 } from "uuid"; + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const fileId = uuidv4(); // ID to be assigned to the file being uploaded + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) + .put({ + contentType: "multipart/form-data", + body: { + file: readStream, + }, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts deleted file mode 100644 index 23330e55e37f..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { createReadStream } from "fs"; -import { v4 as uuidv4 } from "uuid"; - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - const testId = uuidv4(); // ID to be assigned to a test - const fileId = uuidv4(); // ID to be assigned to the file being uploaded - const testRunId = uuidv4(); // ID to be assigned to a testRun - const appComponentId = uuidv4(); // ID of the app components - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/loadtests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfig: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/loadtests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) - .put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - // Creating app component - const appComponentCreationResult = await client - .path("/appcomponents/{name}", appComponentId) - .patch({ - contentType: "application/merge-patch+json", - body: { - name: "app_component", - testId: testCreationResult.body.testId, - value: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } - - // Creating the test run - const testRunCreationResult = await client.path("/testruns/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - displayName: displayName, - vusers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - // Checking the test run status and printing metrics - var testStatus = null; - var getTestRunResult = null; - const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); - - //wait for terminal state - while ( - testStatus == null || - (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/testruns/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; - - //Check test status after every 5 seconds - sleep(5000); - } - - console.log(getTestRunResult); - -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md new file mode 100644 index 000000000000..1692f52d0c2d --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md @@ -0,0 +1,68 @@ +--- +page_type: sample +languages: + - javascript +products: + - azure +urlFragment: load-testing-javascript +--- + +# Azure Load Testing rest client library samples for JavaScript + +These sample programs show how to use the JavaScript client libraries for Azure Load Testing rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------- | -------------------------- | +| [createAppComponent.js][createappcomponent] | creates and run a loadtest | +| [createOrUpdateTest.js][createorupdatetest] | creates and run a loadtest | +| [createTestRunAndGetMetrics.js][createtestrunandgetmetrics] | creates and run a loadtest | +| [fileUpload.js][fileupload] | creates and run a loadtest | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node createAppComponent.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node createAppComponent.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[createappcomponent]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js +[createorupdatetest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js +[createtestrunandgetmetrics]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js +[fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing +[freesub]: https://azure.microsoft.com/free/ +[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/en-us/azure/load-testing/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js new file mode 100644 index 000000000000..c2f6d46dc94d --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { v4: uuidv4 } = require("uuid"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": + { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js new file mode 100644 index 000000000000..5cab86a174ce --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting /*, { isUnexpected }*/ = require("@azure-rest/load-testing").default; +const { DefaultAzureCredential } = require("@azure/identity"); +const { v4: uuidv4 } = require("uuid"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the Load test + await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js new file mode 100644 index 000000000000..b4455318442e --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js @@ -0,0 +1,62 @@ +/** + * This sample demonstrates how to run a test and get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { v4: uuidv4 } = require("uuid"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + vusers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testStatus = null; + var getTestRunResult = null; + const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + console.log(getTestRunResult); +} +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js new file mode 100644 index 000000000000..c1ae7f121d28 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { createReadStream } = require("fs"); +const { v4: uuidv4 } = require("uuid"); + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const fileId = uuidv4(); // ID to be assigned to the file being uploaded + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) + .put({ + contentType: "multipart/form-data", + body: { + file: readStream, + }, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json new file mode 100644 index 000000000000..e61020757e2e --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json @@ -0,0 +1,34 @@ +{ + "name": "@azure-samples/load-testing-js", + "private": true, + "version": "1.0.0", + "description": "Azure Load Testing rest client library samples for JavaScript", + "engines": { + "node": ">=14.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/loadtestservice/load-testing-rest" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", + "dependencies": { + "@azure-rest/load-testing": "latest", + "dotenv": "latest", + "@azure/identity": "^2.0.1", + "uuid": "^9.0.0" + } +} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md new file mode 100644 index 000000000000..8be8a1f12183 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md @@ -0,0 +1,81 @@ +--- +page_type: sample +languages: + - typescript +products: + - azure +urlFragment: load-testing-typescript +--- + +# Azure Load Testing rest client library samples for TypeScript + +These sample programs show how to use the TypeScript client libraries for Azure Load Testing rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------- | -------------------------- | +| [createAppComponent.ts][createappcomponent] | creates and run a loadtest | +| [createOrUpdateTest.ts][createorupdatetest] | creates and run a loadtest | +| [createTestRunAndGetMetrics.ts][createtestrunandgetmetrics] | creates and run a loadtest | +| [fileUpload.ts][fileupload] | creates and run a loadtest | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/createAppComponent.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node dist/createAppComponent.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[createappcomponent]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts +[createorupdatetest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts +[createtestrunandgetmetrics]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts +[fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing +[freesub]: https://azure.microsoft.com/free/ +[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/en-us/azure/load-testing/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json new file mode 100644 index 000000000000..0a1dad64a501 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json @@ -0,0 +1,44 @@ +{ + "name": "@azure-samples/load-testing-ts", + "private": true, + "version": "1.0.0", + "description": "Azure Load Testing rest client library samples for TypeScript", + "engines": { + "node": ">=14.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/loadtestservice/load-testing-rest" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", + "dependencies": { + "@azure-rest/load-testing": "latest", + "dotenv": "latest", + "@azure/identity": "^2.0.1", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@types/uuid": "^8.3.4", + "@types/node": "^14.0.0", + "typescript": "~4.8.0", + "rimraf": "latest" + } +} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts new file mode 100644 index 000000000000..c012938aa390 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts new file mode 100644 index 000000000000..d357c3c70e4a --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting/*, { isUnexpected }*/ from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the Load test + await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration : { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts new file mode 100644 index 000000000000..49fc76a717be --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts @@ -0,0 +1,63 @@ +/** + * This sample demonstrates how to run a test and get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + vusers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testStatus = null; + var getTestRunResult = null; + const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + console.log(getTestRunResult); + +} +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts new file mode 100644 index 000000000000..41d84e35d994 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; +import { v4 as uuidv4 } from "uuid"; + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const fileId = uuidv4(); // ID to be assigned to the file being uploaded + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) + .put({ + contentType: "multipart/form-data", + body: { + file: readStream, + }, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json new file mode 100644 index 000000000000..416c2dd82e00 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2018", + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**.ts" + ] +} diff --git a/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts deleted file mode 100644 index 9cfd49def5a0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/appComponents.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, env } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createRecorder, createClient } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; - -describe("Create app component", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create the app components", async () => { - const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; - const result = await client.path("/appcomponents/{name}", "appcomp123").patch({ - contentType: "application/merge-patch+json", - body: { - name: "app_component", - testId: "abc", - value: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - assert.include(["200", "201"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts deleted file mode 100644 index 264737c8c6e0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/fileUpload.spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createClient, createRecorder } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; -import * as fs from "fs"; -import { isNode } from "@azure/core-util"; - -describe("File Upload", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - let readStream: fs.ReadStream; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - if (!isNode || isPlaybackMode()) { - this.skip(); - } - client = createClient(recorder); - readStream = fs.createReadStream("./test/public/sample.jmx"); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should upload the test file", async () => { - const result = await client.path("/loadtests/{testId}/files/{fileId}", "abc", "xyz12365").put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, - }); - - assert.include(["201"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts deleted file mode 100644 index 5d1730a3bb60..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/loadtest.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { assert } from "chai"; -import { createClient, createRecorder } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; -import { Recorder } from "@azure-tools/test-recorder"; - -describe("Test Creation", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create a loadtest", async () => { - const result = await client.path("/loadtests/{testId}", "abc").patch({ - contentType: "application/merge-patch+json", - body: { - displayName: "sample_test", - description: "", - loadTestConfig: { - engineInstances: 1, - splitAllCSVs: false, - }, - }, - }); - - assert.include(["200", "201"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts deleted file mode 100644 index 478d912459a0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/testrun.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createRecorder, createClient } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; - -describe("Test Run Creation", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create a test run", async () => { - const result = await client.path("/testruns/{testRunId}", "abcde").patch({ - contentType: "application/merge-patch+json", - body: { - testId: "abc", - displayName: "sample_testrun", - vusers: 10, - }, - }); - - assert.include(["200"], result.status); - }); - - it("should get a test run", async () => { - const result = await client.path("/testruns/{testRunId}", "abcde").get(); - - assert.include(["200"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/tsconfig.json b/sdk/loadtestservice/load-testing-rest/tsconfig.json index bbe4cf4f1da5..694bb33d95f3 100644 --- a/sdk/loadtestservice/load-testing-rest/tsconfig.json +++ b/sdk/loadtestservice/load-testing-rest/tsconfig.json @@ -9,7 +9,10 @@ "@azure-rest/load-testing": ["./src/index"] }, "types": [], - "lib": ["DOM"] + "lib": ["DOM"], + "target": "ES6", + "module": "commonjs", + "skipLibCheck": true }, "include": ["src/**/*.ts", "./test/**/*.ts", "samples-dev/**/*.ts"] } From 9d84e70cdd715789e6cc0c77ae7b108354b53952 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 16 Nov 2022 16:29:01 +0530 Subject: [PATCH 07/60] pnpm lock file and Readme Update --- common/config/rush/pnpm-lock.yaml | 110 +++++++++++- .../load-testing-rest/README.md | 162 ++++++++++++++++-- 2 files changed, 257 insertions(+), 15 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 817880185253..02c40a055b4f 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1659,6 +1659,14 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: false + /@microsoft/api-extractor-model/7.13.9: + resolution: {integrity: sha512-t/XKTr8MlHRWgDr1fkyCzTQRR5XICf/WzIFs8yw1JLU8Olw99M3by4/dtpOZNskfqoW+J8NwOxovduU2csi4Ww==} + dependencies: + '@microsoft/tsdoc': 0.13.2 + '@microsoft/tsdoc-config': 0.15.2 + '@rushstack/node-core-library': 3.41.0 + dev: false + /@microsoft/api-extractor-model/7.25.2: resolution: {integrity: sha512-+h1uCrLQXFAKMUdghhdDcnniDB+6UA/lS9ArlB4QZQ34UbLuXNy2oQ6fafFK8cKXU4mUPTF/yGRjv7JKD5L7eg==} dependencies: @@ -1667,6 +1675,24 @@ packages: '@rushstack/node-core-library': 3.53.2 dev: false + /@microsoft/api-extractor/7.18.11: + resolution: {integrity: sha512-WfN5MZry4TrF60OOcGadFDsGECF9JNKNT+8P/8crYAumAYQRitI2cUiQRlCWrgmFgCWNezsNZeI/2BggdnUqcg==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.13.9 + '@microsoft/tsdoc': 0.13.2 + '@microsoft/tsdoc-config': 0.15.2 + '@rushstack/node-core-library': 3.41.0 + '@rushstack/rig-package': 0.3.1 + '@rushstack/ts-command-line': 4.9.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.17.0 + semver: 7.3.8 + source-map: 0.6.1 + typescript: 4.4.4 + dev: false + /@microsoft/api-extractor/7.33.5: resolution: {integrity: sha512-ENoWpTWarKNuodpRFDQr3jyBigHuv98KuJ8H5qXc1LZ1aP5Mk77lCo88HbPisTmSnGevJJHTScfd/DPznOb4CQ==} hasBin: true @@ -1685,6 +1711,15 @@ packages: typescript: 4.8.4 dev: false + /@microsoft/tsdoc-config/0.15.2: + resolution: {integrity: sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==} + dependencies: + '@microsoft/tsdoc': 0.13.2 + ajv: 6.12.6 + jju: 1.4.0 + resolve: 1.19.0 + dev: false + /@microsoft/tsdoc-config/0.16.2: resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} dependencies: @@ -1694,6 +1729,10 @@ packages: resolve: 1.19.0 dev: false + /@microsoft/tsdoc/0.13.2: + resolution: {integrity: sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==} + dev: false + /@microsoft/tsdoc/0.14.2: resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} dev: false @@ -2159,6 +2198,20 @@ packages: rollup: 2.79.1 dev: false + /@rushstack/node-core-library/3.41.0: + resolution: {integrity: sha512-JxdmqR+SHU04jTDaZhltMZL3/XTz2ZZM47DTN+FSPUGUVp6WmxLlvJnT5FoHrOZWUjL/FoIlZUdUPTSXjTjIcg==} + dependencies: + '@types/node': 12.20.24 + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.17.0 + semver: 7.3.8 + timsort: 0.3.0 + z-schema: 3.18.4 + dev: false + /@rushstack/node-core-library/3.53.2: resolution: {integrity: sha512-FggLe5DQs0X9MNFeJN3/EXwb+8hyZUTEp2i+V1e8r4Va4JgkjBNY0BuEaQI+3DW6S4apV3UtXU3im17MSY00DA==} dependencies: @@ -2172,6 +2225,13 @@ packages: z-schema: 5.0.4 dev: false + /@rushstack/rig-package/0.3.1: + resolution: {integrity: sha512-DXQmrPWOCNoE2zPzHCShE1y47FlgbAg48wpaY058Qo/yKDzL0GlEGf5Ra2NIt22pMcp0R/HHh+kZGbqTnF4CrA==} + dependencies: + resolve: 1.17.0 + strip-json-comments: 3.1.1 + dev: false + /@rushstack/rig-package/0.3.17: resolution: {integrity: sha512-nxvAGeIMnHl1LlZSQmacgcRV4y1EYtgcDIrw6KkeVjudOMonlxO482PhDj3LVZEp6L7emSf6YSO2s5JkHlwfZA==} dependencies: @@ -2188,6 +2248,15 @@ packages: string-argv: 0.3.1 dev: false + /@rushstack/ts-command-line/4.9.1: + resolution: {integrity: sha512-zzoWB6OqVbMjnxlxbAUqbZqDWITUSHqwFCx7JbH5CVrjR9kcsB4NeWkN1I8GcR92beiOGvO3yPlB2NRo5Ugh+A==} + dependencies: + '@types/argparse': 1.0.38 + argparse: 1.0.10 + colors: 1.2.5 + string-argv: 0.3.1 + dev: false + /@sinonjs/commons/1.8.4: resolution: {integrity: sha512-RpmQdHVo8hCEHDVpO39zToS9jOhR6nw+/lQAzRNq9ErrGV9IeHM71XCn68svVl/euFeVW6BWX4p35gkhbOcSIQ==} deprecated: Breaks compatibility with ES5, use v1.8.5 @@ -2414,6 +2483,10 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: false + /@types/mocha/10.0.0: + resolution: {integrity: sha512-rADY+HtTOA52l9VZWtgQfn4p+UDVM2eDVkMZT1I6syp0YKxW2F9v+0pbRZLsvskhQv/vMb6ZfCay81GHbz5SHg==} + dev: false + /@types/mocha/7.0.2: resolution: {integrity: sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w==} dev: false @@ -3891,7 +3964,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20221114 + typescript: 5.0.0-dev.20221115 dev: false /downlevel-dts/0.8.0: @@ -8483,6 +8556,10 @@ packages: xtend: 4.0.2 dev: false + /timsort/0.3.0: + resolution: {integrity: sha512-qsdtZH+vMoCARQtyod4imc2nIJwg9Cc7lPRrw9CzF8ZKR0khdr8+2nX80PBhET3tcyTtJDxAffGh2rXH4tyU8A==} + dev: false + /tmp/0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -8827,6 +8904,12 @@ packages: hasBin: true dev: false + /typescript/4.4.4: + resolution: {integrity: sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: false + /typescript/4.6.4: resolution: {integrity: sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==} engines: {node: '>=4.2.0'} @@ -8839,8 +8922,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20221114: - resolution: {integrity: sha512-lMcxw0oxEhQR0HIZyxhmCiwFqXfPQGtakbc+792/hmPP/pyICuaUUIKyY/7Cl6QPGTplHcGjDPEVbVE46gPVrA==} + /typescript/5.0.0-dev.20221115: + resolution: {integrity: sha512-h2MaHsq3nKjUZF9t/UCwOmitFUC9cFE1bNKHHHvQcoRUoVfriTvvg82RedkT6ixtrqC7RRhYcEJd7S23YioNkw==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -9004,6 +9087,11 @@ packages: engines: {node: '>= 0.10'} dev: false + /validator/8.2.0: + resolution: {integrity: sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA==} + engines: {node: '>= 0.10'} + dev: false + /vary/1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -9372,6 +9460,17 @@ packages: engines: {node: '>=10'} dev: false + /z-schema/3.18.4: + resolution: {integrity: sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw==} + hasBin: true + dependencies: + lodash.get: 4.4.2 + lodash.isequal: 4.5.0 + validator: 8.2.0 + optionalDependencies: + commander: 2.20.3 + dev: false + /z-schema/5.0.4: resolution: {integrity: sha512-gm/lx3hDzJNcLwseIeQVm1UcwhWIKpSB4NqH89pTBtFns4k/HDHudsICtvG05Bvw/Mv3jMyk700y5dadueLHdA==} engines: {node: '>=8.0.0'} @@ -17559,15 +17658,16 @@ packages: dev: false file:projects/load-testing.tgz: - resolution: {integrity: sha512-hHCT/2nQlq6qIKIBbQydd3BvJBkWGtQPRLS8hBPw69H/U8gna01Evc8SY2BAfzNGI8aiBj0ZPyVbuJ6A1asMOA==, tarball: file:projects/load-testing.tgz} + resolution: {integrity: sha512-okLhV4HzJaqeYoxmbp20n27hUWvi5hR4G6jsy90gxzXEn0+A7R8owAiU4pTIS4HYmVcN1NUI9TmlnvD62Tl2Fw==, tarball: file:projects/load-testing.tgz} name: '@rush-temp/load-testing' version: 0.0.0 dependencies: '@azure-rest/core-client': 1.0.0-beta.10 '@azure/core-util': 1.1.1 '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.33.5 + '@microsoft/api-extractor': 7.18.11 '@types/chai': 4.3.3 + '@types/mocha': 10.0.0 '@types/node': 12.20.55 '@types/uuid': 8.3.4 autorest: 3.6.2 diff --git a/sdk/loadtestservice/load-testing-rest/README.md b/sdk/loadtestservice/load-testing-rest/README.md index 16c6fafdb627..f4c3467870b4 100644 --- a/sdk/loadtestservice/load-testing-rest/README.md +++ b/sdk/loadtestservice/load-testing-rest/README.md @@ -1,15 +1,17 @@ -# AzureLoadTesting client library for JavaScript +# Azure Load Testing client library for JavaScript -Azure Load Testing Client +Azure Load Testing provides client library in JavaScript to the user by which they can interact natively with Azure Load Testing service. Azure Load Testing is a fully managed load-testing service that enables you to generate high-scale load. The service simulates traffic for your applications, regardless of where they're hosted. Developers, testers, and quality assurance (QA) engineers can use it to optimize application performance, scalability, or capacity. **Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library** -Key links: +## Documentation -- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest) -- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/load-testing) -- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/load-testing) -- [Samples](https://github.com/Azure-Samples/azure-samples-js-management) +Various documentation is available to help you get started + + + +- [API reference documentation][api_reference_doc] +- [Product Documentation][product_documentation] ## Getting started @@ -19,7 +21,7 @@ Key links: ### Prerequisites -- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package. +- You must have an [Azure subscription](https://azure.microsoft.com/free/) and [Azure Load Test Service Resource](https://learn.microsoft.com/azure/load-testing/) to use this package. ### Install the `@azure-rest/load-testing` package @@ -29,13 +31,13 @@ Install the AzureLoadTesting client REST client library for JavaScript with `npm npm install @azure-rest/load-testing ``` -### Create and authenticate a `AzureLoadTesting` +### Create and authenticate a `AzureLoadTesting` client To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token), provide an instance of the desired credential type obtained from the [@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library. -To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) +To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use. As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential) @@ -44,6 +46,122 @@ can be used to authenticate the client. Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET +## Key concepts + +The following components make up the Azure Load Testing Service. The Azure Load Test client library for JavaScript allows you to interact with each of these components through the use of a dedicated client object. + +#### Test + +A test specifies the test script, and configuration settings for running a load test. You can create one or more tests in an Azure Load Testing resource. + +#### App Component + +When you run a load test for an Azure-hosted application, you can monitor resource metrics for the different Azure application components (server-side metrics). While the load test runs, and after completion of the test, you can monitor and analyze the resource metrics in the Azure Load Testing dashboard. + +#### Metrics + +During a load test, Azure Load Testing collects metrics about the test execution. There are two types of metrics: + +1. Client-side metrics give you details reported by the test engine. These metrics include the number of virtual users, the request response time, the number of failed requests, or the number of requests per second. + +2. Server-side metrics are available for Azure-hosted applications and provide information about your Azure application components. Metrics can be for the number of database reads, the type of HTTP responses, or container resource consumption. + +### Test Engine + +A test engine is computing infrastructure that runs the Apache JMeter test script. You can scale out your load test by configuring the number of test engines. The test script runs in parallel across the specified number of test engines. + +### Test Run + +A test run represents one execution of a load test. It collects the logs associated with running the Apache JMeter script, the load test YAML configuration, the list of app components to monitor, and the results of the test. + +### Data-Plane Endpoint + +Data-plane of Azure Load Testing resources is addressable using the following URL format: + +`00000000-0000-0000-0000-000000000000.aaa.cnt-prod.loadtesting.azure.com` + +The first GUID `00000000-0000-0000-0000-000000000000` is the unique identifier used for accessing the Azure Load Testing resource. This is followed by `aaa` which is the Azure region of the resource. + +The data-plane endpoint is obtained from Control Plane APIs. + +**Example:** `1234abcd-12ab-12ab-12ab-123456abcdef.eus.cnt-prod.loadtesting.azure.com` + +In the above example, `eus` represents the Azure region `East US`. + +## Examples + +### Creating a load test + +```javascript +import AzureLoadTesting, { AzureLoadTestingClient } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; + +var TEST_ID = "some-test-id"; +var DISPLAY_NAME = "my-load-test"; + +const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); + +await Client.path("/loadtests/{testId}", TEST_ID).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: DISPLAY_NAME, + description: "", + loadTestConfig: { + engineInstances: 1, + splitAllCSVs: false, + }, + secrets: {}, + environmentVariables: {}, + passFailCriteria: { passFailMetrics: {} }, + }, +}); +``` + +### Uploading .jmx file to a Test + +```javascript +import { AzureLoadTestingClient } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; + +var TEST_ID = "some-test-id"; +var FILE_ID = "some-file-id"; +const readStream = createReadStream("./sample.jmx"); + +const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); + +await Client.path("/loadtests/{testId}/files/{fileId}", TEST_ID, FILE_ID).put({ + contentType: "multipart/form-data", + body: { + file: readStream, + }, +}); +``` + +### Running a Test + +```javascript +import { AzureLoadTestingClient } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; + +var TEST_ID = "some-test-id"; +var TEST_RUN_ID = "some-testrun-id"; +var DISPLAY_NAME = "my-load-test-run"; + +const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); + +await Client.path("/testruns/{testRunId}", TEST_RUN_ID).patch({ + contentType: "application/merge-patch+json", + body: { + testId: TEST_ID, + displayName: DISPLAY_NAME, + }, +}); + +var result = await client.path("/testruns/{testRunId}", TEST_RUN_ID).get(); +console.log(result); +``` + ## Troubleshooting ### Logging @@ -57,3 +175,27 @@ setLogLevel("info"); ``` For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger). + +## Next steps + +Azure Loading Testing JavaScript SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered. + + + +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md). + +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request + + + + + +[api_reference_doc]: https://docs.microsoft.com/rest/api/loadtesting/ +[product_documentation]: https://azure.microsoft.com/services/load-testing/ +[azure_subscription]: https://azure.microsoft.com/free/ From 41e03d7c046afe822be36511989d60d973a6a0eb Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 16 Nov 2022 17:57:07 +0530 Subject: [PATCH 08/60] Added test and removed locale from readme --- .../recording_should_create_a_loadtest.json | 39 +++++++++++++++++++ .../samples/v1/javascript/README.md | 2 +- .../samples/v1/typescript/README.md | 2 +- .../test/public/createLoadTest.spec.ts | 38 ++++++++++++++++++ 4 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/createLoadTest.spec.ts diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json new file mode 100644 index 000000000000..7d4e3875aa31 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -0,0 +1,39 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "113", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "d827bd4c-dc23-4853-8c87-84bcecb73f05" + }, + "RequestBody": { + "displayName": "sample_test", + "description": "", + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false + } + }, + "StatusCode": 405, + "ResponseHeaders": { + "Allow": "GET", + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 16 Nov 2022 12:22:54 GMT", + "mise-correlation-id": "ffdd9464-0c3f-44be-a2b6-9a7d20b9ee2e", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "22fd8bc5-d8fd-4fc9-97b4-d249d3df76a7" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md index 1692f52d0c2d..e63da91e7397 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md @@ -64,5 +64,5 @@ Take a look at our [API Documentation][apiref] for more information about the AP [fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js [apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing [freesub]: https://azure.microsoft.com/free/ -[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/en-us/azure/load-testing/ +[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md index 8be8a1f12183..274413858697 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md @@ -76,6 +76,6 @@ Take a look at our [API Documentation][apiref] for more information about the AP [fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts [apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing [freesub]: https://azure.microsoft.com/free/ -[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/en-us/azure/load-testing/ +[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md [typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/loadtestservice/load-testing-rest/test/public/createLoadTest.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/createLoadTest.spec.ts new file mode 100644 index 000000000000..e5952521c5b9 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/createLoadTest.spec.ts @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { createClient, createRecorder } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; +import { Recorder } from "@azure-tools/test-recorder"; + +describe("Test Creation", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + client = createClient(recorder); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create a loadtest", async () => { + const result = await client.path("/tests/{testId}", "abc").patch({ + contentType: "application/merge-patch+json", + body: { + displayName: "sample_test", + description: "", + loadTestConfiguration: { + engineInstances: 1, + splitAllCSVs: false, + }, + }, + }); + + assert.include(["200", "201"], result.status); + }); +}); From 483c5a81d0feb31c31ddad9593e823a20234b7c8 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 16 Nov 2022 18:10:39 +0530 Subject: [PATCH 09/60] Corrected broken links --- .../load-testing-rest/samples/v1/javascript/README.md | 2 +- .../load-testing-rest/samples/v1/typescript/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md index e63da91e7397..c74cf067da36 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md @@ -62,7 +62,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [createorupdatetest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js [createtestrunandgetmetrics]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js [fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md index 274413858697..3b0d5579d4e4 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md @@ -74,7 +74,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [createorupdatetest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts [createtestrunandgetmetrics]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts [fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md From 2b514d3d003d02f0d1ddfa1473e0d4b4a988f01c Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 16 Nov 2022 18:50:32 +0530 Subject: [PATCH 10/60] Added dev-tool and eslint --- .../load-testing-rest/karma.conf.js | 7 +-- .../load-testing-rest/package.json | 2 + ...ding_should_create_the_app_components.json | 42 ++++++++++++++++++ ...recording_should_upload_the_test_file.json | 32 ++++++++++++++ .../recording_should_create_a_loadtest.json | 8 ++-- .../recording_should_create_a_test_run.json | 36 ++++++++++++++++ .../recording_should_get_a_test_run.json | 29 +++++++++++++ .../test/public/createAppComponent.spec.ts | 43 +++++++++++++++++++ .../test/public/createTestRun.spec.ts | 41 ++++++++++++++++++ .../test/public/uploadTestFile.spec.ts | 40 +++++++++++++++++ 10 files changed, 273 insertions(+), 7 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/createAppComponent.spec.ts create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts diff --git a/sdk/loadtestservice/load-testing-rest/karma.conf.js b/sdk/loadtestservice/load-testing-rest/karma.conf.js index 85ddb06133aa..15b9947b1282 100644 --- a/sdk/loadtestservice/load-testing-rest/karma.conf.js +++ b/sdk/loadtestservice/load-testing-rest/karma.conf.js @@ -55,11 +55,12 @@ module.exports = function(config) { envPreprocessor: [ "TEST_MODE", - "ENDPOINT", + "LOADTESTSERVICE_ENDPOINT", "AZURE_CLIENT_SECRET", "AZURE_CLIENT_ID", "AZURE_TENANT_ID", - "SUBSCRIPTION_ID" + "SUBSCRIPTION_ID", + "RECORDINGS_RELATIVE_PATH", ], // test results reporter to use @@ -107,7 +108,7 @@ module.exports = function(config) { customLaunchers: { ChromeHeadlessNoSandbox: { base: "ChromeHeadless", - flags: ["--no-sandbox", "--disable-web-security"] + flags: ["--no-sandbox", "--disable-web-security", "--lang=en-US"] } }, diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index d5d932657e6b..0ccd8f25f4ce 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -93,6 +93,8 @@ "@azure/core-lro": "~2.4.0", "@azure/identity": "^2.0.1", "@microsoft/api-extractor": "7.18.11", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@types/chai": "^4.2.8", "@types/mocha": "^10.0.0", "@types/node": "^12.0.0", diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json new file mode 100644 index 000000000000..5d64cf936cab --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json @@ -0,0 +1,42 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/appcomp123/app-components?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "427", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "eb78087f-655f-4721-8259-086eeb845764" + }, + "RequestBody": { + "testId": "abc", + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "subscriptionId": "azure_subscription_id" + } + } + }, + "StatusCode": 405, + "ResponseHeaders": { + "Allow": "GET", + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 16 Nov 2022 13:16:28 GMT", + "mise-correlation-id": "c728867c-2f50-4708-b378-650c90456cd9", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ae666e8e-6857-4f22-b9cf-05458aefd85c" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json new file mode 100644 index 000000000000..0af9ebc3c582 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json @@ -0,0 +1,32 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/xyz12365?api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "multipart/form-data; boundary=--------------------------146227240780675003717634", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "c49014bb-e1b5-4b54-aec9-a0a212551417" + }, + "RequestBody": "LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTE0NjIyNzI0MDc4MDY3NTAwMzcxNzYzNA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9InNhbXBsZS5qbXgiDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbQ0KDQo8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCI/Pgo8am1ldGVyVGVzdFBsYW4gdmVyc2lvbj0iMS4yIiBwcm9wZXJ0aWVzPSI1LjAiIGptZXRlcj0iNS4zIj4KICA8aGFzaFRyZWU\u002BCiAgICA8VGVzdFBsYW4gZ3VpY2xhc3M9IlRlc3RQbGFuR3VpIiB0ZXN0Y2xhc3M9IlRlc3RQbGFuIiB0ZXN0bmFtZT0iVGVzdCBQbGFuIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGVzdFBsYW4uY29tbWVudHMiPjwvc3RyaW5nUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLmZ1bmN0aW9uYWxfbW9kZSI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8Ym9vbFByb3AgbmFtZT0iVGVzdFBsYW4uc2VyaWFsaXplX3RocmVhZGdyb3VwcyI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGVzdFBsYW4udXNlcl9kZWZpbmVkX3ZhcmlhYmxlcyIgZWxlbWVudFR5cGU9IkFyZ3VtZW50cyIgZ3VpY2xhc3M9IkFyZ3VtZW50c1BhbmVsIiB0ZXN0Y2xhc3M9IkFyZ3VtZW50cyIgdGVzdG5hbWU9IlVzZXIgRGVmaW5lZCBWYXJpYWJsZXMiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lX2NsYXNzcGF0aCI\u002BPC9zdHJpbmdQcm9wPgogICAgPC9UZXN0UGxhbj4KICAgIDxoYXNoVHJlZT4KICAgICAgPFRocmVhZEdyb3VwIGd1aWNsYXNzPSJUaHJlYWRHcm91cEd1aSIgdGVzdGNsYXNzPSJUaHJlYWRHcm91cCIgdGVzdG5hbWU9IlRocmVhZCBHcm91cCIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAub25fc2FtcGxlX2Vycm9yIj5jb250aW51ZTwvc3RyaW5nUHJvcD4KICAgICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGhyZWFkR3JvdXAubWFpbl9jb250cm9sbGVyIiBlbGVtZW50VHlwZT0iTG9vcENvbnRyb2xsZXIiIGd1aWNsYXNzPSJMb29wQ29udHJvbFBhbmVsIiB0ZXN0Y2xhc3M9Ikxvb3BDb250cm9sbGVyIiB0ZXN0bmFtZT0iTG9vcCBDb250cm9sbGVyIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5jb250aW51ZV9mb3JldmVyIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5sb29wcyI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9lbGVtZW50UHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5udW1fdGhyZWFkcyI\u002BNTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BNjA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTE0NjIyNzI0MDc4MDY3NTAwMzcxNzYzNC0tDQo=", + "StatusCode": 405, + "ResponseHeaders": { + "Allow": "GET", + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 16 Nov 2022 13:16:29 GMT", + "mise-correlation-id": "1b924603-1e78-4303-a81c-f663cf441ea7", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ec01c442-ad15-446f-8840-d49b223d2216" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json index 7d4e3875aa31..ad2d95206631 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "d827bd4c-dc23-4853-8c87-84bcecb73f05" + "x-ms-client-request-id": "78a2740e-9778-4210-9291-2004b595cf26" }, "RequestBody": { "displayName": "sample_test", @@ -26,11 +26,11 @@ "Allow": "GET", "Connection": "keep-alive", "Content-Length": "0", - "Date": "Wed, 16 Nov 2022 12:22:54 GMT", - "mise-correlation-id": "ffdd9464-0c3f-44be-a2b6-9a7d20b9ee2e", + "Date": "Wed, 16 Nov 2022 13:16:28 GMT", + "mise-correlation-id": "d8e1e8aa-bc62-4fc3-b00a-fc1e1af4c0b4", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "22fd8bc5-d8fd-4fc9-97b4-d249d3df76a7" + "x-ms-correlation-request-id": "7eb47496-c322-4a76-baa4-30a80fe76394" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json new file mode 100644 index 000000000000..2ec154d9fee9 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json @@ -0,0 +1,36 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "59", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "c014e92c-f815-41cf-b571-5458cbf6ab0d" + }, + "RequestBody": { + "testId": "abc", + "displayName": "sample_testrun", + "vusers": 10 + }, + "StatusCode": 405, + "ResponseHeaders": { + "Allow": "GET", + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Wed, 16 Nov 2022 13:16:28 GMT", + "mise-correlation-id": "3247b7c8-0d27-4aad-aba5-16f2e8348b9a", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "eee10b2f-355b-46dc-a960-264cf94a23c0" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json new file mode 100644 index 000000000000..933618dc17be --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -0,0 +1,29 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "a10c94f2-762f-4ec6-8f13-c239eaec0d0a" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Connection": "keep-alive", + "Date": "Wed, 16 Nov 2022 13:16:28 GMT", + "mise-correlation-id": "5d8eae22-0211-4cb5-9e7a-f56287dbc86f", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7485edc9-d2fb-4e39-9c3d-406ab6e4f46d" + }, + "ResponseBody": "TmF2aWdhdGUgdG8gL2hlYWx0aCB0byBzZWUgdGhlIGhlYWx0aCBzdGF0dXMu" + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/test/public/createAppComponent.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/createAppComponent.spec.ts new file mode 100644 index 000000000000..485cefa305db --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/createAppComponent.spec.ts @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder, env } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createRecorder, createClient } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; + +describe("Create app component", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + client = createClient(recorder); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create the app components", async () => { + const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; + const result = await client.path("/tests/{testId}/app-components", "appcomp123").patch({ + contentType: "application/merge-patch+json", + body: { + testId: "abc", + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + assert.include(["200", "201"], result.status); + }); +}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts new file mode 100644 index 000000000000..7304af7efa7f --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createRecorder, createClient } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; + +describe("Test Run Creation", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + client = createClient(recorder); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create a test run", async () => { + const result = await client.path("/test-runs/{testRunId}", "abcde").patch({ + contentType: "application/merge-patch+json", + body: { + testId: "abc", + displayName: "sample_testrun", + vusers: 10, + }, + }); + + assert.include(["200"], result.status); + }); + + it("should get a test run", async () => { + const result = await client.path("/test-runs/{testRunId}", "abcde").get(); + + assert.include(["200"], result.status); + }); +}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts new file mode 100644 index 000000000000..eb66a7dec533 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createClient, createRecorder } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; +import * as fs from "fs"; +import { isNode } from "@azure/core-util"; + +describe("File Upload", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + let readStream: fs.ReadStream; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + if (!isNode || isPlaybackMode()) { + this.skip(); + } + client = createClient(recorder); + readStream = fs.createReadStream("./test/public/sample.jmx"); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should upload the test file", async () => { + const result = await client.path("/tests/{testId}/files/{fileId}", "abc", "xyz12365").put({ + contentType: "multipart/form-data", + body: { + file: readStream, + }, + }); + + assert.include(["201"], result.status); + }); +}); From e565030ba82779b736e21787de22a7421f61f969 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 17 Nov 2022 09:27:38 +0530 Subject: [PATCH 11/60] formatting changes --- .../load-testing-rest/karma.conf.js | 26 ++--- .../load-testing-rest/package.json | 1 + .../samples-dev/createAppComponent.ts | 3 +- .../samples-dev/createOrUpdateTest.ts | 5 +- .../samples-dev/createTestRunAndGetMetrics.ts | 1 - .../load-testing-rest/src/azureLoadTesting.ts | 14 +-- .../src/clientDefinitions.ts | 62 ++++-------- .../load-testing-rest/src/isUnexpected.ts | 42 +++----- .../load-testing-rest/src/models.ts | 18 +--- .../load-testing-rest/src/outputModels.ts | 18 +--- .../load-testing-rest/src/paginateHelper.ts | 37 ++----- .../load-testing-rest/src/parameters.ts | 8 +- .../load-testing-rest/src/responses.ts | 98 +++++++------------ 13 files changed, 97 insertions(+), 236 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/karma.conf.js b/sdk/loadtestservice/load-testing-rest/karma.conf.js index 15b9947b1282..2664494e4228 100644 --- a/sdk/loadtestservice/load-testing-rest/karma.conf.js +++ b/sdk/loadtestservice/load-testing-rest/karma.conf.js @@ -7,7 +7,7 @@ require("dotenv").config(); const { relativeRecordingsPath } = require("@azure-tools/test-recorder"); process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); -module.exports = function(config) { +module.exports = function (config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: "./", @@ -27,7 +27,7 @@ module.exports = function(config) { "karma-coverage", "karma-sourcemap-loader", "karma-junit-reporter", - "karma-source-map-support" + "karma-source-map-support", ], // list of files / patterns to load in the browser @@ -37,8 +37,8 @@ module.exports = function(config) { pattern: "dist-test/index.browser.js.map", type: "html", included: false, - served: true - } + served: true, + }, ], // list of files / patterns to exclude @@ -47,7 +47,7 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - "**/*.js": ["sourcemap", "env"] + "**/*.js": ["sourcemap", "env"], // IMPORTANT: COMMENT following line if you want to debug in your browsers!! // Preprocess source file to calculate code coverage, however this will make source file unreadable // "dist-test/index.js": ["coverage"] @@ -75,8 +75,8 @@ module.exports = function(config) { { type: "json", subdir: ".", file: "coverage.json" }, { type: "lcovonly", subdir: ".", file: "lcov.info" }, { type: "html", subdir: "html" }, - { type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" } - ] + { type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" }, + ], }, junitReporter: { @@ -86,7 +86,7 @@ module.exports = function(config) { useBrowserName: false, // add browser name to report and classes names nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element - properties: {} // key value pair of properties to add to the section of the report + properties: {}, // key value pair of properties to add to the section of the report }, // web server port @@ -108,8 +108,8 @@ module.exports = function(config) { customLaunchers: { ChromeHeadlessNoSandbox: { base: "ChromeHeadless", - flags: ["--no-sandbox", "--disable-web-security", "--lang=en-US"] - } + flags: ["--no-sandbox", "--disable-web-security", "--lang=en-US"], + }, }, // Continuous Integration mode @@ -128,8 +128,8 @@ module.exports = function(config) { mocha: { // change Karma's debug.html to the mocha web reporter reporter: "html", - timeout: "600000" - } - } + timeout: "600000", + }, + }, }); }; diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index 0ccd8f25f4ce..ee73d327c55d 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -85,6 +85,7 @@ "@azure/core-paging": "^1.2.0", "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", + "@azure/core-util": "1.1.1", "tslib": "^2.2.0" }, "devDependencies": { diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts index c012938aa390..9c48998390ef 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts @@ -12,7 +12,6 @@ import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { v4 as uuidv4 } from "uuid"; - async function main() { const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; const displayName = "some-load-test"; @@ -59,7 +58,7 @@ async function main() { }, }); - if (isUnexpected(appComponentCreationResult)) { + if (isUnexpected(appComponentCreationResult)) { throw appComponentCreationResult.body.error; } } diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts index d357c3c70e4a..7905167c3914 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts @@ -8,7 +8,7 @@ * @azsdk-weight 10 */ -import AzureLoadTesting/*, { isUnexpected }*/ from "@azure-rest/load-testing"; +import AzureLoadTesting /*, { isUnexpected }*/ from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { v4 as uuidv4 } from "uuid"; @@ -26,12 +26,11 @@ async function main() { body: { displayName: displayName, description: "", - loadTestConfiguration : { + loadTestConfiguration: { engineInstances: 1, // number of engine instances to run test }, }, }); - } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts index 49fc76a717be..964389a389f6 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts @@ -58,6 +58,5 @@ async function main() { } console.log(getTestRunResult); - } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts b/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts index fcfa0fd49e85..38dd27db597a 100644 --- a/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts +++ b/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts @@ -15,8 +15,8 @@ export default function createClient( options = { ...options, credentials: { - scopes: ["https://cnt-prod.loadtesting.azure.com/.default"] - } + scopes: ["https://cnt-prod.loadtesting.azure.com/.default"], + }, }; const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0`; @@ -27,15 +27,11 @@ export default function createClient( options = { ...options, userAgentOptions: { - userAgentPrefix - } + userAgentPrefix, + }, }; - const client = getClient( - baseUrl, - credentials, - options - ) as AzureLoadTestingClient; + const client = getClient(baseUrl, credentials, options) as AzureLoadTestingClient; return client; } diff --git a/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts b/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts index 2bcba986990a..3182b08d843c 100644 --- a/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts +++ b/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts @@ -26,7 +26,7 @@ import { TestRunCreateOrUpdateAppComponentParameters, TestRunGetAppComponentsParameters, TestRunCreateOrUpdateServerMetricsConfigParameters, - TestRunGetServerMetricsConfigParameters + TestRunGetServerMetricsConfigParameters, } from "./parameters"; import { LoadTestAdministrationCreateOrUpdateTest200Response, @@ -83,7 +83,7 @@ import { TestRunCreateOrUpdateServerMetricsConfig201Response, TestRunCreateOrUpdateServerMetricsConfigdefaultResponse, TestRunGetServerMetricsConfig200Response, - TestRunGetServerMetricsConfigdefaultResponse + TestRunGetServerMetricsConfigdefaultResponse, } from "./responses"; import { Client, StreamableMethod } from "@azure-rest/core-client"; @@ -100,15 +100,13 @@ export interface LoadTestAdministrationCreateOrUpdateTest { delete( options?: LoadTestAdministrationDeleteTestParameters ): StreamableMethod< - | LoadTestAdministrationDeleteTest204Response - | LoadTestAdministrationDeleteTestdefaultResponse + LoadTestAdministrationDeleteTest204Response | LoadTestAdministrationDeleteTestdefaultResponse >; /** Get load test details by test name */ get( options?: LoadTestAdministrationGetTestParameters ): StreamableMethod< - | LoadTestAdministrationGetTest200Response - | LoadTestAdministrationGetTestdefaultResponse + LoadTestAdministrationGetTest200Response | LoadTestAdministrationGetTestdefaultResponse >; } @@ -117,8 +115,7 @@ export interface LoadTestAdministrationListTests { get( options?: LoadTestAdministrationListTestsParameters ): StreamableMethod< - | LoadTestAdministrationListTests200Response - | LoadTestAdministrationListTestsdefaultResponse + LoadTestAdministrationListTests200Response | LoadTestAdministrationListTestsdefaultResponse >; } @@ -127,22 +124,19 @@ export interface LoadTestAdministrationUploadFile { put( options: LoadTestAdministrationUploadFileParameters ): StreamableMethod< - | LoadTestAdministrationUploadFile201Response - | LoadTestAdministrationUploadFiledefaultResponse + LoadTestAdministrationUploadFile201Response | LoadTestAdministrationUploadFiledefaultResponse >; /** Get test file by the file name. */ get( options?: LoadTestAdministrationGetFileParameters ): StreamableMethod< - | LoadTestAdministrationGetFile200Response - | LoadTestAdministrationGetFiledefaultResponse + LoadTestAdministrationGetFile200Response | LoadTestAdministrationGetFiledefaultResponse >; /** Delete file by the file name for a test */ delete( options?: LoadTestAdministrationDeleteFileParameters ): StreamableMethod< - | LoadTestAdministrationDeleteFile204Response - | LoadTestAdministrationDeleteFiledefaultResponse + LoadTestAdministrationDeleteFile204Response | LoadTestAdministrationDeleteFiledefaultResponse >; } @@ -200,9 +194,7 @@ export interface TestRunDelete { /** Create and start a new test run with the given name. */ patch( options: TestRunCreateOrUpdateParameters - ): StreamableMethod< - TestRunCreateOrUpdate200Response | TestRunCreateOrUpdatedefaultResponse - >; + ): StreamableMethod; /** Get test run details by name. */ get( options?: TestRunGetParameters @@ -213,9 +205,7 @@ export interface TestRunGetFile { /** Get test run file by file name. */ get( options?: TestRunGetFileParameters - ): StreamableMethod< - TestRunGetFile200Response | TestRunGetFiledefaultResponse - >; + ): StreamableMethod; } export interface TestRunList { @@ -237,8 +227,7 @@ export interface TestRunListMetricNamespaces { get( options?: TestRunListMetricNamespacesParameters ): StreamableMethod< - | TestRunListMetricNamespaces200Response - | TestRunListMetricNamespacesdefaultResponse + TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesdefaultResponse >; } @@ -247,8 +236,7 @@ export interface TestRunListMetricDefinitions { get( options: TestRunListMetricDefinitionsParameters ): StreamableMethod< - | TestRunListMetricDefinitions200Response - | TestRunListMetricDefinitionsdefaultResponse + TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsdefaultResponse >; } @@ -256,9 +244,7 @@ export interface TestRunGetMetrics { /** Lists the metric values for a load test run. */ post( options: TestRunGetMetricsParameters - ): StreamableMethod< - TestRunGetMetrics200Response | TestRunGetMetricsdefaultResponse - >; + ): StreamableMethod; } export interface TestRunCreateOrUpdateAppComponent { @@ -273,9 +259,7 @@ export interface TestRunCreateOrUpdateAppComponent { /** Get associated app component (collection of azure resources) for the given test run. */ get( options?: TestRunGetAppComponentsParameters - ): StreamableMethod< - TestRunGetAppComponents200Response | TestRunGetAppComponentsdefaultResponse - >; + ): StreamableMethod; } export interface TestRunCreateOrUpdateServerMetricsConfig { @@ -291,17 +275,13 @@ export interface TestRunCreateOrUpdateServerMetricsConfig { get( options?: TestRunGetServerMetricsConfigParameters ): StreamableMethod< - | TestRunGetServerMetricsConfig200Response - | TestRunGetServerMetricsConfigdefaultResponse + TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigdefaultResponse >; } export interface Routes { /** Resource for '/tests/\{testId\}' has methods for the following verbs: patch, delete, get */ - ( - path: "/tests/{testId}", - testId: string - ): LoadTestAdministrationCreateOrUpdateTest; + (path: "/tests/{testId}", testId: string): LoadTestAdministrationCreateOrUpdateTest; /** Resource for '/tests' has methods for the following verbs: get */ (path: "/tests"): LoadTestAdministrationListTests; /** Resource for '/tests/\{testId\}/files/\{fileId\}' has methods for the following verbs: put, get, delete */ @@ -311,10 +291,7 @@ export interface Routes { fileId: string ): LoadTestAdministrationUploadFile; /** Resource for '/tests/\{testId\}/files' has methods for the following verbs: get */ - ( - path: "/tests/{testId}/files", - testId: string - ): LoadTestAdministrationListFilesTest; + (path: "/tests/{testId}/files", testId: string): LoadTestAdministrationListFilesTest; /** Resource for '/tests/\{testId\}/app-components' has methods for the following verbs: patch, get */ ( path: "/tests/{testId}/app-components", @@ -348,10 +325,7 @@ export interface Routes { testRunId: string ): TestRunListMetricDefinitions; /** Resource for '/test-runs/\{testRunId\}/metrics' has methods for the following verbs: post */ - ( - path: "/test-runs/{testRunId}/metrics", - testRunId: string - ): TestRunGetMetrics; + (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunGetMetrics; /** Resource for '/test-runs/\{testRunId\}/app-components' has methods for the following verbs: patch, get */ ( path: "/test-runs/{testRunId}/app-components", diff --git a/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts b/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts index 47c8de37a81c..2c6d9161b9de 100644 --- a/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts +++ b/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts @@ -56,7 +56,7 @@ import { TestRunCreateOrUpdateServerMetricsConfig201Response, TestRunCreateOrUpdateServerMetricsConfigdefaultResponse, TestRunGetServerMetricsConfig200Response, - TestRunGetServerMetricsConfigdefaultResponse + TestRunGetServerMetricsConfigdefaultResponse, } from "./responses"; const responseMap: Record = { @@ -84,7 +84,7 @@ const responseMap: Record = { "PATCH /test-runs/{testRunId}/app-components": ["200", "201"], "GET /test-runs/{testRunId}/app-components": ["200"], "PATCH /test-runs/{testRunId}/server-metric-configs": ["200", "201"], - "GET /test-runs/{testRunId}/server-metric-configs": ["200"] + "GET /test-runs/{testRunId}/server-metric-configs": ["200"], }; export function isUnexpected( @@ -99,9 +99,7 @@ export function isUnexpected( | LoadTestAdministrationDeleteTestdefaultResponse ): response is LoadTestAdministrationDeleteTestdefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationGetTest200Response - | LoadTestAdministrationGetTestdefaultResponse + response: LoadTestAdministrationGetTest200Response | LoadTestAdministrationGetTestdefaultResponse ): response is LoadTestAdministrationGetTestdefaultResponse; export function isUnexpected( response: @@ -114,9 +112,7 @@ export function isUnexpected( | LoadTestAdministrationUploadFiledefaultResponse ): response is LoadTestAdministrationUploadFiledefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationGetFile200Response - | LoadTestAdministrationGetFiledefaultResponse + response: LoadTestAdministrationGetFile200Response | LoadTestAdministrationGetFiledefaultResponse ): response is LoadTestAdministrationGetFiledefaultResponse; export function isUnexpected( response: @@ -154,9 +150,7 @@ export function isUnexpected( response: TestRunDelete204Response | TestRunDeletedefaultResponse ): response is TestRunDeletedefaultResponse; export function isUnexpected( - response: - | TestRunCreateOrUpdate200Response - | TestRunCreateOrUpdatedefaultResponse + response: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdatedefaultResponse ): response is TestRunCreateOrUpdatedefaultResponse; export function isUnexpected( response: TestRunGet200Response | TestRunGetdefaultResponse @@ -171,14 +165,10 @@ export function isUnexpected( response: TestRunStop200Response | TestRunStopdefaultResponse ): response is TestRunStopdefaultResponse; export function isUnexpected( - response: - | TestRunListMetricNamespaces200Response - | TestRunListMetricNamespacesdefaultResponse + response: TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesdefaultResponse ): response is TestRunListMetricNamespacesdefaultResponse; export function isUnexpected( - response: - | TestRunListMetricDefinitions200Response - | TestRunListMetricDefinitionsdefaultResponse + response: TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsdefaultResponse ): response is TestRunListMetricDefinitionsdefaultResponse; export function isUnexpected( response: TestRunGetMetrics200Response | TestRunGetMetricsdefaultResponse @@ -190,9 +180,7 @@ export function isUnexpected( | TestRunCreateOrUpdateAppComponentdefaultResponse ): response is TestRunCreateOrUpdateAppComponentdefaultResponse; export function isUnexpected( - response: - | TestRunGetAppComponents200Response - | TestRunGetAppComponentsdefaultResponse + response: TestRunGetAppComponents200Response | TestRunGetAppComponentsdefaultResponse ): response is TestRunGetAppComponentsdefaultResponse; export function isUnexpected( response: @@ -201,9 +189,7 @@ export function isUnexpected( | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse ): response is TestRunCreateOrUpdateServerMetricsConfigdefaultResponse; export function isUnexpected( - response: - | TestRunGetServerMetricsConfig200Response - | TestRunGetServerMetricsConfigdefaultResponse + response: TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigdefaultResponse ): response is TestRunGetServerMetricsConfigdefaultResponse; export function isUnexpected( response: @@ -311,17 +297,11 @@ function geParametrizedPathSuccess(path: string): string[] { // If the candidate and actual paths don't match in size // we move on to the next candidate path - if ( - candidateParts.length === pathParts.length && - hasParametrizedPath(key) - ) { + if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) { // track if we have found a match to return the values found. let found = true; for (let i = 0; i < candidateParts.length; i++) { - if ( - candidateParts[i].startsWith("{") && - candidateParts[i].endsWith("}") - ) { + if (candidateParts[i].startsWith("{") && candidateParts[i].endsWith("}")) { // If the current part of the candidate is a "template" part // it is a match with the actual path part on hand // skip as the parameterized part can match anything diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 799aeb85ecb1..91e7056a3ef9 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -43,23 +43,9 @@ export interface PassFailCriteria { export interface PassFailMetric { /** The client metric on which the criteria should be applied. */ - clientmetric?: - | "response_time_ms" - | "latency" - | "error" - | "requests" - | "requests_per_sec"; + clientmetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests */ - aggregate?: - | "count" - | "percentage" - | "avg" - | "p50" - | "p90" - | "p95" - | "p99" - | "min" - | "max"; + aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; /** The comparison operator. Supported types ‘>’, ‘<’ */ condition?: string; /** Request name for which the Pass fail criteria has to be applied */ diff --git a/sdk/loadtestservice/load-testing-rest/src/outputModels.ts b/sdk/loadtestservice/load-testing-rest/src/outputModels.ts index 950412b1b442..5624b4a36798 100644 --- a/sdk/loadtestservice/load-testing-rest/src/outputModels.ts +++ b/sdk/loadtestservice/load-testing-rest/src/outputModels.ts @@ -43,23 +43,9 @@ export interface PassFailCriteriaOutput { export interface PassFailMetricOutput { /** The client metric on which the criteria should be applied. */ - clientmetric?: - | "response_time_ms" - | "latency" - | "error" - | "requests" - | "requests_per_sec"; + clientmetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests */ - aggregate?: - | "count" - | "percentage" - | "avg" - | "p50" - | "p90" - | "p95" - | "p99" - | "min" - | "max"; + aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; /** The comparison operator. Supported types ‘>’, ‘<’ */ condition?: string; /** Request name for which the Pass fail criteria has to be applied */ diff --git a/sdk/loadtestservice/load-testing-rest/src/paginateHelper.ts b/sdk/loadtestservice/load-testing-rest/src/paginateHelper.ts index 17be16382f32..477bace4a37f 100644 --- a/sdk/loadtestservice/load-testing-rest/src/paginateHelper.ts +++ b/sdk/loadtestservice/load-testing-rest/src/paginateHelper.ts @@ -1,16 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { - getPagedAsyncIterator, - PagedAsyncIterableIterator, - PagedResult -} from "@azure/core-paging"; -import { - Client, - createRestError, - PathUncheckedResponse -} from "@azure-rest/core-client"; +import { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from "@azure/core-paging"; +import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; /** * Helper type to extract the type of an array @@ -75,18 +67,16 @@ export function paginate( typeof customGetPage === "function" ? customGetPage : async (pageLink: string) => { - const result = firstRun - ? initialResponse - : await client.pathUnchecked(pageLink).get(); + const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get(); firstRun = false; checkPagingRequest(result); const nextLink = getNextLink(result.body, nextLinkName); const values = getElements(result.body, itemName); return { page: values, - nextPageLink: nextLink + nextPageLink: nextLink, }; - } + }, }; return getPagedAsyncIterator(pagedResult); @@ -103,9 +93,7 @@ function getNextLink(body: unknown, nextLinkName?: string): string | undefined { const nextLink = (body as Record)[nextLinkName]; if (typeof nextLink !== "string" && typeof nextLink !== "undefined") { - throw new Error( - `Body Property ${nextLinkName} should be a string or undefined` - ); + throw new Error(`Body Property ${nextLinkName} should be a string or undefined`); } return nextLink; @@ -133,18 +121,7 @@ function getElements(body: unknown, itemName: string): T[] { * Checks if a request failed */ function checkPagingRequest(response: PathUncheckedResponse): void { - const Http2xxStatusCodes = [ - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "226" - ]; + const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"]; if (!Http2xxStatusCodes.includes(response.status)) { throw createRestError( `Pagination failed with unexpected statusCode ${response.status}`, diff --git a/sdk/loadtestservice/load-testing-rest/src/parameters.ts b/sdk/loadtestservice/load-testing-rest/src/parameters.ts index e6da084ab9dd..ca132584acc2 100644 --- a/sdk/loadtestservice/load-testing-rest/src/parameters.ts +++ b/sdk/loadtestservice/load-testing-rest/src/parameters.ts @@ -9,7 +9,7 @@ import { TestRun, MetricRequestPayload, TestRunAppComponents, - TestRunServerMetricConfig + TestRunServerMetricConfig, } from "./models"; export interface LoadTestAdministrationCreateOrUpdateTestBodyParam { @@ -60,11 +60,7 @@ export interface LoadTestAdministrationUploadFileFormBody { * * Value may contain any sequence of octets */ - file: - | string - | Uint8Array - | ReadableStream - | NodeJS.ReadableStream; + file: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; } export interface LoadTestAdministrationUploadFileQueryParamProperties { diff --git a/sdk/loadtestservice/load-testing-rest/src/responses.ts b/sdk/loadtestservice/load-testing-rest/src/responses.ts index 65a8483cf5ce..f79716a8c8ee 100644 --- a/sdk/loadtestservice/load-testing-rest/src/responses.ts +++ b/sdk/loadtestservice/load-testing-rest/src/responses.ts @@ -17,19 +17,17 @@ import { MetricDefinitionCollectionOutput, ResponseOutput, TestRunAppComponentsOutput, - TestRunServerMetricConfigOutput + TestRunServerMetricConfigOutput, } from "./outputModels"; /** Create a new test or update an existing test. */ -export interface LoadTestAdministrationCreateOrUpdateTest200Response - extends HttpResponse { +export interface LoadTestAdministrationCreateOrUpdateTest200Response extends HttpResponse { status: "200"; body: TestOutput; } /** Create a new test or update an existing test. */ -export interface LoadTestAdministrationCreateOrUpdateTest201Response - extends HttpResponse { +export interface LoadTestAdministrationCreateOrUpdateTest201Response extends HttpResponse { status: "201"; body: TestOutput; } @@ -40,17 +38,14 @@ export interface LoadTestAdministrationCreateOrUpdateTestdefaultHeaders { } /** Create a new test or update an existing test. */ -export interface LoadTestAdministrationCreateOrUpdateTestdefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationCreateOrUpdateTestdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & - LoadTestAdministrationCreateOrUpdateTestdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateTestdefaultHeaders; } /** Delete a test by its name. */ -export interface LoadTestAdministrationDeleteTest204Response - extends HttpResponse { +export interface LoadTestAdministrationDeleteTest204Response extends HttpResponse { status: "204"; body: Record; } @@ -61,8 +56,7 @@ export interface LoadTestAdministrationDeleteTestdefaultHeaders { } /** Delete a test by its name. */ -export interface LoadTestAdministrationDeleteTestdefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationDeleteTestdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & LoadTestAdministrationDeleteTestdefaultHeaders; @@ -80,16 +74,14 @@ export interface LoadTestAdministrationGetTestdefaultHeaders { } /** Get load test details by test name */ -export interface LoadTestAdministrationGetTestdefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationGetTestdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & LoadTestAdministrationGetTestdefaultHeaders; } /** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ -export interface LoadTestAdministrationListTests200Response - extends HttpResponse { +export interface LoadTestAdministrationListTests200Response extends HttpResponse { status: "200"; body: TestsListOutput; } @@ -100,16 +92,14 @@ export interface LoadTestAdministrationListTestsdefaultHeaders { } /** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ -export interface LoadTestAdministrationListTestsdefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationListTestsdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & LoadTestAdministrationListTestsdefaultHeaders; } /** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ -export interface LoadTestAdministrationUploadFile201Response - extends HttpResponse { +export interface LoadTestAdministrationUploadFile201Response extends HttpResponse { status: "201"; body: FileInfoOutput; } @@ -120,8 +110,7 @@ export interface LoadTestAdministrationUploadFiledefaultHeaders { } /** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ -export interface LoadTestAdministrationUploadFiledefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationUploadFiledefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & LoadTestAdministrationUploadFiledefaultHeaders; @@ -139,16 +128,14 @@ export interface LoadTestAdministrationGetFiledefaultHeaders { } /** Get test file by the file name. */ -export interface LoadTestAdministrationGetFiledefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationGetFiledefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & LoadTestAdministrationGetFiledefaultHeaders; } /** Delete file by the file name for a test */ -export interface LoadTestAdministrationDeleteFile204Response - extends HttpResponse { +export interface LoadTestAdministrationDeleteFile204Response extends HttpResponse { status: "204"; body: Record; } @@ -159,16 +146,14 @@ export interface LoadTestAdministrationDeleteFiledefaultHeaders { } /** Delete file by the file name for a test */ -export interface LoadTestAdministrationDeleteFiledefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationDeleteFiledefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & LoadTestAdministrationDeleteFiledefaultHeaders; } /** Get all test files. */ -export interface LoadTestAdministrationListFilesTest200Response - extends HttpResponse { +export interface LoadTestAdministrationListFilesTest200Response extends HttpResponse { status: "200"; body: FileInfoListOutput; } @@ -179,8 +164,7 @@ export interface LoadTestAdministrationListFilesTestdefaultHeaders { } /** Get all test files. */ -export interface LoadTestAdministrationListFilesTestdefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationListFilesTestdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & LoadTestAdministrationListFilesTestdefaultHeaders; @@ -210,13 +194,11 @@ export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResp extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & - LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders; } /** Get associated app component (collection of azure resources) for the given test. */ -export interface LoadTestAdministrationGetAppComponentsTest200Response - extends HttpResponse { +export interface LoadTestAdministrationGetAppComponentsTest200Response extends HttpResponse { status: "200"; body: TestAppComponentsOutput; } @@ -227,12 +209,10 @@ export interface LoadTestAdministrationGetAppComponentsTestdefaultHeaders { } /** Get associated app component (collection of azure resources) for the given test. */ -export interface LoadTestAdministrationGetAppComponentsTestdefaultResponse - extends HttpResponse { +export interface LoadTestAdministrationGetAppComponentsTestdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & - LoadTestAdministrationGetAppComponentsTestdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationGetAppComponentsTestdefaultHeaders; } /** Configure server metrics for a test */ @@ -264,8 +244,7 @@ export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefa } /** Get server metric configuration for the given test. */ -export interface LoadTestAdministrationGetServerMetricsConfigTest200Response - extends HttpResponse { +export interface LoadTestAdministrationGetServerMetricsConfigTest200Response extends HttpResponse { status: "200"; body: TestServerMetricConfigOutput; } @@ -280,8 +259,7 @@ export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & - LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders; + headers: RawHttpHeaders & LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders; } /** Delete a test run by its name. */ @@ -404,8 +382,7 @@ export interface TestRunListMetricNamespacesdefaultHeaders { } /** Lists the metric namespaces for a load test run. */ -export interface TestRunListMetricNamespacesdefaultResponse - extends HttpResponse { +export interface TestRunListMetricNamespacesdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & TestRunListMetricNamespacesdefaultHeaders; @@ -423,8 +400,7 @@ export interface TestRunListMetricDefinitionsdefaultHeaders { } /** Lists the metric definitions for a load test run. */ -export interface TestRunListMetricDefinitionsdefaultResponse - extends HttpResponse { +export interface TestRunListMetricDefinitionsdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & TestRunListMetricDefinitionsdefaultHeaders; @@ -449,15 +425,13 @@ export interface TestRunGetMetricsdefaultResponse extends HttpResponse { } /** Associate an app component (collection of azure resources) to a test run */ -export interface TestRunCreateOrUpdateAppComponent200Response - extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponent200Response extends HttpResponse { status: "200"; body: TestRunAppComponentsOutput; } /** Associate an app component (collection of azure resources) to a test run */ -export interface TestRunCreateOrUpdateAppComponent201Response - extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponent201Response extends HttpResponse { status: "201"; body: TestRunAppComponentsOutput; } @@ -468,8 +442,7 @@ export interface TestRunCreateOrUpdateAppComponentdefaultHeaders { } /** Associate an app component (collection of azure resources) to a test run */ -export interface TestRunCreateOrUpdateAppComponentdefaultResponse - extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponentdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentdefaultHeaders; @@ -494,15 +467,13 @@ export interface TestRunGetAppComponentsdefaultResponse extends HttpResponse { } /** Configure server metrics for a test run */ -export interface TestRunCreateOrUpdateServerMetricsConfig200Response - extends HttpResponse { +export interface TestRunCreateOrUpdateServerMetricsConfig200Response extends HttpResponse { status: "200"; body: TestRunServerMetricConfigOutput; } /** Configure server metrics for a test run */ -export interface TestRunCreateOrUpdateServerMetricsConfig201Response - extends HttpResponse { +export interface TestRunCreateOrUpdateServerMetricsConfig201Response extends HttpResponse { status: "201"; body: TestRunServerMetricConfigOutput; } @@ -513,12 +484,10 @@ export interface TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders { } /** Configure server metrics for a test run */ -export interface TestRunCreateOrUpdateServerMetricsConfigdefaultResponse - extends HttpResponse { +export interface TestRunCreateOrUpdateServerMetricsConfigdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & - TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders; } /** Get server metric configuration for the given test run. */ @@ -533,8 +502,7 @@ export interface TestRunGetServerMetricsConfigdefaultHeaders { } /** Get server metric configuration for the given test run. */ -export interface TestRunGetServerMetricsConfigdefaultResponse - extends HttpResponse { +export interface TestRunGetServerMetricsConfigdefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & TestRunGetServerMetricsConfigdefaultHeaders; From 623957394eb646a5e604c13d70d0588bfd915d79 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 17 Nov 2022 13:46:49 +0530 Subject: [PATCH 12/60] Added Browser Recordings --- ...ding_should_create_the_app_components.json | 50 +++++++++++++++++++ ...recording_should_upload_the_test_file.json | 4 ++ .../recording_should_create_a_loadtest.json | 47 +++++++++++++++++ .../recording_should_create_a_test_run.json | 44 ++++++++++++++++ .../recording_should_get_a_test_run.json | 38 ++++++++++++++ ...ding_should_create_the_app_components.json | 11 ++-- ...recording_should_upload_the_test_file.json | 24 +++++---- .../recording_should_create_a_loadtest.json | 11 ++-- .../recording_should_create_a_test_run.json | 11 ++-- .../recording_should_get_a_test_run.json | 14 +++--- 10 files changed, 220 insertions(+), 34 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json new file mode 100644 index 000000000000..0d0bf98fb231 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json @@ -0,0 +1,50 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/appcomp123/app-components?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "427", + "Content-Type": "application/merge-patch\u002Bjson", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "b1e6768e-1e96-427e-a6ed-12f9e45ecf98", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": { + "testId": "abc", + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "subscriptionId": "azure_subscription_id" + } + } + }, + "StatusCode": 401, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Thu, 17 Nov 2022 06:41:37 GMT", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u002704e186f8-464b-4e33-aa02-6d14f0498cbb: InvalidIssuer.\u0022", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3916e009-0af3-443d-b1f7-47b462263e37" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json new file mode 100644 index 000000000000..6237f7afbffd --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json @@ -0,0 +1,47 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "113", + "Content-Type": "application/merge-patch\u002Bjson", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "8a747f24-53ee-4eda-8071-2995a6dd25e5", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": { + "displayName": "sample_test", + "description": "", + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false + } + }, + "StatusCode": 401, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Thu, 17 Nov 2022 06:41:39 GMT", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027c6aaf243-fcf4-4525-9da4-e04d3f86b1de: InvalidIssuer.\u0022", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "122ce70b-6af3-4f02-969e-99672beca02a" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json new file mode 100644 index 000000000000..f702a58a5aae --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json @@ -0,0 +1,44 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "59", + "Content-Type": "application/merge-patch\u002Bjson", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "b627c3c4-0d75-40fa-98ed-37d697e1e947", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": { + "testId": "abc", + "displayName": "sample_testrun", + "vusers": 10 + }, + "StatusCode": 401, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Thu, 17 Nov 2022 06:41:39 GMT", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027c71fa23f-03a0-45fa-b4d8-7fe3edd4d50a: InvalidIssuer.\u0022", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5fd48f3a-20a2-4369-a1a4-f7b507e240b1" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json new file mode 100644 index 000000000000..58b820d6a122 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json @@ -0,0 +1,38 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "2c4e8509-36f1-40a0-932d-081518d8bbe8", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 401, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "0", + "Date": "Thu, 17 Nov 2022 06:41:40 GMT", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u00273a943b2f-5f2b-48e6-a7e5-0e06cd31bdff: InvalidIssuer.\u0022", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f55e0ffc-2ebd-41b7-97ee-d4cbc461456d" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json index 5d64cf936cab..c9e2d4ea17af 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json @@ -11,7 +11,7 @@ "Content-Length": "427", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "eb78087f-655f-4721-8259-086eeb845764" + "x-ms-client-request-id": "ecef874b-73d6-4df7-afb0-b04c3fd290da" }, "RequestBody": { "testId": "abc", @@ -24,16 +24,15 @@ } } }, - "StatusCode": 405, + "StatusCode": 401, "ResponseHeaders": { - "Allow": "GET", "Connection": "keep-alive", "Content-Length": "0", - "Date": "Wed, 16 Nov 2022 13:16:28 GMT", - "mise-correlation-id": "c728867c-2f50-4708-b378-650c90456cd9", + "Date": "Thu, 17 Nov 2022 06:33:31 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u002704e186f8-464b-4e33-aa02-6d14f0498cbb: InvalidIssuer.\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ae666e8e-6857-4f22-b9cf-05458aefd85c" + "x-ms-correlation-request-id": "f6b51db9-5910-470e-adc5-6c83afe2b91f" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json index 0af9ebc3c582..cab57045bbe9 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json @@ -8,24 +8,30 @@ "Accept-Encoding": "gzip,deflate", "Authorization": "Sanitized", "Connection": "keep-alive", - "Content-Type": "multipart/form-data; boundary=--------------------------146227240780675003717634", + "Content-Type": "multipart/form-data; boundary=--------------------------402919400969033260897728", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "c49014bb-e1b5-4b54-aec9-a0a212551417" + "x-ms-client-request-id": "e41e1c61-22ce-4808-840e-795e6a100986" }, - "RequestBody": "LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTE0NjIyNzI0MDc4MDY3NTAwMzcxNzYzNA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9InNhbXBsZS5qbXgiDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbQ0KDQo8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCI/Pgo8am1ldGVyVGVzdFBsYW4gdmVyc2lvbj0iMS4yIiBwcm9wZXJ0aWVzPSI1LjAiIGptZXRlcj0iNS4zIj4KICA8aGFzaFRyZWU\u002BCiAgICA8VGVzdFBsYW4gZ3VpY2xhc3M9IlRlc3RQbGFuR3VpIiB0ZXN0Y2xhc3M9IlRlc3RQbGFuIiB0ZXN0bmFtZT0iVGVzdCBQbGFuIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGVzdFBsYW4uY29tbWVudHMiPjwvc3RyaW5nUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLmZ1bmN0aW9uYWxfbW9kZSI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8Ym9vbFByb3AgbmFtZT0iVGVzdFBsYW4uc2VyaWFsaXplX3RocmVhZGdyb3VwcyI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGVzdFBsYW4udXNlcl9kZWZpbmVkX3ZhcmlhYmxlcyIgZWxlbWVudFR5cGU9IkFyZ3VtZW50cyIgZ3VpY2xhc3M9IkFyZ3VtZW50c1BhbmVsIiB0ZXN0Y2xhc3M9IkFyZ3VtZW50cyIgdGVzdG5hbWU9IlVzZXIgRGVmaW5lZCBWYXJpYWJsZXMiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lX2NsYXNzcGF0aCI\u002BPC9zdHJpbmdQcm9wPgogICAgPC9UZXN0UGxhbj4KICAgIDxoYXNoVHJlZT4KICAgICAgPFRocmVhZEdyb3VwIGd1aWNsYXNzPSJUaHJlYWRHcm91cEd1aSIgdGVzdGNsYXNzPSJUaHJlYWRHcm91cCIgdGVzdG5hbWU9IlRocmVhZCBHcm91cCIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAub25fc2FtcGxlX2Vycm9yIj5jb250aW51ZTwvc3RyaW5nUHJvcD4KICAgICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGhyZWFkR3JvdXAubWFpbl9jb250cm9sbGVyIiBlbGVtZW50VHlwZT0iTG9vcENvbnRyb2xsZXIiIGd1aWNsYXNzPSJMb29wQ29udHJvbFBhbmVsIiB0ZXN0Y2xhc3M9Ikxvb3BDb250cm9sbGVyIiB0ZXN0bmFtZT0iTG9vcCBDb250cm9sbGVyIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5jb250aW51ZV9mb3JldmVyIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5sb29wcyI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9lbGVtZW50UHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5udW1fdGhyZWFkcyI\u002BNTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BNjA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTE0NjIyNzI0MDc4MDY3NTAwMzcxNzYzNC0tDQo=", + "RequestBody": "LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTQwMjkxOTQwMDk2OTAzMzI2MDg5NzcyOA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9InNhbXBsZS5qbXgiDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbQ0KDQo8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCI/Pgo8am1ldGVyVGVzdFBsYW4gdmVyc2lvbj0iMS4yIiBwcm9wZXJ0aWVzPSI1LjAiIGptZXRlcj0iNS4zIj4KICA8aGFzaFRyZWU\u002BCiAgICA8VGVzdFBsYW4gZ3VpY2xhc3M9IlRlc3RQbGFuR3VpIiB0ZXN0Y2xhc3M9IlRlc3RQbGFuIiB0ZXN0bmFtZT0iVGVzdCBQbGFuIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGVzdFBsYW4uY29tbWVudHMiPjwvc3RyaW5nUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLmZ1bmN0aW9uYWxfbW9kZSI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8Ym9vbFByb3AgbmFtZT0iVGVzdFBsYW4uc2VyaWFsaXplX3RocmVhZGdyb3VwcyI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGVzdFBsYW4udXNlcl9kZWZpbmVkX3ZhcmlhYmxlcyIgZWxlbWVudFR5cGU9IkFyZ3VtZW50cyIgZ3VpY2xhc3M9IkFyZ3VtZW50c1BhbmVsIiB0ZXN0Y2xhc3M9IkFyZ3VtZW50cyIgdGVzdG5hbWU9IlVzZXIgRGVmaW5lZCBWYXJpYWJsZXMiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lX2NsYXNzcGF0aCI\u002BPC9zdHJpbmdQcm9wPgogICAgPC9UZXN0UGxhbj4KICAgIDxoYXNoVHJlZT4KICAgICAgPFRocmVhZEdyb3VwIGd1aWNsYXNzPSJUaHJlYWRHcm91cEd1aSIgdGVzdGNsYXNzPSJUaHJlYWRHcm91cCIgdGVzdG5hbWU9IlRocmVhZCBHcm91cCIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAub25fc2FtcGxlX2Vycm9yIj5jb250aW51ZTwvc3RyaW5nUHJvcD4KICAgICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGhyZWFkR3JvdXAubWFpbl9jb250cm9sbGVyIiBlbGVtZW50VHlwZT0iTG9vcENvbnRyb2xsZXIiIGd1aWNsYXNzPSJMb29wQ29udHJvbFBhbmVsIiB0ZXN0Y2xhc3M9Ikxvb3BDb250cm9sbGVyIiB0ZXN0bmFtZT0iTG9vcCBDb250cm9sbGVyIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5jb250aW51ZV9mb3JldmVyIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5sb29wcyI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9lbGVtZW50UHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5udW1fdGhyZWFkcyI\u002BNTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BNjA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTQwMjkxOTQwMDk2OTAzMzI2MDg5NzcyOC0tDQo=", "StatusCode": 405, "ResponseHeaders": { - "Allow": "GET", + "Allow": "PUT", + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Wed, 16 Nov 2022 13:16:29 GMT", - "mise-correlation-id": "1b924603-1e78-4303-a81c-f663cf441ea7", + "Content-Length": "210", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 06:33:33 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ec01c442-ad15-446f-8840-d49b223d2216" + "x-ms-correlation-request-id": "b4834116-b33b-461f-8bdc-41d7d1bcc709" }, - "ResponseBody": null + "ResponseBody": { + "error": { + "code": "UnsupportedApiVersion", + "message": "The HTTP resource that matches the request URI \u0027http://endpoint/tests/abc/files/xyz12365\u0027 with API version \u00272022-11-01\u0027 does not support HTTP method \u0027PUT\u0027." + } + } } ], "Variables": {} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json index ad2d95206631..2a26d089b0f4 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "78a2740e-9778-4210-9291-2004b595cf26" + "x-ms-client-request-id": "8b337acf-a47f-46c1-86fa-ac6d50a2ef51" }, "RequestBody": { "displayName": "sample_test", @@ -21,16 +21,15 @@ "splitAllCSVs": false } }, - "StatusCode": 405, + "StatusCode": 401, "ResponseHeaders": { - "Allow": "GET", "Connection": "keep-alive", "Content-Length": "0", - "Date": "Wed, 16 Nov 2022 13:16:28 GMT", - "mise-correlation-id": "d8e1e8aa-bc62-4fc3-b00a-fc1e1af4c0b4", + "Date": "Thu, 17 Nov 2022 06:33:32 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027b97836eb-8273-4c87-96c4-53952a9dc241: InvalidIssuer.\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7eb47496-c322-4a76-baa4-30a80fe76394" + "x-ms-correlation-request-id": "9b19df50-22f7-43e6-a2dd-aeddcb380160" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json index 2ec154d9fee9..7725a9500fe1 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json @@ -11,23 +11,22 @@ "Content-Length": "59", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "c014e92c-f815-41cf-b571-5458cbf6ab0d" + "x-ms-client-request-id": "12de133e-8359-4934-b7f1-8d73fd665a5f" }, "RequestBody": { "testId": "abc", "displayName": "sample_testrun", "vusers": 10 }, - "StatusCode": 405, + "StatusCode": 401, "ResponseHeaders": { - "Allow": "GET", "Connection": "keep-alive", "Content-Length": "0", - "Date": "Wed, 16 Nov 2022 13:16:28 GMT", - "mise-correlation-id": "3247b7c8-0d27-4aad-aba5-16f2e8348b9a", + "Date": "Thu, 17 Nov 2022 06:33:32 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027484071fa-96b2-48d0-8ca8-c63a2deed845: InvalidIssuer.\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "eee10b2f-355b-46dc-a960-264cf94a23c0" + "x-ms-correlation-request-id": "77986452-e9ab-4686-b434-0d3028deadd7" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json index 933618dc17be..c3b05997cee8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "a10c94f2-762f-4ec6-8f13-c239eaec0d0a" + "x-ms-client-request-id": "ced75f75-30a9-44c8-8a4f-bd752bdb5f17" }, "RequestBody": null, - "StatusCode": 200, + "StatusCode": 401, "ResponseHeaders": { "Connection": "keep-alive", - "Date": "Wed, 16 Nov 2022 13:16:28 GMT", - "mise-correlation-id": "5d8eae22-0211-4cb5-9e7a-f56287dbc86f", + "Content-Length": "0", + "Date": "Thu, 17 Nov 2022 06:33:32 GMT", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "Transfer-Encoding": "chunked", + "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027c6aaf243-fcf4-4525-9da4-e04d3f86b1de: InvalidIssuer.\u0022", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7485edc9-d2fb-4e39-9c3d-406ab6e4f46d" + "x-ms-correlation-request-id": "7f148af2-4edb-42d4-ab5a-6853de7e7af1" }, - "ResponseBody": "TmF2aWdhdGUgdG8gL2hlYWx0aCB0byBzZWUgdGhlIGhlYWx0aCBzdGF0dXMu" + "ResponseBody": null } ], "Variables": {} From 9d9b44bdfbd4642e1879289bdd5561985aff1dd6 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 17 Nov 2022 21:31:22 +0530 Subject: [PATCH 13/60] Code generated from main API --- .../load-testing-rest/CHANGELOG.md | 7 + .../load-testing-rest/README.md | 10 +- .../load-testing-rest/package.json | 42 +- ...ding_should_create_the_app_components.json | 50 - ...recording_should_upload_the_test_file.json | 4 - .../recording_should_create_a_loadtest.json | 47 - .../recording_should_create_a_test_run.json | 44 - .../recording_should_get_a_test_run.json | 38 - ...ding_should_create_the_app_components.json | 41 - ...recording_should_upload_the_test_file.json | 38 - .../recording_should_create_a_loadtest.json | 38 - .../recording_should_create_a_test_run.json | 35 - .../recording_should_get_a_test_run.json | 29 - .../review/load-testing.api.md | 1193 +++++++++-------- .../samples-dev/createTestRunAndGetMetrics.ts | 2 +- .../samples-dev/fileUpload.ts | 8 +- .../samples/v1/javascript/README.md | 68 - .../v1/javascript/createAppComponent.js | 67 - .../v1/javascript/createOrUpdateTest.js | 35 - .../javascript/createTestRunAndGetMetrics.js | 62 - .../samples/v1/javascript/fileUpload.js | 61 - .../samples/v1/javascript/package.json | 34 - .../samples/v1/javascript/sample.env | 4 - .../samples/v1/typescript/README.md | 81 -- .../samples/v1/typescript/package.json | 44 - .../samples/v1/typescript/sample.env | 4 - .../v1/typescript/src/createAppComponent.ts | 67 - .../v1/typescript/src/createOrUpdateTest.ts | 37 - .../src/createTestRunAndGetMetrics.ts | 63 - .../samples/v1/typescript/src/fileUpload.ts | 61 - .../samples/v1/typescript/tsconfig.json | 17 - .../load-testing-rest/src/azureLoadTesting.ts | 5 + .../src/clientDefinitions.ts | 273 ++-- .../load-testing-rest/src/isUnexpected.ts | 371 ++--- .../load-testing-rest/src/models.ts | 52 +- .../load-testing-rest/src/outputModels.ts | 165 +-- .../load-testing-rest/src/parameters.ts | 112 +- .../load-testing-rest/src/pollingHelper.ts | 71 - .../load-testing-rest/src/responses.ts | 221 +-- .../load-testing-rest/swagger/README.md | 54 +- .../test/public/createTestRun.spec.ts | 2 +- .../test/public/uploadTestFile.spec.ts | 8 +- 42 files changed, 1274 insertions(+), 2391 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/CHANGELOG.md delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json delete mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json delete mode 100644 sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts diff --git a/sdk/loadtestservice/load-testing-rest/CHANGELOG.md b/sdk/loadtestservice/load-testing-rest/CHANGELOG.md new file mode 100644 index 000000000000..582d84c54c3a --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/CHANGELOG.md @@ -0,0 +1,7 @@ +# Release History + +## 1.0.0-beta.1 (2022-10-19) + +### Features Added + +Initial release of the Azure LoadTesting package diff --git a/sdk/loadtestservice/load-testing-rest/README.md b/sdk/loadtestservice/load-testing-rest/README.md index f4c3467870b4..36845d37ac7c 100644 --- a/sdk/loadtestservice/load-testing-rest/README.md +++ b/sdk/loadtestservice/load-testing-rest/README.md @@ -101,12 +101,12 @@ var DISPLAY_NAME = "my-load-test"; const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); -await Client.path("/loadtests/{testId}", TEST_ID).patch({ +await Client.path("/tests/{testId}", TEST_ID).patch({ contentType: "application/merge-patch+json", body: { displayName: DISPLAY_NAME, description: "", - loadTestConfig: { + loadTestConfiguration: { engineInstances: 1, splitAllCSVs: false, }, @@ -130,7 +130,7 @@ const readStream = createReadStream("./sample.jmx"); const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); -await Client.path("/loadtests/{testId}/files/{fileId}", TEST_ID, FILE_ID).put({ +await Client.path("/tests/{testId}/files/{fileId}", TEST_ID, FILE_ID).put({ contentType: "multipart/form-data", body: { file: readStream, @@ -150,7 +150,7 @@ var DISPLAY_NAME = "my-load-test-run"; const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); -await Client.path("/testruns/{testRunId}", TEST_RUN_ID).patch({ +await Client.path("/test-runs/{testRunId}", TEST_RUN_ID).patch({ contentType: "application/merge-patch+json", body: { testId: TEST_ID, @@ -158,7 +158,7 @@ await Client.path("/testruns/{testRunId}", TEST_RUN_ID).patch({ }, }); -var result = await client.path("/testruns/{testRunId}", TEST_RUN_ID).get(); +var result = await client.path("/test-runs/{testRunId}", TEST_RUN_ID).get(); console.log(result); ``` diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index ee73d327c55d..4c4b510f602e 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -3,7 +3,7 @@ "sdk-type": "client", "author": "Microsoft Corporation", "version": "1.0.0", - "description": "", + "description": "A generated SDK for AzureLoadTesting.", "keywords": [ "node", "azure", @@ -16,7 +16,6 @@ "main": "dist/index.js", "module": "./dist-esm/src/index.js", "types": "./types/load-testing.d.ts", - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md", "repository": "github:Azure/azure-sdk-for-js", "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" @@ -29,25 +28,8 @@ "LICENSE", "review/*" ], - "//metadata": { - "constantPaths": [ - { - "path": "swagger/README.md", - "prefix": "package-version" - } - ] - }, - "//sampleConfiguration": { - "productName": "Azure Load Testing rest", - "productSlugs": [ - "azure" - ], - "requiredResources": { - "Azure LoadTesting Service instance": "https://learn.microsoft.com/en-us/azure/load-testing/" - } - }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "scripts": { "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", @@ -81,30 +63,27 @@ "dependencies": { "@azure-rest/core-client": "1.0.0-beta.10", "@azure/core-auth": "^1.3.0", - "@azure/core-lro": "~2.4.0", "@azure/core-paging": "^1.2.0", "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", - "@azure/core-util": "1.1.1", "tslib": "^2.2.0" }, "devDependencies": { "@azure-tools/test-credential": "~1.0.0", "@azure-tools/test-recorder": "^2.0.0", - "@azure/core-lro": "~2.4.0", "@azure/identity": "^2.0.1", "@microsoft/api-extractor": "7.18.11", "@azure/dev-tool": "^1.0.0", "@azure/eslint-plugin-azure-sdk": "^3.0.0", "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", - "@types/node": "^12.0.0", + "@types/mocha": "^7.0.2", + "@types/node": "^14.0.0", "@types/uuid": "^8.3.4", "autorest": "latest", "chai": "^4.2.0", "cross-env": "^7.0.2", "dotenv": "^8.2.0", - "eslint": "^7.15.0", + "eslint": "^8.0.0", "karma": "^6.2.0", "karma-chrome-launcher": "^3.0.0", "karma-coverage": "^2.0.0", @@ -125,7 +104,16 @@ "rimraf": "^3.0.0", "source-map-support": "^0.5.9", "uuid": "^9.0.0", - "typescript": "~4.2.0" + "typescript": "~4.6.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md", + "//metadata": { + "constantPaths": [ + { + "path": "swagger/README.md", + "prefix": "package-version" + } + ] }, "browser": { "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json deleted file mode 100644 index 0d0bf98fb231..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/tests/appcomp123/app-components?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "427", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "b1e6768e-1e96-427e-a6ed-12f9e45ecf98", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": { - "testId": "abc", - "components": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "subscriptionId": "azure_subscription_id" - } - } - }, - "StatusCode": 401, - "ResponseHeaders": { - "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Thu, 17 Nov 2022 06:41:37 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u002704e186f8-464b-4e33-aa02-6d14f0498cbb: InvalidIssuer.\u0022", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "3916e009-0af3-443d-b1f7-47b462263e37" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json deleted file mode 100644 index f721723386d8..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "Entries": [], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json deleted file mode 100644 index 6237f7afbffd..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "113", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "8a747f24-53ee-4eda-8071-2995a6dd25e5", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": { - "displayName": "sample_test", - "description": "", - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false - } - }, - "StatusCode": 401, - "ResponseHeaders": { - "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Thu, 17 Nov 2022 06:41:39 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027c6aaf243-fcf4-4525-9da4-e04d3f86b1de: InvalidIssuer.\u0022", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "122ce70b-6af3-4f02-969e-99672beca02a" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json deleted file mode 100644 index f702a58a5aae..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "59", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "b627c3c4-0d75-40fa-98ed-37d697e1e947", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": { - "testId": "abc", - "displayName": "sample_testrun", - "vusers": 10 - }, - "StatusCode": 401, - "ResponseHeaders": { - "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Thu, 17 Nov 2022 06:41:39 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027c71fa23f-03a0-45fa-b4d8-7fe3edd4d50a: InvalidIssuer.\u0022", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5fd48f3a-20a2-4369-a1a4-f7b507e240b1" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json deleted file mode 100644 index 58b820d6a122..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "2c4e8509-36f1-40a0-932d-081518d8bbe8", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": null, - "StatusCode": 401, - "ResponseHeaders": { - "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Thu, 17 Nov 2022 06:41:40 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u00273a943b2f-5f2b-48e6-a7e5-0e06cd31bdff: InvalidIssuer.\u0022", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f55e0ffc-2ebd-41b7-97ee-d4cbc461456d" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json deleted file mode 100644 index c9e2d4ea17af..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/tests/appcomp123/app-components?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "427", - "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "ecef874b-73d6-4df7-afb0-b04c3fd290da" - }, - "RequestBody": { - "testId": "abc", - "components": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "subscriptionId": "azure_subscription_id" - } - } - }, - "StatusCode": 401, - "ResponseHeaders": { - "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Thu, 17 Nov 2022 06:33:31 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u002704e186f8-464b-4e33-aa02-6d14f0498cbb: InvalidIssuer.\u0022", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f6b51db9-5910-470e-adc5-6c83afe2b91f" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json deleted file mode 100644 index cab57045bbe9..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/tests/abc/files/xyz12365?api-version=2022-11-01", - "RequestMethod": "PUT", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Type": "multipart/form-data; boundary=--------------------------402919400969033260897728", - "Transfer-Encoding": "chunked", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "e41e1c61-22ce-4808-840e-795e6a100986" - }, - "RequestBody": "LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTQwMjkxOTQwMDk2OTAzMzI2MDg5NzcyOA0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlIjsgZmlsZW5hbWU9InNhbXBsZS5qbXgiDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbQ0KDQo8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCI/Pgo8am1ldGVyVGVzdFBsYW4gdmVyc2lvbj0iMS4yIiBwcm9wZXJ0aWVzPSI1LjAiIGptZXRlcj0iNS4zIj4KICA8aGFzaFRyZWU\u002BCiAgICA8VGVzdFBsYW4gZ3VpY2xhc3M9IlRlc3RQbGFuR3VpIiB0ZXN0Y2xhc3M9IlRlc3RQbGFuIiB0ZXN0bmFtZT0iVGVzdCBQbGFuIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGVzdFBsYW4uY29tbWVudHMiPjwvc3RyaW5nUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLmZ1bmN0aW9uYWxfbW9kZSI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8Ym9vbFByb3AgbmFtZT0iVGVzdFBsYW4uc2VyaWFsaXplX3RocmVhZGdyb3VwcyI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGVzdFBsYW4udXNlcl9kZWZpbmVkX3ZhcmlhYmxlcyIgZWxlbWVudFR5cGU9IkFyZ3VtZW50cyIgZ3VpY2xhc3M9IkFyZ3VtZW50c1BhbmVsIiB0ZXN0Y2xhc3M9IkFyZ3VtZW50cyIgdGVzdG5hbWU9IlVzZXIgRGVmaW5lZCBWYXJpYWJsZXMiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lX2NsYXNzcGF0aCI\u002BPC9zdHJpbmdQcm9wPgogICAgPC9UZXN0UGxhbj4KICAgIDxoYXNoVHJlZT4KICAgICAgPFRocmVhZEdyb3VwIGd1aWNsYXNzPSJUaHJlYWRHcm91cEd1aSIgdGVzdGNsYXNzPSJUaHJlYWRHcm91cCIgdGVzdG5hbWU9IlRocmVhZCBHcm91cCIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAub25fc2FtcGxlX2Vycm9yIj5jb250aW51ZTwvc3RyaW5nUHJvcD4KICAgICAgICA8ZWxlbWVudFByb3AgbmFtZT0iVGhyZWFkR3JvdXAubWFpbl9jb250cm9sbGVyIiBlbGVtZW50VHlwZT0iTG9vcENvbnRyb2xsZXIiIGd1aWNsYXNzPSJMb29wQ29udHJvbFBhbmVsIiB0ZXN0Y2xhc3M9Ikxvb3BDb250cm9sbGVyIiB0ZXN0bmFtZT0iTG9vcCBDb250cm9sbGVyIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5jb250aW51ZV9mb3JldmVyIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJMb29wQ29udHJvbGxlci5sb29wcyI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9lbGVtZW50UHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5udW1fdGhyZWFkcyI\u002BNTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BNjA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTQwMjkxOTQwMDk2OTAzMzI2MDg5NzcyOC0tDQo=", - "StatusCode": 405, - "ResponseHeaders": { - "Allow": "PUT", - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "210", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 06:33:33 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b4834116-b33b-461f-8bdc-41d7d1bcc709" - }, - "ResponseBody": { - "error": { - "code": "UnsupportedApiVersion", - "message": "The HTTP resource that matches the request URI \u0027http://endpoint/tests/abc/files/xyz12365\u0027 with API version \u00272022-11-01\u0027 does not support HTTP method \u0027PUT\u0027." - } - } - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json deleted file mode 100644 index 2a26d089b0f4..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "113", - "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "8b337acf-a47f-46c1-86fa-ac6d50a2ef51" - }, - "RequestBody": { - "displayName": "sample_test", - "description": "", - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false - } - }, - "StatusCode": 401, - "ResponseHeaders": { - "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Thu, 17 Nov 2022 06:33:32 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027b97836eb-8273-4c87-96c4-53952a9dc241: InvalidIssuer.\u0022", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9b19df50-22f7-43e6-a2dd-aeddcb380160" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json deleted file mode 100644 index 7725a9500fe1..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "59", - "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "12de133e-8359-4934-b7f1-8d73fd665a5f" - }, - "RequestBody": { - "testId": "abc", - "displayName": "sample_testrun", - "vusers": 10 - }, - "StatusCode": 401, - "ResponseHeaders": { - "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Thu, 17 Nov 2022 06:33:32 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027484071fa-96b2-48d0-8ca8-c63a2deed845: InvalidIssuer.\u0022", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "77986452-e9ab-4686-b434-0d3028deadd7" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json deleted file mode 100644 index c3b05997cee8..000000000000 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "ced75f75-30a9-44c8-8a4f-bd752bdb5f17" - }, - "RequestBody": null, - "StatusCode": 401, - "ResponseHeaders": { - "Connection": "keep-alive", - "Content-Length": "0", - "Date": "Thu, 17 Nov 2022 06:33:32 GMT", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "WWW-Authenticate": "Bearer error=\u0022invalid_token\u0022, error_description=\u0022S2S17001: SAL was able to validate the protocol, but validation failed as none of the inbound policies were satisfied. Validation failures: \u0027c6aaf243-fcf4-4525-9da4-e04d3f86b1de: InvalidIssuer.\u0022", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7f148af2-4edb-42d4-ab5a-6853de7e7af1" - }, - "ResponseBody": null - } - ], - "Variables": {} -} diff --git a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md index dc93492e6259..4519e1d73e73 100644 --- a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md +++ b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md @@ -16,7 +16,7 @@ import { RequestParameters } from '@azure-rest/core-client'; import { StreamableMethod } from '@azure-rest/core-client'; import { TokenCredential } from '@azure/core-auth'; -// @public (undocumented) +// @public export interface AppComponent { displayName?: string; kind?: string; @@ -27,7 +27,7 @@ export interface AppComponent { subscriptionId?: string; } -// @public (undocumented) +// @public export interface AppComponentOutput { displayName?: string; kind?: string; @@ -43,35 +43,53 @@ export type AzureLoadTestingClient = Client & { path: Routes; }; -// @public (undocumented) +// @public export interface CertificateMetadata { name?: string; type?: "AKV_CERT_URI"; value?: string; } -// @public (undocumented) +// @public export interface CertificateMetadataOutput { name?: string; type?: "AKV_CERT_URI"; value?: string; } -// @public (undocumented) +// @public function createClient(Endpoint: string, credentials: TokenCredential, options?: ClientOptions): AzureLoadTestingClient; export default createClient; -// @public (undocumented) +// @public +export interface DimensionFilter { + name?: string; + values?: Array; +} + +// @public +export interface DimensionValueListOutput { + nextLink?: string; + value?: Array; +} + +// @public +export interface DimensionValueOutput { + name?: string; + value?: string; +} + +// @public export interface ErrorDetails { message?: string; } -// @public (undocumented) +// @public export interface ErrorDetailsOutput { message?: string; } -// @public (undocumented) +// @public export interface ErrorModelOutput { code: string; details?: Array; @@ -79,31 +97,29 @@ export interface ErrorModelOutput { target?: string; } -// @public (undocumented) +// @public export interface ErrorResponseBodyOutput { error: ErrorModelOutput; } -// @public (undocumented) +// @public export interface FileInfo { expireDateTime?: Date | string; - fileId?: string; filename?: string; fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; url?: string; validationStatus?: "NOT_VALIDATED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED"; } -// @public (undocumented) +// @public export interface FileInfoListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface FileInfoOutput { expireDateTime?: string; - fileId?: string; filename?: string; fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; url?: string; @@ -120,822 +136,731 @@ export type GetPage = (pageLink: string, maxPageSize?: number) => Promise }>; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationCreateOrUpdateTest200Response | LoadTestAdministrationCreateOrUpdateTest201Response | LoadTestAdministrationCreateOrUpdateTestdefaultResponse): response is LoadTestAdministrationCreateOrUpdateTestdefaultResponse; +export function isUnexpected(response: TestCreateOrUpdate200Response | TestCreateOrUpdate201Response | TestCreateOrUpdateDefaultResponse): response is TestCreateOrUpdateDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationDeleteTest204Response | LoadTestAdministrationDeleteTestdefaultResponse): response is LoadTestAdministrationDeleteTestdefaultResponse; +export function isUnexpected(response: TestDelete204Response | TestDeleteDefaultResponse): response is TestDeleteDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationGetTest200Response | LoadTestAdministrationGetTestdefaultResponse): response is LoadTestAdministrationGetTestdefaultResponse; +export function isUnexpected(response: TestGet200Response | TestGetDefaultResponse): response is TestGetDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationListTests200Response | LoadTestAdministrationListTestsdefaultResponse): response is LoadTestAdministrationListTestsdefaultResponse; +export function isUnexpected(response: TestList200Response | TestListDefaultResponse): response is TestListDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationUploadFile201Response | LoadTestAdministrationUploadFiledefaultResponse): response is LoadTestAdministrationUploadFiledefaultResponse; +export function isUnexpected(response: TestUploadFile201Response | TestUploadFileDefaultResponse): response is TestUploadFileDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationGetFile200Response | LoadTestAdministrationGetFiledefaultResponse): response is LoadTestAdministrationGetFiledefaultResponse; +export function isUnexpected(response: TestGetFile200Response | TestGetFileDefaultResponse): response is TestGetFileDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationDeleteFile204Response | LoadTestAdministrationDeleteFiledefaultResponse): response is LoadTestAdministrationDeleteFiledefaultResponse; +export function isUnexpected(response: TestDeleteFile204Response | TestDeleteFileDefaultResponse): response is TestDeleteFileDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationListFilesTest200Response | LoadTestAdministrationListFilesTestdefaultResponse): response is LoadTestAdministrationListFilesTestdefaultResponse; +export function isUnexpected(response: TestListFiles200Response | TestListFilesDefaultResponse): response is TestListFilesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationCreateOrUpdateAppComponentTest200Response | LoadTestAdministrationCreateOrUpdateAppComponentTest201Response | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse): response is LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse; +export function isUnexpected(response: TestCreateOrUpdateAppComponent200Response | TestCreateOrUpdateAppComponent201Response | TestCreateOrUpdateAppComponentDefaultResponse): response is TestCreateOrUpdateAppComponentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationGetAppComponentsTest200Response | LoadTestAdministrationGetAppComponentsTestdefaultResponse): response is LoadTestAdministrationGetAppComponentsTestdefaultResponse; +export function isUnexpected(response: TestGetAppComponents200Response | TestGetAppComponentsDefaultResponse): response is TestGetAppComponentsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse): response is LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse; +export function isUnexpected(response: TestCreateOrUpdateServerMetricsConfig200Response | TestCreateOrUpdateServerMetricsConfig201Response | TestCreateOrUpdateServerMetricsConfigDefaultResponse): response is TestCreateOrUpdateServerMetricsConfigDefaultResponse; // @public (undocumented) -export function isUnexpected(response: LoadTestAdministrationGetServerMetricsConfigTest200Response | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse): response is LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse; +export function isUnexpected(response: TestGetServerMetricsConfig200Response | TestGetServerMetricsConfigDefaultResponse): response is TestGetServerMetricsConfigDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunDelete204Response | TestRunDeletedefaultResponse): response is TestRunDeletedefaultResponse; +export function isUnexpected(response: TestRunDelete204Response | TestRunDeleteDefaultResponse): response is TestRunDeleteDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdatedefaultResponse): response is TestRunCreateOrUpdatedefaultResponse; +export function isUnexpected(response: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response | TestRunCreateOrUpdateDefaultResponse): response is TestRunCreateOrUpdateDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGet200Response | TestRunGetdefaultResponse): response is TestRunGetdefaultResponse; +export function isUnexpected(response: TestRunGet200Response | TestRunGetDefaultResponse): response is TestRunGetDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGetFile200Response | TestRunGetFiledefaultResponse): response is TestRunGetFiledefaultResponse; +export function isUnexpected(response: TestRunGetFile200Response | TestRunGetFileDefaultResponse): response is TestRunGetFileDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunList200Response | TestRunListdefaultResponse): response is TestRunListdefaultResponse; +export function isUnexpected(response: TestRunList200Response | TestRunListDefaultResponse): response is TestRunListDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunStop200Response | TestRunStopdefaultResponse): response is TestRunStopdefaultResponse; +export function isUnexpected(response: TestRunStop200Response | TestRunStopDefaultResponse): response is TestRunStopDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesdefaultResponse): response is TestRunListMetricNamespacesdefaultResponse; +export function isUnexpected(response: TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesDefaultResponse): response is TestRunListMetricNamespacesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsdefaultResponse): response is TestRunListMetricDefinitionsdefaultResponse; +export function isUnexpected(response: TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsDefaultResponse): response is TestRunListMetricDefinitionsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGetMetrics200Response | TestRunGetMetricsdefaultResponse): response is TestRunGetMetricsdefaultResponse; +export function isUnexpected(response: TestRunGetMetrics200Response | TestRunGetMetricsDefaultResponse): response is TestRunGetMetricsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunCreateOrUpdateAppComponent200Response | TestRunCreateOrUpdateAppComponent201Response | TestRunCreateOrUpdateAppComponentdefaultResponse): response is TestRunCreateOrUpdateAppComponentdefaultResponse; +export function isUnexpected(response: TestRunGetMetricDimensionValues200Response | TestRunGetMetricDimensionValuesDefaultResponse): response is TestRunGetMetricDimensionValuesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGetAppComponents200Response | TestRunGetAppComponentsdefaultResponse): response is TestRunGetAppComponentsdefaultResponse; +export function isUnexpected(response: TestRunCreateOrUpdateAppComponent200Response | TestRunCreateOrUpdateAppComponent201Response | TestRunCreateOrUpdateAppComponentDefaultResponse): response is TestRunCreateOrUpdateAppComponentDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunCreateOrUpdateServerMetricsConfig200Response | TestRunCreateOrUpdateServerMetricsConfig201Response | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse): response is TestRunCreateOrUpdateServerMetricsConfigdefaultResponse; +export function isUnexpected(response: TestRunGetAppComponents200Response | TestRunGetAppComponentsDefaultResponse): response is TestRunGetAppComponentsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigdefaultResponse): response is TestRunGetServerMetricsConfigdefaultResponse; +export function isUnexpected(response: TestRunCreateOrUpdateServerMetricsConfig200Response | TestRunCreateOrUpdateServerMetricsConfig201Response | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse): response is TestRunCreateOrUpdateServerMetricsConfigDefaultResponse; // @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateAppComponentTest { - get(options?: LoadTestAdministrationGetAppComponentsTestParameters): StreamableMethod; - patch(options: LoadTestAdministrationCreateOrUpdateAppComponentTestParameters): StreamableMethod; +export function isUnexpected(response: TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigDefaultResponse): response is TestRunGetServerMetricsConfigDefaultResponse; + +// @public +export interface LoadTestConfiguration { + engineInstances?: number; + optionalLoadTestConfig?: OptionalLoadTestConfig; + quickStartTest?: boolean; + splitAllCSVs?: boolean; } // @public -export interface LoadTestAdministrationCreateOrUpdateAppComponentTest200Response extends HttpResponse { - // (undocumented) - body: TestAppComponentsOutput; - // (undocumented) - status: "200"; +export interface LoadTestConfigurationOutput { + engineInstances?: number; + optionalLoadTestConfig?: OptionalLoadTestConfigOutput; + quickStartTest?: boolean; + splitAllCSVs?: boolean; } // @public -export interface LoadTestAdministrationCreateOrUpdateAppComponentTest201Response extends HttpResponse { - // (undocumented) - body: TestAppComponentsOutput; - // (undocumented) - status: "201"; +export interface MetricAvailabilityOutput { + timeGrain?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; } -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateAppComponentTestBodyParam { - body: TestAppComponents; +// @public +export interface MetricDefinitionCollectionOutput { + value: Array; } -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders { - "x-ms-error-code"?: string; +// @public +export interface MetricDefinitionOutput { + description?: string; + dimensions?: Array; + metricAvailabilities?: Array; + name?: string; + namespace?: string; + primaryAggregationType?: "Average" | "Count" | "None" | "Total" | "Percentile90" | "Percentile95" | "Percentile99"; + supportedAggregationTypes?: Array; + unit?: "NotSpecified" | "Percent" | "Count" | "Seconds" | "Milliseconds" | "Bytes" | "BytesPerSecond" | "CountPerSecond"; } // @public -export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders; - // (undocumented) - status: string; +export interface MetricNamespaceCollectionOutput { + value: Array; } -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateAppComponentTestMediaTypesParam { - contentType?: "application/merge-patch+json"; +// @public +export interface MetricNamespaceOutput { + description?: string; + name?: string; } -// @public (undocumented) -export type LoadTestAdministrationCreateOrUpdateAppComponentTestParameters = LoadTestAdministrationCreateOrUpdateAppComponentTestMediaTypesParam & LoadTestAdministrationCreateOrUpdateAppComponentTestBodyParam & RequestParameters; +// @public +export interface MetricRequestPayload { + filters?: Array; +} -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest { - get(options?: LoadTestAdministrationGetServerMetricsConfigTestParameters): StreamableMethod; - patch(options: LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters): StreamableMethod; +// @public +export interface MetricsOutput { + nextLink?: string; + timeseries?: Array; } // @public -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response extends HttpResponse { - // (undocumented) - body: TestServerMetricConfigOutput; - // (undocumented) - status: "200"; +export interface MetricValueOutput { + timestamp?: string; + value?: number; } // @public -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response extends HttpResponse { - // (undocumented) - body: TestServerMetricConfigOutput; - // (undocumented) - status: "201"; +export interface NameAndDescOutput { + description?: string; + name?: string; } -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestBodyParam { - body: TestServerMetricConfig; +// @public +export interface OptionalLoadTestConfig { + duration?: number; + endpointUrl?: string; + rampUpTime?: number; + virtualUsers?: number; } -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultHeaders { - "x-ms-error-code"?: string; +// @public +export interface OptionalLoadTestConfigOutput { + duration?: number; + endpointUrl?: string; + rampUpTime?: number; + virtualUsers?: number; } // @public -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultHeaders; - // (undocumented) - status: string; +export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; + +// @public +export type PaginateReturn = TResult extends { + body: { + value?: infer TPage; + }; +} ? GetArrayType : Array; + +// @public +export interface PagingOptions { + customGetPage?: GetPage[]>; } -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestMediaTypesParam { - contentType?: "application/merge-patch+json"; +// @public +export interface PassFailCriteria { + passFailMetrics?: Record; } -// @public (undocumented) -export type LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters = LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestMediaTypesParam & LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestBodyParam & RequestParameters; +// @public +export interface PassFailCriteriaOutput { + passFailMetrics?: Record; +} -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateTest { - delete(options?: LoadTestAdministrationDeleteTestParameters): StreamableMethod; - get(options?: LoadTestAdministrationGetTestParameters): StreamableMethod; - patch(options: LoadTestAdministrationCreateOrUpdateTestParameters): StreamableMethod; +// @public +export interface PassFailMetric { + action?: "stop" | "continue"; + actualValue?: number; + aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; + clientMetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; + condition?: string; + requestName?: string; + result?: "passed" | "undetermined" | "failed"; + value?: number; } // @public -export interface LoadTestAdministrationCreateOrUpdateTest200Response extends HttpResponse { - // (undocumented) - body: TestOutput; - // (undocumented) - status: "200"; +export interface PassFailMetricOutput { + action?: "stop" | "continue"; + actualValue?: number; + aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; + clientMetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; + condition?: string; + requestName?: string; + result?: "passed" | "undetermined" | "failed"; + value?: number; } // @public -export interface LoadTestAdministrationCreateOrUpdateTest201Response extends HttpResponse { - // (undocumented) - body: TestOutput; - // (undocumented) - status: "201"; +export interface ResourceMetric { + aggregation: string; + displayDescription?: string; + id?: string; + metricNamespace: string; + name: string; + resourceId: string; + resourceType: string; + unit?: string; } -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateTestBodyParam { - body: Test; +// @public +export interface ResourceMetricOutput { + aggregation: string; + displayDescription?: string; + id?: string; + metricNamespace: string; + name: string; + resourceId: string; + resourceType: string; + unit?: string; } // @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateTestdefaultHeaders { - "x-ms-error-code"?: string; +export interface Routes { + (path: "/tests/{testId}", testId: string): TestCreateOrUpdate; + (path: "/tests"): TestList; + (path: "/tests/{testId}/files/{fileName}", testId: string, fileName: string): TestUploadFile; + (path: "/tests/{testId}/files", testId: string): TestListFiles; + (path: "/tests/{testId}/app-components", testId: string): TestCreateOrUpdateAppComponent; + (path: "/tests/{testId}/server-metric-configs", testId: string): TestCreateOrUpdateServerMetricsConfig; + (path: "/test-runs/{testRunId}", testRunId: string): TestRunDelete; + (path: "/test-runs/{testRunId}/files/{fileName}", testRunId: string, fileName: string): TestRunGetFile; + (path: "/test-runs"): TestRunList; + (path: "/test-runs/{testRunId}:stop", testRunId: string): TestRunStop; + (path: "/test-runs/{testRunId}/metric-namespaces", testRunId: string): TestRunListMetricNamespaces; + (path: "/test-runs/{testRunId}/metric-definitions", testRunId: string): TestRunListMetricDefinitions; + (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunGetMetrics; + (path: "/test-runs/{testRunId}/metric-dimension/{name}/values", testRunId: string, name: string): TestRunGetMetricDimensionValues; + (path: "/test-runs/{testRunId}/app-components", testRunId: string): TestRunCreateOrUpdateAppComponent; + (path: "/test-runs/{testRunId}/server-metric-configs", testRunId: string): TestRunCreateOrUpdateServerMetricsConfig; } // @public -export interface LoadTestAdministrationCreateOrUpdateTestdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateTestdefaultHeaders; - // (undocumented) - status: string; +export interface Secret { + type?: "AKV_SECRET_URI" | "SECRET_VALUE"; + value?: string; } -// @public (undocumented) -export interface LoadTestAdministrationCreateOrUpdateTestMediaTypesParam { - contentType?: "application/merge-patch+json"; +// @public +export interface SecretOutput { + type?: "AKV_SECRET_URI" | "SECRET_VALUE"; + value?: string; } -// @public (undocumented) -export type LoadTestAdministrationCreateOrUpdateTestParameters = LoadTestAdministrationCreateOrUpdateTestMediaTypesParam & LoadTestAdministrationCreateOrUpdateTestBodyParam & RequestParameters; +// @public +export interface Test { + certificate?: CertificateMetadata; + createdBy?: string; + createdDateTime?: Date | string; + description?: string; + displayName?: string; + environmentVariables?: Record; + inputArtifacts?: TestInputArtifacts; + keyvaultReferenceIdentityId?: string; + keyvaultReferenceIdentityType?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: Date | string; + loadTestConfiguration?: LoadTestConfiguration; + passFailCriteria?: PassFailCriteria; + secrets?: Record; + subnetId?: string; + testId?: string; +} // @public -export interface LoadTestAdministrationDeleteFile204Response extends HttpResponse { - // (undocumented) - body: Record; - // (undocumented) - status: "204"; +export interface TestAppComponents { + components: Record; + createdBy?: string; + createdDateTime?: Date | string; + lastModifiedBy?: string; + lastModifiedDateTime?: Date | string; + testId?: string; +} + +// @public +export interface TestAppComponentsOutput { + components: Record; + createdBy?: string; + createdDateTime?: string; + lastModifiedBy?: string; + lastModifiedDateTime?: string; + testId?: string; } // @public (undocumented) -export interface LoadTestAdministrationDeleteFiledefaultHeaders { - "x-ms-error-code"?: string; +export interface TestCreateOrUpdate { + delete(options?: TestDeleteParameters): StreamableMethod; + get(options?: TestGetParameters): StreamableMethod; + patch(options: TestCreateOrUpdateParameters): StreamableMethod; } // @public -export interface LoadTestAdministrationDeleteFiledefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; +export interface TestCreateOrUpdate200Response extends HttpResponse { // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationDeleteFiledefaultHeaders; + body: TestOutput; // (undocumented) - status: string; + status: "200"; } -// @public (undocumented) -export type LoadTestAdministrationDeleteFileParameters = RequestParameters; - // @public -export interface LoadTestAdministrationDeleteTest204Response extends HttpResponse { +export interface TestCreateOrUpdate201Response extends HttpResponse { // (undocumented) - body: Record; + body: TestOutput; // (undocumented) - status: "204"; + status: "201"; } // @public (undocumented) -export interface LoadTestAdministrationDeleteTestdefaultHeaders { - "x-ms-error-code"?: string; +export interface TestCreateOrUpdateAppComponent { + get(options?: TestGetAppComponentsParameters): StreamableMethod; + patch(options: TestCreateOrUpdateAppComponentParameters): StreamableMethod; } // @public -export interface LoadTestAdministrationDeleteTestdefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; +export interface TestCreateOrUpdateAppComponent200Response extends HttpResponse { // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationDeleteTestdefaultHeaders; + body: TestAppComponentsOutput; // (undocumented) - status: string; + status: "200"; } -// @public (undocumented) -export type LoadTestAdministrationDeleteTestParameters = RequestParameters; - // @public -export interface LoadTestAdministrationGetAppComponentsTest200Response extends HttpResponse { +export interface TestCreateOrUpdateAppComponent201Response extends HttpResponse { // (undocumented) body: TestAppComponentsOutput; // (undocumented) - status: "200"; + status: "201"; +} + +// @public (undocumented) +export interface TestCreateOrUpdateAppComponentBodyParam { + body: TestAppComponents; } // @public (undocumented) -export interface LoadTestAdministrationGetAppComponentsTestdefaultHeaders { +export interface TestCreateOrUpdateAppComponentDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface LoadTestAdministrationGetAppComponentsTestdefaultResponse extends HttpResponse { +export interface TestCreateOrUpdateAppComponentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationGetAppComponentsTestdefaultHeaders; + headers: RawHttpHeaders & TestCreateOrUpdateAppComponentDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export type LoadTestAdministrationGetAppComponentsTestParameters = RequestParameters; +export interface TestCreateOrUpdateAppComponentMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type TestCreateOrUpdateAppComponentParameters = TestCreateOrUpdateAppComponentMediaTypesParam & TestCreateOrUpdateAppComponentBodyParam & RequestParameters; -// @public -export interface LoadTestAdministrationGetFile200Response extends HttpResponse { - // (undocumented) - body: FileInfoOutput; - // (undocumented) - status: "200"; +// @public (undocumented) +export interface TestCreateOrUpdateBodyParam { + body: Test; } // @public (undocumented) -export interface LoadTestAdministrationGetFiledefaultHeaders { +export interface TestCreateOrUpdateDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface LoadTestAdministrationGetFiledefaultResponse extends HttpResponse { +export interface TestCreateOrUpdateDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationGetFiledefaultHeaders; + headers: RawHttpHeaders & TestCreateOrUpdateDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export type LoadTestAdministrationGetFileParameters = RequestParameters; +export interface TestCreateOrUpdateMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type TestCreateOrUpdateParameters = TestCreateOrUpdateMediaTypesParam & TestCreateOrUpdateBodyParam & RequestParameters; + +// @public (undocumented) +export interface TestCreateOrUpdateServerMetricsConfig { + get(options?: TestGetServerMetricsConfigParameters): StreamableMethod; + patch(options: TestCreateOrUpdateServerMetricsConfigParameters): StreamableMethod; +} // @public -export interface LoadTestAdministrationGetServerMetricsConfigTest200Response extends HttpResponse { +export interface TestCreateOrUpdateServerMetricsConfig200Response extends HttpResponse { // (undocumented) body: TestServerMetricConfigOutput; // (undocumented) status: "200"; } +// @public +export interface TestCreateOrUpdateServerMetricsConfig201Response extends HttpResponse { + // (undocumented) + body: TestServerMetricConfigOutput; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface TestCreateOrUpdateServerMetricsConfigBodyParam { + body: TestServerMetricConfig; +} + // @public (undocumented) -export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders { +export interface TestCreateOrUpdateServerMetricsConfigDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse extends HttpResponse { +export interface TestCreateOrUpdateServerMetricsConfigDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders; + headers: RawHttpHeaders & TestCreateOrUpdateServerMetricsConfigDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export type LoadTestAdministrationGetServerMetricsConfigTestParameters = RequestParameters; +export interface TestCreateOrUpdateServerMetricsConfigMediaTypesParam { + contentType?: "application/merge-patch+json"; +} + +// @public (undocumented) +export type TestCreateOrUpdateServerMetricsConfigParameters = TestCreateOrUpdateServerMetricsConfigMediaTypesParam & TestCreateOrUpdateServerMetricsConfigBodyParam & RequestParameters; // @public -export interface LoadTestAdministrationGetTest200Response extends HttpResponse { +export interface TestDelete204Response extends HttpResponse { // (undocumented) - body: TestOutput; + body: Record; // (undocumented) - status: "200"; + status: "204"; } // @public (undocumented) -export interface LoadTestAdministrationGetTestdefaultHeaders { +export interface TestDeleteDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface LoadTestAdministrationGetTestdefaultResponse extends HttpResponse { +export interface TestDeleteDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationGetTestdefaultHeaders; + headers: RawHttpHeaders & TestDeleteDefaultHeaders; // (undocumented) status: string; } -// @public (undocumented) -export type LoadTestAdministrationGetTestParameters = RequestParameters; - -// @public (undocumented) -export interface LoadTestAdministrationListFilesTest { - get(options?: LoadTestAdministrationListFilesTestParameters): StreamableMethod; -} - // @public -export interface LoadTestAdministrationListFilesTest200Response extends HttpResponse { +export interface TestDeleteFile204Response extends HttpResponse { // (undocumented) - body: FileInfoListOutput; + body: Record; // (undocumented) - status: "200"; + status: "204"; } // @public (undocumented) -export interface LoadTestAdministrationListFilesTestdefaultHeaders { +export interface TestDeleteFileDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface LoadTestAdministrationListFilesTestdefaultResponse extends HttpResponse { +export interface TestDeleteFileDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationListFilesTestdefaultHeaders; + headers: RawHttpHeaders & TestDeleteFileDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export type LoadTestAdministrationListFilesTestParameters = LoadTestAdministrationListFilesTestQueryParam & RequestParameters; +export type TestDeleteFileParameters = RequestParameters; // @public (undocumented) -export interface LoadTestAdministrationListFilesTestQueryParam { - // (undocumented) - queryParameters?: LoadTestAdministrationListFilesTestQueryParamProperties; -} +export type TestDeleteParameters = RequestParameters; -// @public (undocumented) -export interface LoadTestAdministrationListFilesTestQueryParamProperties { - continuationToken?: string; -} - -// @public (undocumented) -export interface LoadTestAdministrationListTests { - get(options?: LoadTestAdministrationListTestsParameters): StreamableMethod; +// @public +export interface TestGet200Response extends HttpResponse { + // (undocumented) + body: TestOutput; + // (undocumented) + status: "200"; } // @public -export interface LoadTestAdministrationListTests200Response extends HttpResponse { +export interface TestGetAppComponents200Response extends HttpResponse { // (undocumented) - body: TestsListOutput; + body: TestAppComponentsOutput; // (undocumented) status: "200"; } // @public (undocumented) -export interface LoadTestAdministrationListTestsdefaultHeaders { +export interface TestGetAppComponentsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface LoadTestAdministrationListTestsdefaultResponse extends HttpResponse { +export interface TestGetAppComponentsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationListTestsdefaultHeaders; + headers: RawHttpHeaders & TestGetAppComponentsDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export type LoadTestAdministrationListTestsParameters = LoadTestAdministrationListTestsQueryParam & RequestParameters; - -// @public (undocumented) -export interface LoadTestAdministrationListTestsQueryParam { - // (undocumented) - queryParameters?: LoadTestAdministrationListTestsQueryParamProperties; -} - -// @public (undocumented) -export interface LoadTestAdministrationListTestsQueryParamProperties { - continuationToken?: string; - lastModifiedEndTime?: Date | string; - lastModifiedStartTime?: Date | string; - maxpagesize?: number; - orderby?: string; - search?: string; -} +export type TestGetAppComponentsParameters = RequestParameters; // @public (undocumented) -export interface LoadTestAdministrationUploadFile { - delete(options?: LoadTestAdministrationDeleteFileParameters): StreamableMethod; - get(options?: LoadTestAdministrationGetFileParameters): StreamableMethod; - put(options: LoadTestAdministrationUploadFileParameters): StreamableMethod; +export interface TestGetDefaultHeaders { + "x-ms-error-code"?: string; } // @public -export interface LoadTestAdministrationUploadFile201Response extends HttpResponse { +export interface TestGetDefaultResponse extends HttpResponse { // (undocumented) - body: FileInfoOutput; + body: ErrorResponseBodyOutput; // (undocumented) - status: "201"; + headers: RawHttpHeaders & TestGetDefaultHeaders; + // (undocumented) + status: string; } -// @public (undocumented) -export interface LoadTestAdministrationUploadFileBodyParam { +// @public +export interface TestGetFile200Response extends HttpResponse { // (undocumented) - body: LoadTestAdministrationUploadFileFormBody; + body: FileInfoOutput; + // (undocumented) + status: "200"; } // @public (undocumented) -export interface LoadTestAdministrationUploadFiledefaultHeaders { +export interface TestGetFileDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface LoadTestAdministrationUploadFiledefaultResponse extends HttpResponse { +export interface TestGetFileDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & LoadTestAdministrationUploadFiledefaultHeaders; + headers: RawHttpHeaders & TestGetFileDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export interface LoadTestAdministrationUploadFileFormBody { - file: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; -} - -// @public (undocumented) -export interface LoadTestAdministrationUploadFileMediaTypesParam { - contentType?: "multipart/form-data"; -} +export type TestGetFileParameters = RequestParameters; // @public (undocumented) -export type LoadTestAdministrationUploadFileParameters = LoadTestAdministrationUploadFileQueryParam & LoadTestAdministrationUploadFileMediaTypesParam & LoadTestAdministrationUploadFileBodyParam & RequestParameters; +export type TestGetParameters = RequestParameters; -// @public (undocumented) -export interface LoadTestAdministrationUploadFileQueryParam { +// @public +export interface TestGetServerMetricsConfig200Response extends HttpResponse { // (undocumented) - queryParameters?: LoadTestAdministrationUploadFileQueryParamProperties; -} - -// @public (undocumented) -export interface LoadTestAdministrationUploadFileQueryParamProperties { - fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; -} - -// @public (undocumented) -export interface LoadTestConfiguration { - engineInstances?: number; - optionalLoadTestConfig?: OptionalLoadTestConfig; - quickStartTest?: boolean; - splitAllCSVs?: boolean; -} - -// @public (undocumented) -export interface LoadTestConfigurationOutput { - engineInstances?: number; - optionalLoadTestConfig?: OptionalLoadTestConfigOutput; - quickStartTest?: boolean; - splitAllCSVs?: boolean; -} - -// @public (undocumented) -export interface LocalizableString { - localizedValue?: string; - value?: string; -} - -// @public (undocumented) -export interface LocalizableStringOutput { - localizedValue?: string; - value?: string; -} - -// @public (undocumented) -export interface MetadataFilter { - name?: string; - values?: Array; -} - -// @public (undocumented) -export interface MetadataValueOutput { - name?: LocalizableStringOutput; - value?: string; -} - -// @public (undocumented) -export interface MetricAvailabilityOutput { - timeGrain?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; -} - -// @public (undocumented) -export interface MetricDefinitionCollectionOutput { - value: Array; -} - -// @public (undocumented) -export interface MetricDefinitionOutput { - dimensions?: Array; - displayDescription?: string; - metricAvailabilities?: Array; - name?: LocalizableStringOutput; - namespace?: string; - primaryAggregationType?: "Average" | "Count" | "Minimum" | "Maximum" | "None" | "Total" | "Percentile90" | "Percentile95" | "Percentile99"; - supportedAggregationTypes?: Array; - unit?: "NotSpecified" | "Percent" | "Count" | "Seconds" | "Milliseconds" | "Bytes" | "BytesPerSecond" | "CountPerSecond"; -} - -// @public (undocumented) -export interface MetricNamespaceCollectionOutput { - value: Array; -} - -// @public (undocumented) -export interface MetricNamespaceOutput { - metricNamespaceName?: string; - name?: string; -} - -// @public (undocumented) -export interface MetricOutput { - name?: LocalizableStringOutput; - timeseries?: Array; - unit?: "NotSpecified" | "Percent" | "Count" | "Seconds" | "Milliseconds" | "Bytes" | "BytesPerSecond" | "CountPerSecond"; -} - -// @public (undocumented) -export interface MetricRequestPayload { - filters?: Array; + body: TestServerMetricConfigOutput; + // (undocumented) + status: "200"; } // @public (undocumented) -export interface MetricValueOutput { - average?: number; - count?: number; - maximum?: number; - minimum?: number; - percentile90?: number; - percentile95?: number; - percentile99?: number; - timeStamp?: string; - total?: number; +export interface TestGetServerMetricsConfigDefaultHeaders { + "x-ms-error-code"?: string; } -// @public (undocumented) -export interface OptionalLoadTestConfig { - duration?: number; - endpointUrl?: string; - rampUpTime?: number; - vusers?: number; +// @public +export interface TestGetServerMetricsConfigDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestGetServerMetricsConfigDefaultHeaders; + // (undocumented) + status: string; } // @public (undocumented) -export interface OptionalLoadTestConfigOutput { - duration?: number; - endpointUrl?: string; - rampUpTime?: number; - vusers?: number; -} - -// @public -export function paginate(client: Client, initialResponse: TResponse, options?: PagingOptions): PagedAsyncIterableIterator>; - -// @public -export type PaginateReturn = TResult extends { - body: { - value?: infer TPage; - }; -} ? GetArrayType : Array; +export type TestGetServerMetricsConfigParameters = RequestParameters; // @public -export interface PagingOptions { - customGetPage?: GetPage[]>; +export interface TestInputArtifacts { + additionalFileInfo?: Array; + configFileInfo?: FileInfo; + inputArtifactsZipFileInfo?: FileInfo; + testScriptFileInfo?: FileInfo; + userPropFileInfo?: FileInfo; } -// @public (undocumented) -export interface PassFailCriteria { - passFailMetrics?: Record; +// @public +export interface TestInputArtifactsOutput { + additionalFileInfo?: Array; + configFileInfo?: FileInfoOutput; + inputArtifactsZipFileInfo?: FileInfoOutput; + testScriptFileInfo?: FileInfoOutput; + userPropFileInfo?: FileInfoOutput; } // @public (undocumented) -export interface PassFailCriteriaOutput { - passFailMetrics?: Record; +export interface TestList { + get(options?: TestListParameters): StreamableMethod; } -// @public (undocumented) -export interface PassFailMetric { - action?: "stop" | "continue"; - actualValue?: number; - aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; - clientmetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; - condition?: string; - requestName?: string; - result?: "passed" | "undetermined" | "failed"; - value?: number; +// @public +export interface TestList200Response extends HttpResponse { + // (undocumented) + body: TestsListOutput; + // (undocumented) + status: "200"; } // @public (undocumented) -export interface PassFailMetricOutput { - action?: "stop" | "continue"; - actualValue?: number; - aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; - clientmetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; - condition?: string; - requestName?: string; - result?: "passed" | "undetermined" | "failed"; - value?: number; +export interface TestListDefaultHeaders { + "x-ms-error-code"?: string; } -// @public (undocumented) -export interface ResourceMetric { - aggregation: string; - displayDescription?: string; - id?: string; - metricNamespace: string; - name: LocalizableString; - resourceId: string; - resourceType: string; - unit?: string; +// @public +export interface TestListDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestListDefaultHeaders; + // (undocumented) + status: string; } // @public (undocumented) -export interface ResourceMetricOutput { - aggregation: string; - displayDescription?: string; - id?: string; - metricNamespace: string; - name: LocalizableStringOutput; - resourceId: string; - resourceType: string; - unit?: string; +export interface TestListFiles { + get(options?: TestListFilesParameters): StreamableMethod; } -// @public (undocumented) -export interface ResponseOutput { - interval?: string; - namespace?: string; - testRunId?: string; - timespan?: string; - value?: MetricOutput; +// @public +export interface TestListFiles200Response extends HttpResponse { + // (undocumented) + body: FileInfoListOutput; + // (undocumented) + status: "200"; } // @public (undocumented) -export interface Routes { - (path: "/tests/{testId}", testId: string): LoadTestAdministrationCreateOrUpdateTest; - (path: "/tests"): LoadTestAdministrationListTests; - (path: "/tests/{testId}/files/{fileId}", testId: string, fileId: string): LoadTestAdministrationUploadFile; - (path: "/tests/{testId}/files", testId: string): LoadTestAdministrationListFilesTest; - (path: "/tests/{testId}/app-components", testId: string): LoadTestAdministrationCreateOrUpdateAppComponentTest; - (path: "/tests/{testId}/server-metric-configs", testId: string): LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest; - (path: "/test-runs/{testRunId}", testRunId: string): TestRunDelete; - (path: "/test-runs/{testRunId}/files/{fileId}", testRunId: string, fileId: string): TestRunGetFile; - (path: "/test-runs"): TestRunList; - (path: "/test-runs/{testRunId}:stop", testRunId: string): TestRunStop; - (path: "/test-runs/{testRunId}/metric-namespaces", testRunId: string): TestRunListMetricNamespaces; - (path: "/test-runs/{testRunId}/metric-definitions", testRunId: string): TestRunListMetricDefinitions; - (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunGetMetrics; - (path: "/test-runs/{testRunId}/app-components", testRunId: string): TestRunCreateOrUpdateAppComponent; - (path: "/test-runs/{testRunId}/server-metric-configs", testRunId: string): TestRunCreateOrUpdateServerMetricsConfig; +export interface TestListFilesDefaultHeaders { + "x-ms-error-code"?: string; } -// @public (undocumented) -export interface Secret { - type?: "AKV_SECRET_URI" | "SECRET_VALUE"; - value?: string; +// @public +export interface TestListFilesDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestListFilesDefaultHeaders; + // (undocumented) + status: string; } // @public (undocumented) -export interface SecretOutput { - type?: "AKV_SECRET_URI" | "SECRET_VALUE"; - value?: string; -} +export type TestListFilesParameters = TestListFilesQueryParam & RequestParameters; // @public (undocumented) -export interface Test { - certificate?: CertificateMetadata; - createdBy?: string; - createdDateTime?: Date | string; - description?: string; - displayName?: string; - environmentVariables?: Record; - inputArtifacts?: TestInputArtifacts; - keyvaultReferenceIdentityId?: string; - keyvaultReferenceIdentityType?: string; - lastModifiedBy?: string; - lastModifiedDateTime?: Date | string; - loadTestConfiguration?: LoadTestConfiguration; - passFailCriteria?: PassFailCriteria; - secrets?: Record; - subnetId?: string; - testId?: string; +export interface TestListFilesQueryParam { + // (undocumented) + queryParameters?: TestListFilesQueryParamProperties; } // @public (undocumented) -export interface TestAppComponents { - components: Record; - createdBy?: string; - createdDateTime?: Date | string; - lastModifiedBy?: string; - lastModifiedDateTime?: Date | string; - testId?: string; +export interface TestListFilesQueryParamProperties { + continuationToken?: string; } // @public (undocumented) -export interface TestAppComponentsOutput { - components: Record; - createdBy?: string; - createdDateTime?: string; - lastModifiedBy?: string; - lastModifiedDateTime?: string; - testId?: string; -} +export type TestListParameters = TestListQueryParam & RequestParameters; // @public (undocumented) -export interface TestInputArtifacts { - additionalFileInfo?: Array; - configFileInfo?: FileInfo; - inputArtifactsZipFileInfo?: FileInfo; - testScriptFileInfo?: FileInfo; - userPropFileInfo?: FileInfo; +export interface TestListQueryParam { + // (undocumented) + queryParameters?: TestListQueryParamProperties; } // @public (undocumented) -export interface TestInputArtifactsOutput { - additionalFileInfo?: Array; - configFileInfo?: FileInfoOutput; - inputArtifactsZipFileInfo?: FileInfoOutput; - testScriptFileInfo?: FileInfoOutput; - userPropFileInfo?: FileInfoOutput; +export interface TestListQueryParamProperties { + continuationToken?: string; + lastModifiedEndTime?: Date | string; + lastModifiedStartTime?: Date | string; + maxpagesize?: number; + orderby?: string; + search?: string; } -// @public (undocumented) +// @public export interface TestOutput { certificate?: CertificateMetadataOutput; createdBy?: string; @@ -955,7 +880,7 @@ export interface TestOutput { testId?: string; } -// @public (undocumented) +// @public export interface TestRun { certificate?: CertificateMetadata; createdBy?: string; @@ -981,10 +906,10 @@ export interface TestRun { testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED"; testRunId?: string; testRunStatistics?: Record; - vusers?: number; + virtualUsers?: number; } -// @public (undocumented) +// @public export interface TestRunAppComponents { components: Record; createdBy?: string; @@ -994,7 +919,7 @@ export interface TestRunAppComponents { testRunId?: string; } -// @public (undocumented) +// @public export interface TestRunAppComponentsOutput { components: Record; createdBy?: string; @@ -1004,13 +929,13 @@ export interface TestRunAppComponentsOutput { testRunId?: string; } -// @public (undocumented) +// @public export interface TestRunArtifacts { inputArtifacts?: TestRunInputArtifacts; outputArtifacts?: TestRunOutputArtifacts; } -// @public (undocumented) +// @public export interface TestRunArtifactsOutput { inputArtifacts?: TestRunInputArtifactsOutput; outputArtifacts?: TestRunOutputArtifactsOutput; @@ -1024,10 +949,18 @@ export interface TestRunCreateOrUpdate200Response extends HttpResponse { status: "200"; } +// @public +export interface TestRunCreateOrUpdate201Response extends HttpResponse { + // (undocumented) + body: TestRunOutput; + // (undocumented) + status: "201"; +} + // @public (undocumented) export interface TestRunCreateOrUpdateAppComponent { - get(options?: TestRunGetAppComponentsParameters): StreamableMethod; - patch(options: TestRunCreateOrUpdateAppComponentParameters): StreamableMethod; + get(options?: TestRunGetAppComponentsParameters): StreamableMethod; + patch(options: TestRunCreateOrUpdateAppComponentParameters): StreamableMethod; } // @public @@ -1052,16 +985,16 @@ export interface TestRunCreateOrUpdateAppComponentBodyParam { } // @public (undocumented) -export interface TestRunCreateOrUpdateAppComponentdefaultHeaders { +export interface TestRunCreateOrUpdateAppComponentDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunCreateOrUpdateAppComponentdefaultResponse extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponentDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentdefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentDefaultHeaders; // (undocumented) status: string; } @@ -1080,16 +1013,16 @@ export interface TestRunCreateOrUpdateBodyParam { } // @public (undocumented) -export interface TestRunCreateOrUpdatedefaultHeaders { +export interface TestRunCreateOrUpdateDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunCreateOrUpdatedefaultResponse extends HttpResponse { +export interface TestRunCreateOrUpdateDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunCreateOrUpdatedefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateDefaultHeaders; // (undocumented) status: string; } @@ -1115,8 +1048,8 @@ export interface TestRunCreateOrUpdateQueryParamProperties { // @public (undocumented) export interface TestRunCreateOrUpdateServerMetricsConfig { - get(options?: TestRunGetServerMetricsConfigParameters): StreamableMethod; - patch(options: TestRunCreateOrUpdateServerMetricsConfigParameters): StreamableMethod; + get(options?: TestRunGetServerMetricsConfigParameters): StreamableMethod; + patch(options: TestRunCreateOrUpdateServerMetricsConfigParameters): StreamableMethod; } // @public @@ -1141,16 +1074,16 @@ export interface TestRunCreateOrUpdateServerMetricsConfigBodyParam { } // @public (undocumented) -export interface TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders { +export interface TestRunCreateOrUpdateServerMetricsConfigDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunCreateOrUpdateServerMetricsConfigdefaultResponse extends HttpResponse { +export interface TestRunCreateOrUpdateServerMetricsConfigDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateServerMetricsConfigDefaultHeaders; // (undocumented) status: string; } @@ -1165,9 +1098,9 @@ export type TestRunCreateOrUpdateServerMetricsConfigParameters = TestRunCreateOr // @public (undocumented) export interface TestRunDelete { - delete(options?: TestRunDeleteParameters): StreamableMethod; - get(options?: TestRunGetParameters): StreamableMethod; - patch(options: TestRunCreateOrUpdateParameters): StreamableMethod; + delete(options?: TestRunDeleteParameters): StreamableMethod; + get(options?: TestRunGetParameters): StreamableMethod; + patch(options: TestRunCreateOrUpdateParameters): StreamableMethod; } // @public @@ -1179,16 +1112,16 @@ export interface TestRunDelete204Response extends HttpResponse { } // @public (undocumented) -export interface TestRunDeletedefaultHeaders { +export interface TestRunDeleteDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunDeletedefaultResponse extends HttpResponse { +export interface TestRunDeleteDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunDeletedefaultHeaders; + headers: RawHttpHeaders & TestRunDeleteDefaultHeaders; // (undocumented) status: string; } @@ -1213,16 +1146,16 @@ export interface TestRunGetAppComponents200Response extends HttpResponse { } // @public (undocumented) -export interface TestRunGetAppComponentsdefaultHeaders { +export interface TestRunGetAppComponentsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunGetAppComponentsdefaultResponse extends HttpResponse { +export interface TestRunGetAppComponentsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunGetAppComponentsdefaultHeaders; + headers: RawHttpHeaders & TestRunGetAppComponentsDefaultHeaders; // (undocumented) status: string; } @@ -1231,23 +1164,23 @@ export interface TestRunGetAppComponentsdefaultResponse extends HttpResponse { export type TestRunGetAppComponentsParameters = RequestParameters; // @public (undocumented) -export interface TestRunGetdefaultHeaders { +export interface TestRunGetDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunGetdefaultResponse extends HttpResponse { +export interface TestRunGetDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunGetdefaultHeaders; + headers: RawHttpHeaders & TestRunGetDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) export interface TestRunGetFile { - get(options?: TestRunGetFileParameters): StreamableMethod; + get(options?: TestRunGetFileParameters): StreamableMethod; } // @public @@ -1259,16 +1192,16 @@ export interface TestRunGetFile200Response extends HttpResponse { } // @public (undocumented) -export interface TestRunGetFiledefaultHeaders { +export interface TestRunGetFileDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunGetFiledefaultResponse extends HttpResponse { +export interface TestRunGetFileDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunGetFiledefaultHeaders; + headers: RawHttpHeaders & TestRunGetFileDefaultHeaders; // (undocumented) status: string; } @@ -1276,15 +1209,60 @@ export interface TestRunGetFiledefaultResponse extends HttpResponse { // @public (undocumented) export type TestRunGetFileParameters = RequestParameters; +// @public (undocumented) +export interface TestRunGetMetricDimensionValues { + get(options: TestRunGetMetricDimensionValuesParameters): StreamableMethod; +} + +// @public +export interface TestRunGetMetricDimensionValues200Response extends HttpResponse { + // (undocumented) + body: DimensionValueListOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunGetMetricDimensionValuesDefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunGetMetricDimensionValuesDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunGetMetricDimensionValuesDefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunGetMetricDimensionValuesParameters = TestRunGetMetricDimensionValuesQueryParam & RequestParameters; + +// @public (undocumented) +export interface TestRunGetMetricDimensionValuesQueryParam { + // (undocumented) + queryParameters: TestRunGetMetricDimensionValuesQueryParamProperties; +} + +// @public (undocumented) +export interface TestRunGetMetricDimensionValuesQueryParamProperties { + interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; + metricname: string; + metricNamespace: string; + timespan: string; +} + // @public (undocumented) export interface TestRunGetMetrics { - post(options: TestRunGetMetricsParameters): StreamableMethod; + post(options: TestRunGetMetricsParameters): StreamableMethod; } // @public export interface TestRunGetMetrics200Response extends HttpResponse { // (undocumented) - body: ResponseOutput; + body: MetricsOutput; // (undocumented) status: "200"; } @@ -1295,16 +1273,16 @@ export interface TestRunGetMetricsBodyParam { } // @public (undocumented) -export interface TestRunGetMetricsdefaultHeaders { +export interface TestRunGetMetricsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunGetMetricsdefaultResponse extends HttpResponse { +export interface TestRunGetMetricsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunGetMetricsdefaultHeaders; + headers: RawHttpHeaders & TestRunGetMetricsDefaultHeaders; // (undocumented) status: string; } @@ -1329,7 +1307,6 @@ export interface TestRunGetMetricsQueryParamProperties { interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; metricname: string; metricNamespace: string; - resultType: "Data" | "Metadata"; timespan: string; } @@ -1345,16 +1322,16 @@ export interface TestRunGetServerMetricsConfig200Response extends HttpResponse { } // @public (undocumented) -export interface TestRunGetServerMetricsConfigdefaultHeaders { +export interface TestRunGetServerMetricsConfigDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunGetServerMetricsConfigdefaultResponse extends HttpResponse { +export interface TestRunGetServerMetricsConfigDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunGetServerMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & TestRunGetServerMetricsConfigDefaultHeaders; // (undocumented) status: string; } @@ -1362,7 +1339,7 @@ export interface TestRunGetServerMetricsConfigdefaultResponse extends HttpRespon // @public (undocumented) export type TestRunGetServerMetricsConfigParameters = RequestParameters; -// @public (undocumented) +// @public export interface TestRunInputArtifacts { additionalFileInfo?: Array; configFileInfo?: FileInfo; @@ -1371,7 +1348,7 @@ export interface TestRunInputArtifacts { userPropFileInfo?: FileInfo; } -// @public (undocumented) +// @public export interface TestRunInputArtifactsOutput { additionalFileInfo?: Array; configFileInfo?: FileInfoOutput; @@ -1382,7 +1359,7 @@ export interface TestRunInputArtifactsOutput { // @public (undocumented) export interface TestRunList { - get(options?: TestRunListParameters): StreamableMethod; + get(options?: TestRunListParameters): StreamableMethod; } // @public @@ -1394,23 +1371,23 @@ export interface TestRunList200Response extends HttpResponse { } // @public (undocumented) -export interface TestRunListdefaultHeaders { +export interface TestRunListDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunListdefaultResponse extends HttpResponse { +export interface TestRunListDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunListdefaultHeaders; + headers: RawHttpHeaders & TestRunListDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) export interface TestRunListMetricDefinitions { - get(options: TestRunListMetricDefinitionsParameters): StreamableMethod; + get(options: TestRunListMetricDefinitionsParameters): StreamableMethod; } // @public @@ -1422,16 +1399,16 @@ export interface TestRunListMetricDefinitions200Response extends HttpResponse { } // @public (undocumented) -export interface TestRunListMetricDefinitionsdefaultHeaders { +export interface TestRunListMetricDefinitionsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunListMetricDefinitionsdefaultResponse extends HttpResponse { +export interface TestRunListMetricDefinitionsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunListMetricDefinitionsdefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricDefinitionsDefaultHeaders; // (undocumented) status: string; } @@ -1452,7 +1429,7 @@ export interface TestRunListMetricDefinitionsQueryParamProperties { // @public (undocumented) export interface TestRunListMetricNamespaces { - get(options?: TestRunListMetricNamespacesParameters): StreamableMethod; + get(options?: TestRunListMetricNamespacesParameters): StreamableMethod; } // @public @@ -1464,16 +1441,16 @@ export interface TestRunListMetricNamespaces200Response extends HttpResponse { } // @public (undocumented) -export interface TestRunListMetricNamespacesdefaultHeaders { +export interface TestRunListMetricNamespacesDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunListMetricNamespacesdefaultResponse extends HttpResponse { +export interface TestRunListMetricNamespacesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunListMetricNamespacesdefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricNamespacesDefaultHeaders; // (undocumented) status: string; } @@ -1502,7 +1479,7 @@ export interface TestRunListQueryParamProperties { testId?: string; } -// @public (undocumented) +// @public export interface TestRunOutput { certificate?: CertificateMetadataOutput; createdBy?: string; @@ -1528,22 +1505,22 @@ export interface TestRunOutput { testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED"; testRunId?: string; testRunStatistics?: Record; - vusers?: number; + virtualUsers?: number; } -// @public (undocumented) +// @public export interface TestRunOutputArtifacts { logsUrl?: FileInfo; resultUrl?: FileInfo; } -// @public (undocumented) +// @public export interface TestRunOutputArtifactsOutput { logsUrl?: FileInfoOutput; resultUrl?: FileInfoOutput; } -// @public (undocumented) +// @public export interface TestRunServerMetricConfig { createdBy?: string; createdDateTime?: Date | string; @@ -1553,7 +1530,7 @@ export interface TestRunServerMetricConfig { testRunId?: string; } -// @public (undocumented) +// @public export interface TestRunServerMetricConfigOutput { createdBy?: string; createdDateTime?: string; @@ -1563,13 +1540,13 @@ export interface TestRunServerMetricConfigOutput { testRunId?: string; } -// @public (undocumented) +// @public export interface TestRunsListOutput { nextLink?: string; value: Array; } -// @public (undocumented) +// @public export interface TestRunStatistics { errorCount?: number; errorPct?: number; @@ -1587,7 +1564,7 @@ export interface TestRunStatistics { transaction?: string; } -// @public (undocumented) +// @public export interface TestRunStatisticsOutput { errorCount?: number; errorPct?: number; @@ -1607,7 +1584,7 @@ export interface TestRunStatisticsOutput { // @public (undocumented) export interface TestRunStop { - post(options?: TestRunStopParameters): StreamableMethod; + post(options?: TestRunStopParameters): StreamableMethod; } // @public @@ -1619,16 +1596,16 @@ export interface TestRunStop200Response extends HttpResponse { } // @public (undocumented) -export interface TestRunStopdefaultHeaders { +export interface TestRunStopDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunStopdefaultResponse extends HttpResponse { +export interface TestRunStopDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunStopdefaultHeaders; + headers: RawHttpHeaders & TestRunStopDefaultHeaders; // (undocumented) status: string; } @@ -1636,7 +1613,7 @@ export interface TestRunStopdefaultResponse extends HttpResponse { // @public (undocumented) export type TestRunStopParameters = RequestParameters; -// @public (undocumented) +// @public export interface TestServerMetricConfig { createdBy?: string; createdDateTime?: Date | string; @@ -1646,7 +1623,7 @@ export interface TestServerMetricConfig { testId?: string; } -// @public (undocumented) +// @public export interface TestServerMetricConfigOutput { createdBy?: string; createdDateTime?: string; @@ -1656,16 +1633,70 @@ export interface TestServerMetricConfigOutput { testId?: string; } -// @public (undocumented) +// @public export interface TestsListOutput { nextLink?: string; value: Array; } // @public (undocumented) +export interface TestUploadFile { + delete(options?: TestDeleteFileParameters): StreamableMethod; + get(options?: TestGetFileParameters): StreamableMethod; + put(options: TestUploadFileParameters): StreamableMethod; +} + +// @public +export interface TestUploadFile201Response extends HttpResponse { + // (undocumented) + body: FileInfoOutput; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface TestUploadFileBodyParam { + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; +} + +// @public (undocumented) +export interface TestUploadFileDefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestUploadFileDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestUploadFileDefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export interface TestUploadFileMediaTypesParam { + contentType?: "application/octet-stream"; +} + +// @public (undocumented) +export type TestUploadFileParameters = TestUploadFileQueryParam & TestUploadFileMediaTypesParam & TestUploadFileBodyParam & RequestParameters; + +// @public (undocumented) +export interface TestUploadFileQueryParam { + // (undocumented) + queryParameters?: TestUploadFileQueryParamProperties; +} + +// @public (undocumented) +export interface TestUploadFileQueryParamProperties { + fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; +} + +// @public export interface TimeSeriesElementOutput { data?: Array; - metadatavalues?: Array; + dimensionValues?: Array; } // (No @packageDocumentation comment for this package) diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts index 964389a389f6..ace80bffaa98 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts @@ -24,7 +24,7 @@ async function main() { body: { testId: testId, displayName: displayName, - vusers: 10, + virtualUsers: 10, }, }); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts index 41d84e35d994..3762c69c92ac 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts @@ -45,12 +45,10 @@ async function main() { // Uploading .jmx file to a test const fileUploadResult = await client - .path("/tests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) + .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileId) .put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, + contentType: "application/octet-stream", + body: readStream, }); if (isUnexpected(fileUploadResult)) { diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md deleted file mode 100644 index c74cf067da36..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -page_type: sample -languages: - - javascript -products: - - azure -urlFragment: load-testing-javascript ---- - -# Azure Load Testing rest client library samples for JavaScript - -These sample programs show how to use the JavaScript client libraries for Azure Load Testing rest in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------------------------------------- | -------------------------- | -| [createAppComponent.js][createappcomponent] | creates and run a loadtest | -| [createOrUpdateTest.js][createorupdatetest] | creates and run a loadtest | -| [createTestRunAndGetMetrics.js][createtestrunandgetmetrics] | creates and run a loadtest | -| [fileUpload.js][fileupload] | creates and run a loadtest | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: - -- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -3. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node createAppComponent.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node createAppComponent.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[createappcomponent]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js -[createorupdatetest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js -[createtestrunandgetmetrics]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js -[fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing -[freesub]: https://azure.microsoft.com/free/ -[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js deleted file mode 100644 index c2f6d46dc94d..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - */ - -const AzureLoadTesting = require("@azure-rest/load-testing").default, - { isUnexpected } = require("@azure-rest/load-testing"); -const { DefaultAzureCredential } = require("@azure/identity"); -const { v4: uuidv4 } = require("uuid"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - const appComponentCreationResult = await client - .path("/tests/{testId}/app-components", testId) - .patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - components: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": - { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js deleted file mode 100644 index 5cab86a174ce..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - */ - -const AzureLoadTesting /*, { isUnexpected }*/ = require("@azure-rest/load-testing").default; -const { DefaultAzureCredential } = require("@azure/identity"); -const { v4: uuidv4 } = require("uuid"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating the Load test - await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js deleted file mode 100644 index b4455318442e..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * This sample demonstrates how to run a test and get test status - * - * @summary creates and run a loadtest - */ - -const AzureLoadTesting = require("@azure-rest/load-testing").default, - { isUnexpected } = require("@azure-rest/load-testing"); -const { DefaultAzureCredential } = require("@azure/identity"); -const { v4: uuidv4 } = require("uuid"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - const testRunId = uuidv4(); // ID to be assigned to a testRun - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testId, - displayName: displayName, - vusers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - // Checking the test run status and printing metrics - var testStatus = null; - var getTestRunResult = null; - const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); - - //wait for terminal state - while ( - testStatus == null || - (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; - - //Check test status after every 5 seconds - sleep(5000); - } - - console.log(getTestRunResult); -} -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js deleted file mode 100644 index c1ae7f121d28..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - */ - -const AzureLoadTesting = require("@azure-rest/load-testing").default, - { isUnexpected } = require("@azure-rest/load-testing"); -const { DefaultAzureCredential } = require("@azure/identity"); -const { createReadStream } = require("fs"); -const { v4: uuidv4 } = require("uuid"); - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - const fileId = uuidv4(); // ID to be assigned to the file being uploaded - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/tests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) - .put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json deleted file mode 100644 index e61020757e2e..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@azure-samples/load-testing-js", - "private": true, - "version": "1.0.0", - "description": "Azure Load Testing rest client library samples for JavaScript", - "engines": { - "node": ">=14.0.0" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/loadtestservice/load-testing-rest" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", - "dependencies": { - "@azure-rest/load-testing": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1", - "uuid": "^9.0.0" - } -} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md deleted file mode 100644 index 3b0d5579d4e4..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -page_type: sample -languages: - - typescript -products: - - azure -urlFragment: load-testing-typescript ---- - -# Azure Load Testing rest client library samples for TypeScript - -These sample programs show how to use the TypeScript client libraries for Azure Load Testing rest in some common scenarios. - -| **File Name** | **Description** | -| ----------------------------------------------------------- | -------------------------- | -| [createAppComponent.ts][createappcomponent] | creates and run a loadtest | -| [createOrUpdateTest.ts][createorupdatetest] | creates and run a loadtest | -| [createTestRunAndGetMetrics.ts][createtestrunandgetmetrics] | creates and run a loadtest | -| [fileUpload.ts][fileupload] | creates and run a loadtest | - -## Prerequisites - -The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). - -Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: - -```bash -npm install -g typescript -``` - -You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: - -- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] - -Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. - -Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. - -## Setup - -To run the samples using the published version of the package: - -1. Install the dependencies using `npm`: - -```bash -npm install -``` - -2. Compile the samples: - -```bash -npm run build -``` - -3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. - -4. Run whichever samples you like (note that some samples may require additional setup, see the table above): - -```bash -node dist/createAppComponent.js -``` - -Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): - -```bash -npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node dist/createAppComponent.js -``` - -## Next Steps - -Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. - -[createappcomponent]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts -[createorupdatetest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts -[createtestrunandgetmetrics]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts -[fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing -[freesub]: https://azure.microsoft.com/free/ -[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ -[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md -[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json deleted file mode 100644 index 0a1dad64a501..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "@azure-samples/load-testing-ts", - "private": true, - "version": "1.0.0", - "description": "Azure Load Testing rest client library samples for TypeScript", - "engines": { - "node": ">=14.0.0" - }, - "scripts": { - "build": "tsc", - "prebuild": "rimraf dist/" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/Azure/azure-sdk-for-js.git", - "directory": "sdk/loadtestservice/load-testing-rest" - }, - "keywords": [ - "node", - "azure", - "cloud", - "typescript", - "browser", - "isomorphic" - ], - "author": "Microsoft Corporation", - "license": "MIT", - "bugs": { - "url": "https://github.com/Azure/azure-sdk-for-js/issues" - }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", - "dependencies": { - "@azure-rest/load-testing": "latest", - "dotenv": "latest", - "@azure/identity": "^2.0.1", - "uuid": "^9.0.0" - }, - "devDependencies": { - "@types/uuid": "^8.3.4", - "@types/node": "^14.0.0", - "typescript": "~4.8.0", - "rimraf": "latest" - } -} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env deleted file mode 100644 index 672847a3fea0..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env +++ /dev/null @@ -1,4 +0,0 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts deleted file mode 100644 index c012938aa390..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { v4 as uuidv4 } from "uuid"; - - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - const appComponentCreationResult = await client - .path("/tests/{testId}/app-components", testId) - .patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - components: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts deleted file mode 100644 index d357c3c70e4a..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting/*, { isUnexpected }*/ from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { v4 as uuidv4 } from "uuid"; - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating the Load test - await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration : { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts deleted file mode 100644 index 49fc76a717be..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * This sample demonstrates how to run a test and get test status - * - * @summary creates and run a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { v4 as uuidv4 } from "uuid"; - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - const testRunId = uuidv4(); // ID to be assigned to a testRun - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testId, - displayName: displayName, - vusers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - // Checking the test run status and printing metrics - var testStatus = null; - var getTestRunResult = null; - const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); - - //wait for terminal state - while ( - testStatus == null || - (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; - - //Check test status after every 5 seconds - sleep(5000); - } - - console.log(getTestRunResult); - -} -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts deleted file mode 100644 index 41d84e35d994..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { createReadStream } from "fs"; -import { v4 as uuidv4 } from "uuid"; - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - const fileId = uuidv4(); // ID to be assigned to the file being uploaded - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/tests/{testId}/files/{fileId}", testCreationResult.body.testId, fileId) - .put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json deleted file mode 100644 index 416c2dd82e00..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2018", - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "alwaysStrict": true, - "outDir": "dist", - "rootDir": "src" - }, - "include": [ - "src/**.ts" - ] -} diff --git a/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts b/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts index 38dd27db597a..2b96833bc470 100644 --- a/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts +++ b/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts @@ -5,6 +5,11 @@ import { getClient, ClientOptions } from "@azure-rest/core-client"; import { TokenCredential } from "@azure/core-auth"; import { AzureLoadTestingClient } from "./clientDefinitions"; +/** + * Initialize a new instance of the class AzureLoadTestingClient class. + * @param Endpoint type: string URL to perform data plane API operations on the resource. + * @param credentials type: TokenCredential + */ export default function createClient( Endpoint: string, credentials: TokenCredential, diff --git a/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts b/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts index 3182b08d843c..fa060ea97a24 100644 --- a/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts +++ b/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts @@ -2,18 +2,18 @@ // Licensed under the MIT license. import { - LoadTestAdministrationCreateOrUpdateTestParameters, - LoadTestAdministrationDeleteTestParameters, - LoadTestAdministrationGetTestParameters, - LoadTestAdministrationListTestsParameters, - LoadTestAdministrationUploadFileParameters, - LoadTestAdministrationGetFileParameters, - LoadTestAdministrationDeleteFileParameters, - LoadTestAdministrationListFilesTestParameters, - LoadTestAdministrationCreateOrUpdateAppComponentTestParameters, - LoadTestAdministrationGetAppComponentsTestParameters, - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters, - LoadTestAdministrationGetServerMetricsConfigTestParameters, + TestCreateOrUpdateParameters, + TestDeleteParameters, + TestGetParameters, + TestListParameters, + TestUploadFileParameters, + TestGetFileParameters, + TestDeleteFileParameters, + TestListFilesParameters, + TestCreateOrUpdateAppComponentParameters, + TestGetAppComponentsParameters, + TestCreateOrUpdateServerMetricsConfigParameters, + TestGetServerMetricsConfigParameters, TestRunDeleteParameters, TestRunCreateOrUpdateParameters, TestRunGetParameters, @@ -23,166 +23,149 @@ import { TestRunListMetricNamespacesParameters, TestRunListMetricDefinitionsParameters, TestRunGetMetricsParameters, + TestRunGetMetricDimensionValuesParameters, TestRunCreateOrUpdateAppComponentParameters, TestRunGetAppComponentsParameters, TestRunCreateOrUpdateServerMetricsConfigParameters, TestRunGetServerMetricsConfigParameters, } from "./parameters"; import { - LoadTestAdministrationCreateOrUpdateTest200Response, - LoadTestAdministrationCreateOrUpdateTest201Response, - LoadTestAdministrationCreateOrUpdateTestdefaultResponse, - LoadTestAdministrationDeleteTest204Response, - LoadTestAdministrationDeleteTestdefaultResponse, - LoadTestAdministrationGetTest200Response, - LoadTestAdministrationGetTestdefaultResponse, - LoadTestAdministrationListTests200Response, - LoadTestAdministrationListTestsdefaultResponse, - LoadTestAdministrationUploadFile201Response, - LoadTestAdministrationUploadFiledefaultResponse, - LoadTestAdministrationGetFile200Response, - LoadTestAdministrationGetFiledefaultResponse, - LoadTestAdministrationDeleteFile204Response, - LoadTestAdministrationDeleteFiledefaultResponse, - LoadTestAdministrationListFilesTest200Response, - LoadTestAdministrationListFilesTestdefaultResponse, - LoadTestAdministrationCreateOrUpdateAppComponentTest200Response, - LoadTestAdministrationCreateOrUpdateAppComponentTest201Response, - LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse, - LoadTestAdministrationGetAppComponentsTest200Response, - LoadTestAdministrationGetAppComponentsTestdefaultResponse, - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response, - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response, - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse, - LoadTestAdministrationGetServerMetricsConfigTest200Response, - LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse, + TestCreateOrUpdate200Response, + TestCreateOrUpdate201Response, + TestCreateOrUpdateDefaultResponse, + TestDelete204Response, + TestDeleteDefaultResponse, + TestGet200Response, + TestGetDefaultResponse, + TestList200Response, + TestListDefaultResponse, + TestUploadFile201Response, + TestUploadFileDefaultResponse, + TestGetFile200Response, + TestGetFileDefaultResponse, + TestDeleteFile204Response, + TestDeleteFileDefaultResponse, + TestListFiles200Response, + TestListFilesDefaultResponse, + TestCreateOrUpdateAppComponent200Response, + TestCreateOrUpdateAppComponent201Response, + TestCreateOrUpdateAppComponentDefaultResponse, + TestGetAppComponents200Response, + TestGetAppComponentsDefaultResponse, + TestCreateOrUpdateServerMetricsConfig200Response, + TestCreateOrUpdateServerMetricsConfig201Response, + TestCreateOrUpdateServerMetricsConfigDefaultResponse, + TestGetServerMetricsConfig200Response, + TestGetServerMetricsConfigDefaultResponse, TestRunDelete204Response, - TestRunDeletedefaultResponse, + TestRunDeleteDefaultResponse, TestRunCreateOrUpdate200Response, - TestRunCreateOrUpdatedefaultResponse, + TestRunCreateOrUpdate201Response, + TestRunCreateOrUpdateDefaultResponse, TestRunGet200Response, - TestRunGetdefaultResponse, + TestRunGetDefaultResponse, TestRunGetFile200Response, - TestRunGetFiledefaultResponse, + TestRunGetFileDefaultResponse, TestRunList200Response, - TestRunListdefaultResponse, + TestRunListDefaultResponse, TestRunStop200Response, - TestRunStopdefaultResponse, + TestRunStopDefaultResponse, TestRunListMetricNamespaces200Response, - TestRunListMetricNamespacesdefaultResponse, + TestRunListMetricNamespacesDefaultResponse, TestRunListMetricDefinitions200Response, - TestRunListMetricDefinitionsdefaultResponse, + TestRunListMetricDefinitionsDefaultResponse, TestRunGetMetrics200Response, - TestRunGetMetricsdefaultResponse, + TestRunGetMetricsDefaultResponse, + TestRunGetMetricDimensionValues200Response, + TestRunGetMetricDimensionValuesDefaultResponse, TestRunCreateOrUpdateAppComponent200Response, TestRunCreateOrUpdateAppComponent201Response, - TestRunCreateOrUpdateAppComponentdefaultResponse, + TestRunCreateOrUpdateAppComponentDefaultResponse, TestRunGetAppComponents200Response, - TestRunGetAppComponentsdefaultResponse, + TestRunGetAppComponentsDefaultResponse, TestRunCreateOrUpdateServerMetricsConfig200Response, TestRunCreateOrUpdateServerMetricsConfig201Response, - TestRunCreateOrUpdateServerMetricsConfigdefaultResponse, + TestRunCreateOrUpdateServerMetricsConfigDefaultResponse, TestRunGetServerMetricsConfig200Response, - TestRunGetServerMetricsConfigdefaultResponse, + TestRunGetServerMetricsConfigDefaultResponse, } from "./responses"; import { Client, StreamableMethod } from "@azure-rest/core-client"; -export interface LoadTestAdministrationCreateOrUpdateTest { +export interface TestCreateOrUpdate { /** Create a new test or update an existing test. */ patch( - options: LoadTestAdministrationCreateOrUpdateTestParameters + options: TestCreateOrUpdateParameters ): StreamableMethod< - | LoadTestAdministrationCreateOrUpdateTest200Response - | LoadTestAdministrationCreateOrUpdateTest201Response - | LoadTestAdministrationCreateOrUpdateTestdefaultResponse + | TestCreateOrUpdate200Response + | TestCreateOrUpdate201Response + | TestCreateOrUpdateDefaultResponse >; /** Delete a test by its name. */ delete( - options?: LoadTestAdministrationDeleteTestParameters - ): StreamableMethod< - LoadTestAdministrationDeleteTest204Response | LoadTestAdministrationDeleteTestdefaultResponse - >; + options?: TestDeleteParameters + ): StreamableMethod; /** Get load test details by test name */ - get( - options?: LoadTestAdministrationGetTestParameters - ): StreamableMethod< - LoadTestAdministrationGetTest200Response | LoadTestAdministrationGetTestdefaultResponse - >; + get(options?: TestGetParameters): StreamableMethod; } -export interface LoadTestAdministrationListTests { +export interface TestList { /** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ get( - options?: LoadTestAdministrationListTestsParameters - ): StreamableMethod< - LoadTestAdministrationListTests200Response | LoadTestAdministrationListTestsdefaultResponse - >; + options?: TestListParameters + ): StreamableMethod; } -export interface LoadTestAdministrationUploadFile { - /** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ +export interface TestUploadFile { + /** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as application/octet-stream. */ put( - options: LoadTestAdministrationUploadFileParameters - ): StreamableMethod< - LoadTestAdministrationUploadFile201Response | LoadTestAdministrationUploadFiledefaultResponse - >; + options: TestUploadFileParameters + ): StreamableMethod; /** Get test file by the file name. */ get( - options?: LoadTestAdministrationGetFileParameters - ): StreamableMethod< - LoadTestAdministrationGetFile200Response | LoadTestAdministrationGetFiledefaultResponse - >; + options?: TestGetFileParameters + ): StreamableMethod; /** Delete file by the file name for a test */ delete( - options?: LoadTestAdministrationDeleteFileParameters - ): StreamableMethod< - LoadTestAdministrationDeleteFile204Response | LoadTestAdministrationDeleteFiledefaultResponse - >; + options?: TestDeleteFileParameters + ): StreamableMethod; } -export interface LoadTestAdministrationListFilesTest { +export interface TestListFiles { /** Get all test files. */ get( - options?: LoadTestAdministrationListFilesTestParameters - ): StreamableMethod< - | LoadTestAdministrationListFilesTest200Response - | LoadTestAdministrationListFilesTestdefaultResponse - >; + options?: TestListFilesParameters + ): StreamableMethod; } -export interface LoadTestAdministrationCreateOrUpdateAppComponentTest { +export interface TestCreateOrUpdateAppComponent { /** Associate an app component (collection of azure resources) to a test */ patch( - options: LoadTestAdministrationCreateOrUpdateAppComponentTestParameters + options: TestCreateOrUpdateAppComponentParameters ): StreamableMethod< - | LoadTestAdministrationCreateOrUpdateAppComponentTest200Response - | LoadTestAdministrationCreateOrUpdateAppComponentTest201Response - | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse + | TestCreateOrUpdateAppComponent200Response + | TestCreateOrUpdateAppComponent201Response + | TestCreateOrUpdateAppComponentDefaultResponse >; /** Get associated app component (collection of azure resources) for the given test. */ get( - options?: LoadTestAdministrationGetAppComponentsTestParameters - ): StreamableMethod< - | LoadTestAdministrationGetAppComponentsTest200Response - | LoadTestAdministrationGetAppComponentsTestdefaultResponse - >; + options?: TestGetAppComponentsParameters + ): StreamableMethod; } -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest { +export interface TestCreateOrUpdateServerMetricsConfig { /** Configure server metrics for a test */ patch( - options: LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters + options: TestCreateOrUpdateServerMetricsConfigParameters ): StreamableMethod< - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse + | TestCreateOrUpdateServerMetricsConfig200Response + | TestCreateOrUpdateServerMetricsConfig201Response + | TestCreateOrUpdateServerMetricsConfigDefaultResponse >; /** Get server metric configuration for the given test. */ get( - options?: LoadTestAdministrationGetServerMetricsConfigTestParameters + options?: TestGetServerMetricsConfigParameters ): StreamableMethod< - | LoadTestAdministrationGetServerMetricsConfigTest200Response - | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse + TestGetServerMetricsConfig200Response | TestGetServerMetricsConfigDefaultResponse >; } @@ -190,36 +173,40 @@ export interface TestRunDelete { /** Delete a test run by its name. */ delete( options?: TestRunDeleteParameters - ): StreamableMethod; + ): StreamableMethod; /** Create and start a new test run with the given name. */ patch( options: TestRunCreateOrUpdateParameters - ): StreamableMethod; + ): StreamableMethod< + | TestRunCreateOrUpdate200Response + | TestRunCreateOrUpdate201Response + | TestRunCreateOrUpdateDefaultResponse + >; /** Get test run details by name. */ get( options?: TestRunGetParameters - ): StreamableMethod; + ): StreamableMethod; } export interface TestRunGetFile { /** Get test run file by file name. */ get( options?: TestRunGetFileParameters - ): StreamableMethod; + ): StreamableMethod; } export interface TestRunList { /** Get all test runs with given filters */ get( options?: TestRunListParameters - ): StreamableMethod; + ): StreamableMethod; } export interface TestRunStop { /** Stop test run by name. */ post( options?: TestRunStopParameters - ): StreamableMethod; + ): StreamableMethod; } export interface TestRunListMetricNamespaces { @@ -227,7 +214,7 @@ export interface TestRunListMetricNamespaces { get( options?: TestRunListMetricNamespacesParameters ): StreamableMethod< - TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesdefaultResponse + TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesDefaultResponse >; } @@ -236,7 +223,7 @@ export interface TestRunListMetricDefinitions { get( options: TestRunListMetricDefinitionsParameters ): StreamableMethod< - TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsdefaultResponse + TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsDefaultResponse >; } @@ -244,7 +231,16 @@ export interface TestRunGetMetrics { /** Lists the metric values for a load test run. */ post( options: TestRunGetMetricsParameters - ): StreamableMethod; + ): StreamableMethod; +} + +export interface TestRunGetMetricDimensionValues { + /** Lists the dimension values for the given metric dimension name. */ + get( + options: TestRunGetMetricDimensionValuesParameters + ): StreamableMethod< + TestRunGetMetricDimensionValues200Response | TestRunGetMetricDimensionValuesDefaultResponse + >; } export interface TestRunCreateOrUpdateAppComponent { @@ -254,12 +250,12 @@ export interface TestRunCreateOrUpdateAppComponent { ): StreamableMethod< | TestRunCreateOrUpdateAppComponent200Response | TestRunCreateOrUpdateAppComponent201Response - | TestRunCreateOrUpdateAppComponentdefaultResponse + | TestRunCreateOrUpdateAppComponentDefaultResponse >; /** Get associated app component (collection of azure resources) for the given test run. */ get( options?: TestRunGetAppComponentsParameters - ): StreamableMethod; + ): StreamableMethod; } export interface TestRunCreateOrUpdateServerMetricsConfig { @@ -269,46 +265,39 @@ export interface TestRunCreateOrUpdateServerMetricsConfig { ): StreamableMethod< | TestRunCreateOrUpdateServerMetricsConfig200Response | TestRunCreateOrUpdateServerMetricsConfig201Response - | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse + | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse >; /** Get server metric configuration for the given test run. */ get( options?: TestRunGetServerMetricsConfigParameters ): StreamableMethod< - TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigdefaultResponse + TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigDefaultResponse >; } export interface Routes { /** Resource for '/tests/\{testId\}' has methods for the following verbs: patch, delete, get */ - (path: "/tests/{testId}", testId: string): LoadTestAdministrationCreateOrUpdateTest; + (path: "/tests/{testId}", testId: string): TestCreateOrUpdate; /** Resource for '/tests' has methods for the following verbs: get */ - (path: "/tests"): LoadTestAdministrationListTests; - /** Resource for '/tests/\{testId\}/files/\{fileId\}' has methods for the following verbs: put, get, delete */ - ( - path: "/tests/{testId}/files/{fileId}", - testId: string, - fileId: string - ): LoadTestAdministrationUploadFile; + (path: "/tests"): TestList; + /** Resource for '/tests/\{testId\}/files/\{fileName\}' has methods for the following verbs: put, get, delete */ + (path: "/tests/{testId}/files/{fileName}", testId: string, fileName: string): TestUploadFile; /** Resource for '/tests/\{testId\}/files' has methods for the following verbs: get */ - (path: "/tests/{testId}/files", testId: string): LoadTestAdministrationListFilesTest; + (path: "/tests/{testId}/files", testId: string): TestListFiles; /** Resource for '/tests/\{testId\}/app-components' has methods for the following verbs: patch, get */ - ( - path: "/tests/{testId}/app-components", - testId: string - ): LoadTestAdministrationCreateOrUpdateAppComponentTest; + (path: "/tests/{testId}/app-components", testId: string): TestCreateOrUpdateAppComponent; /** Resource for '/tests/\{testId\}/server-metric-configs' has methods for the following verbs: patch, get */ ( path: "/tests/{testId}/server-metric-configs", testId: string - ): LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest; + ): TestCreateOrUpdateServerMetricsConfig; /** Resource for '/test-runs/\{testRunId\}' has methods for the following verbs: delete, patch, get */ (path: "/test-runs/{testRunId}", testRunId: string): TestRunDelete; - /** Resource for '/test-runs/\{testRunId\}/files/\{fileId\}' has methods for the following verbs: get */ + /** Resource for '/test-runs/\{testRunId\}/files/\{fileName\}' has methods for the following verbs: get */ ( - path: "/test-runs/{testRunId}/files/{fileId}", + path: "/test-runs/{testRunId}/files/{fileName}", testRunId: string, - fileId: string + fileName: string ): TestRunGetFile; /** Resource for '/test-runs' has methods for the following verbs: get */ (path: "/test-runs"): TestRunList; @@ -326,6 +315,12 @@ export interface Routes { ): TestRunListMetricDefinitions; /** Resource for '/test-runs/\{testRunId\}/metrics' has methods for the following verbs: post */ (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunGetMetrics; + /** Resource for '/test-runs/\{testRunId\}/metric-dimension/\{name\}/values' has methods for the following verbs: get */ + ( + path: "/test-runs/{testRunId}/metric-dimension/{name}/values", + testRunId: string, + name: string + ): TestRunGetMetricDimensionValues; /** Resource for '/test-runs/\{testRunId\}/app-components' has methods for the following verbs: patch, get */ ( path: "/test-runs/{testRunId}/app-components", diff --git a/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts b/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts index 2c6d9161b9de..3a973627bd6f 100644 --- a/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts +++ b/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts @@ -2,61 +2,64 @@ // Licensed under the MIT license. import { - LoadTestAdministrationCreateOrUpdateTest200Response, - LoadTestAdministrationCreateOrUpdateTest201Response, - LoadTestAdministrationCreateOrUpdateTestdefaultResponse, - LoadTestAdministrationDeleteTest204Response, - LoadTestAdministrationDeleteTestdefaultResponse, - LoadTestAdministrationGetTest200Response, - LoadTestAdministrationGetTestdefaultResponse, - LoadTestAdministrationListTests200Response, - LoadTestAdministrationListTestsdefaultResponse, - LoadTestAdministrationUploadFile201Response, - LoadTestAdministrationUploadFiledefaultResponse, - LoadTestAdministrationGetFile200Response, - LoadTestAdministrationGetFiledefaultResponse, - LoadTestAdministrationDeleteFile204Response, - LoadTestAdministrationDeleteFiledefaultResponse, - LoadTestAdministrationListFilesTest200Response, - LoadTestAdministrationListFilesTestdefaultResponse, - LoadTestAdministrationCreateOrUpdateAppComponentTest200Response, - LoadTestAdministrationCreateOrUpdateAppComponentTest201Response, - LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse, - LoadTestAdministrationGetAppComponentsTest200Response, - LoadTestAdministrationGetAppComponentsTestdefaultResponse, - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response, - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response, - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse, - LoadTestAdministrationGetServerMetricsConfigTest200Response, - LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse, + TestCreateOrUpdate200Response, + TestCreateOrUpdate201Response, + TestCreateOrUpdateDefaultResponse, + TestDelete204Response, + TestDeleteDefaultResponse, + TestGet200Response, + TestGetDefaultResponse, + TestList200Response, + TestListDefaultResponse, + TestUploadFile201Response, + TestUploadFileDefaultResponse, + TestGetFile200Response, + TestGetFileDefaultResponse, + TestDeleteFile204Response, + TestDeleteFileDefaultResponse, + TestListFiles200Response, + TestListFilesDefaultResponse, + TestCreateOrUpdateAppComponent200Response, + TestCreateOrUpdateAppComponent201Response, + TestCreateOrUpdateAppComponentDefaultResponse, + TestGetAppComponents200Response, + TestGetAppComponentsDefaultResponse, + TestCreateOrUpdateServerMetricsConfig200Response, + TestCreateOrUpdateServerMetricsConfig201Response, + TestCreateOrUpdateServerMetricsConfigDefaultResponse, + TestGetServerMetricsConfig200Response, + TestGetServerMetricsConfigDefaultResponse, TestRunDelete204Response, - TestRunDeletedefaultResponse, + TestRunDeleteDefaultResponse, TestRunCreateOrUpdate200Response, - TestRunCreateOrUpdatedefaultResponse, + TestRunCreateOrUpdate201Response, + TestRunCreateOrUpdateDefaultResponse, TestRunGet200Response, - TestRunGetdefaultResponse, + TestRunGetDefaultResponse, TestRunGetFile200Response, - TestRunGetFiledefaultResponse, + TestRunGetFileDefaultResponse, TestRunList200Response, - TestRunListdefaultResponse, + TestRunListDefaultResponse, TestRunStop200Response, - TestRunStopdefaultResponse, + TestRunStopDefaultResponse, TestRunListMetricNamespaces200Response, - TestRunListMetricNamespacesdefaultResponse, + TestRunListMetricNamespacesDefaultResponse, TestRunListMetricDefinitions200Response, - TestRunListMetricDefinitionsdefaultResponse, + TestRunListMetricDefinitionsDefaultResponse, TestRunGetMetrics200Response, - TestRunGetMetricsdefaultResponse, + TestRunGetMetricsDefaultResponse, + TestRunGetMetricDimensionValues200Response, + TestRunGetMetricDimensionValuesDefaultResponse, TestRunCreateOrUpdateAppComponent200Response, TestRunCreateOrUpdateAppComponent201Response, - TestRunCreateOrUpdateAppComponentdefaultResponse, + TestRunCreateOrUpdateAppComponentDefaultResponse, TestRunGetAppComponents200Response, - TestRunGetAppComponentsdefaultResponse, + TestRunGetAppComponentsDefaultResponse, TestRunCreateOrUpdateServerMetricsConfig200Response, TestRunCreateOrUpdateServerMetricsConfig201Response, - TestRunCreateOrUpdateServerMetricsConfigdefaultResponse, + TestRunCreateOrUpdateServerMetricsConfigDefaultResponse, TestRunGetServerMetricsConfig200Response, - TestRunGetServerMetricsConfigdefaultResponse, + TestRunGetServerMetricsConfigDefaultResponse, } from "./responses"; const responseMap: Record = { @@ -64,23 +67,24 @@ const responseMap: Record = { "DELETE /tests/{testId}": ["204"], "GET /tests/{testId}": ["200"], "GET /tests": ["200"], - "PUT /tests/{testId}/files/{fileId}": ["201"], - "GET /tests/{testId}/files/{fileId}": ["200"], - "DELETE /tests/{testId}/files/{fileId}": ["204"], + "PUT /tests/{testId}/files/{fileName}": ["201"], + "GET /tests/{testId}/files/{fileName}": ["200"], + "DELETE /tests/{testId}/files/{fileName}": ["204"], "GET /tests/{testId}/files": ["200"], "PATCH /tests/{testId}/app-components": ["200", "201"], "GET /tests/{testId}/app-components": ["200"], "PATCH /tests/{testId}/server-metric-configs": ["200", "201"], "GET /tests/{testId}/server-metric-configs": ["200"], "DELETE /test-runs/{testRunId}": ["204"], - "PATCH /test-runs/{testRunId}": ["200"], + "PATCH /test-runs/{testRunId}": ["200", "201"], "GET /test-runs/{testRunId}": ["200"], - "GET /test-runs/{testRunId}/files/{fileId}": ["200"], + "GET /test-runs/{testRunId}/files/{fileName}": ["200"], "GET /test-runs": ["200"], "POST /test-runs/{testRunId}:stop": ["200"], "GET /test-runs/{testRunId}/metric-namespaces": ["200"], "GET /test-runs/{testRunId}/metric-definitions": ["200"], "POST /test-runs/{testRunId}/metrics": ["200"], + "GET /test-runs/{testRunId}/metric-dimension/{name}/values": ["200"], "PATCH /test-runs/{testRunId}/app-components": ["200", "201"], "GET /test-runs/{testRunId}/app-components": ["200"], "PATCH /test-runs/{testRunId}/server-metric-configs": ["200", "201"], @@ -89,208 +93,209 @@ const responseMap: Record = { export function isUnexpected( response: - | LoadTestAdministrationCreateOrUpdateTest200Response - | LoadTestAdministrationCreateOrUpdateTest201Response - | LoadTestAdministrationCreateOrUpdateTestdefaultResponse -): response is LoadTestAdministrationCreateOrUpdateTestdefaultResponse; + | TestCreateOrUpdate200Response + | TestCreateOrUpdate201Response + | TestCreateOrUpdateDefaultResponse +): response is TestCreateOrUpdateDefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationDeleteTest204Response - | LoadTestAdministrationDeleteTestdefaultResponse -): response is LoadTestAdministrationDeleteTestdefaultResponse; + response: TestDelete204Response | TestDeleteDefaultResponse +): response is TestDeleteDefaultResponse; export function isUnexpected( - response: LoadTestAdministrationGetTest200Response | LoadTestAdministrationGetTestdefaultResponse -): response is LoadTestAdministrationGetTestdefaultResponse; + response: TestGet200Response | TestGetDefaultResponse +): response is TestGetDefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationListTests200Response - | LoadTestAdministrationListTestsdefaultResponse -): response is LoadTestAdministrationListTestsdefaultResponse; + response: TestList200Response | TestListDefaultResponse +): response is TestListDefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationUploadFile201Response - | LoadTestAdministrationUploadFiledefaultResponse -): response is LoadTestAdministrationUploadFiledefaultResponse; + response: TestUploadFile201Response | TestUploadFileDefaultResponse +): response is TestUploadFileDefaultResponse; export function isUnexpected( - response: LoadTestAdministrationGetFile200Response | LoadTestAdministrationGetFiledefaultResponse -): response is LoadTestAdministrationGetFiledefaultResponse; + response: TestGetFile200Response | TestGetFileDefaultResponse +): response is TestGetFileDefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationDeleteFile204Response - | LoadTestAdministrationDeleteFiledefaultResponse -): response is LoadTestAdministrationDeleteFiledefaultResponse; + response: TestDeleteFile204Response | TestDeleteFileDefaultResponse +): response is TestDeleteFileDefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationListFilesTest200Response - | LoadTestAdministrationListFilesTestdefaultResponse -): response is LoadTestAdministrationListFilesTestdefaultResponse; + response: TestListFiles200Response | TestListFilesDefaultResponse +): response is TestListFilesDefaultResponse; export function isUnexpected( response: - | LoadTestAdministrationCreateOrUpdateAppComponentTest200Response - | LoadTestAdministrationCreateOrUpdateAppComponentTest201Response - | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse -): response is LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse; + | TestCreateOrUpdateAppComponent200Response + | TestCreateOrUpdateAppComponent201Response + | TestCreateOrUpdateAppComponentDefaultResponse +): response is TestCreateOrUpdateAppComponentDefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationGetAppComponentsTest200Response - | LoadTestAdministrationGetAppComponentsTestdefaultResponse -): response is LoadTestAdministrationGetAppComponentsTestdefaultResponse; + response: TestGetAppComponents200Response | TestGetAppComponentsDefaultResponse +): response is TestGetAppComponentsDefaultResponse; export function isUnexpected( response: - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse -): response is LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse; + | TestCreateOrUpdateServerMetricsConfig200Response + | TestCreateOrUpdateServerMetricsConfig201Response + | TestCreateOrUpdateServerMetricsConfigDefaultResponse +): response is TestCreateOrUpdateServerMetricsConfigDefaultResponse; export function isUnexpected( - response: - | LoadTestAdministrationGetServerMetricsConfigTest200Response - | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse -): response is LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse; + response: TestGetServerMetricsConfig200Response | TestGetServerMetricsConfigDefaultResponse +): response is TestGetServerMetricsConfigDefaultResponse; +export function isUnexpected( + response: TestRunDelete204Response | TestRunDeleteDefaultResponse +): response is TestRunDeleteDefaultResponse; export function isUnexpected( - response: TestRunDelete204Response | TestRunDeletedefaultResponse -): response is TestRunDeletedefaultResponse; + response: + | TestRunCreateOrUpdate200Response + | TestRunCreateOrUpdate201Response + | TestRunCreateOrUpdateDefaultResponse +): response is TestRunCreateOrUpdateDefaultResponse; export function isUnexpected( - response: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdatedefaultResponse -): response is TestRunCreateOrUpdatedefaultResponse; + response: TestRunGet200Response | TestRunGetDefaultResponse +): response is TestRunGetDefaultResponse; export function isUnexpected( - response: TestRunGet200Response | TestRunGetdefaultResponse -): response is TestRunGetdefaultResponse; + response: TestRunGetFile200Response | TestRunGetFileDefaultResponse +): response is TestRunGetFileDefaultResponse; export function isUnexpected( - response: TestRunGetFile200Response | TestRunGetFiledefaultResponse -): response is TestRunGetFiledefaultResponse; + response: TestRunList200Response | TestRunListDefaultResponse +): response is TestRunListDefaultResponse; export function isUnexpected( - response: TestRunList200Response | TestRunListdefaultResponse -): response is TestRunListdefaultResponse; + response: TestRunStop200Response | TestRunStopDefaultResponse +): response is TestRunStopDefaultResponse; export function isUnexpected( - response: TestRunStop200Response | TestRunStopdefaultResponse -): response is TestRunStopdefaultResponse; + response: TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesDefaultResponse +): response is TestRunListMetricNamespacesDefaultResponse; export function isUnexpected( - response: TestRunListMetricNamespaces200Response | TestRunListMetricNamespacesdefaultResponse -): response is TestRunListMetricNamespacesdefaultResponse; + response: TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsDefaultResponse +): response is TestRunListMetricDefinitionsDefaultResponse; export function isUnexpected( - response: TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsdefaultResponse -): response is TestRunListMetricDefinitionsdefaultResponse; + response: TestRunGetMetrics200Response | TestRunGetMetricsDefaultResponse +): response is TestRunGetMetricsDefaultResponse; export function isUnexpected( - response: TestRunGetMetrics200Response | TestRunGetMetricsdefaultResponse -): response is TestRunGetMetricsdefaultResponse; + response: + | TestRunGetMetricDimensionValues200Response + | TestRunGetMetricDimensionValuesDefaultResponse +): response is TestRunGetMetricDimensionValuesDefaultResponse; export function isUnexpected( response: | TestRunCreateOrUpdateAppComponent200Response | TestRunCreateOrUpdateAppComponent201Response - | TestRunCreateOrUpdateAppComponentdefaultResponse -): response is TestRunCreateOrUpdateAppComponentdefaultResponse; + | TestRunCreateOrUpdateAppComponentDefaultResponse +): response is TestRunCreateOrUpdateAppComponentDefaultResponse; export function isUnexpected( - response: TestRunGetAppComponents200Response | TestRunGetAppComponentsdefaultResponse -): response is TestRunGetAppComponentsdefaultResponse; + response: TestRunGetAppComponents200Response | TestRunGetAppComponentsDefaultResponse +): response is TestRunGetAppComponentsDefaultResponse; export function isUnexpected( response: | TestRunCreateOrUpdateServerMetricsConfig200Response | TestRunCreateOrUpdateServerMetricsConfig201Response - | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse -): response is TestRunCreateOrUpdateServerMetricsConfigdefaultResponse; + | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse +): response is TestRunCreateOrUpdateServerMetricsConfigDefaultResponse; export function isUnexpected( - response: TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigdefaultResponse -): response is TestRunGetServerMetricsConfigdefaultResponse; + response: TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigDefaultResponse +): response is TestRunGetServerMetricsConfigDefaultResponse; export function isUnexpected( response: - | LoadTestAdministrationCreateOrUpdateTest200Response - | LoadTestAdministrationCreateOrUpdateTest201Response - | LoadTestAdministrationCreateOrUpdateTestdefaultResponse - | LoadTestAdministrationDeleteTest204Response - | LoadTestAdministrationDeleteTestdefaultResponse - | LoadTestAdministrationGetTest200Response - | LoadTestAdministrationGetTestdefaultResponse - | LoadTestAdministrationListTests200Response - | LoadTestAdministrationListTestsdefaultResponse - | LoadTestAdministrationUploadFile201Response - | LoadTestAdministrationUploadFiledefaultResponse - | LoadTestAdministrationGetFile200Response - | LoadTestAdministrationGetFiledefaultResponse - | LoadTestAdministrationDeleteFile204Response - | LoadTestAdministrationDeleteFiledefaultResponse - | LoadTestAdministrationListFilesTest200Response - | LoadTestAdministrationListFilesTestdefaultResponse - | LoadTestAdministrationCreateOrUpdateAppComponentTest200Response - | LoadTestAdministrationCreateOrUpdateAppComponentTest201Response - | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse - | LoadTestAdministrationGetAppComponentsTest200Response - | LoadTestAdministrationGetAppComponentsTestdefaultResponse - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse - | LoadTestAdministrationGetServerMetricsConfigTest200Response - | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse + | TestCreateOrUpdate200Response + | TestCreateOrUpdate201Response + | TestCreateOrUpdateDefaultResponse + | TestDelete204Response + | TestDeleteDefaultResponse + | TestGet200Response + | TestGetDefaultResponse + | TestList200Response + | TestListDefaultResponse + | TestUploadFile201Response + | TestUploadFileDefaultResponse + | TestGetFile200Response + | TestGetFileDefaultResponse + | TestDeleteFile204Response + | TestDeleteFileDefaultResponse + | TestListFiles200Response + | TestListFilesDefaultResponse + | TestCreateOrUpdateAppComponent200Response + | TestCreateOrUpdateAppComponent201Response + | TestCreateOrUpdateAppComponentDefaultResponse + | TestGetAppComponents200Response + | TestGetAppComponentsDefaultResponse + | TestCreateOrUpdateServerMetricsConfig200Response + | TestCreateOrUpdateServerMetricsConfig201Response + | TestCreateOrUpdateServerMetricsConfigDefaultResponse + | TestGetServerMetricsConfig200Response + | TestGetServerMetricsConfigDefaultResponse | TestRunDelete204Response - | TestRunDeletedefaultResponse + | TestRunDeleteDefaultResponse | TestRunCreateOrUpdate200Response - | TestRunCreateOrUpdatedefaultResponse + | TestRunCreateOrUpdate201Response + | TestRunCreateOrUpdateDefaultResponse | TestRunGet200Response - | TestRunGetdefaultResponse + | TestRunGetDefaultResponse | TestRunGetFile200Response - | TestRunGetFiledefaultResponse + | TestRunGetFileDefaultResponse | TestRunList200Response - | TestRunListdefaultResponse + | TestRunListDefaultResponse | TestRunStop200Response - | TestRunStopdefaultResponse + | TestRunStopDefaultResponse | TestRunListMetricNamespaces200Response - | TestRunListMetricNamespacesdefaultResponse + | TestRunListMetricNamespacesDefaultResponse | TestRunListMetricDefinitions200Response - | TestRunListMetricDefinitionsdefaultResponse + | TestRunListMetricDefinitionsDefaultResponse | TestRunGetMetrics200Response - | TestRunGetMetricsdefaultResponse + | TestRunGetMetricsDefaultResponse + | TestRunGetMetricDimensionValues200Response + | TestRunGetMetricDimensionValuesDefaultResponse | TestRunCreateOrUpdateAppComponent200Response | TestRunCreateOrUpdateAppComponent201Response - | TestRunCreateOrUpdateAppComponentdefaultResponse + | TestRunCreateOrUpdateAppComponentDefaultResponse | TestRunGetAppComponents200Response - | TestRunGetAppComponentsdefaultResponse + | TestRunGetAppComponentsDefaultResponse | TestRunCreateOrUpdateServerMetricsConfig200Response | TestRunCreateOrUpdateServerMetricsConfig201Response - | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse + | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse | TestRunGetServerMetricsConfig200Response - | TestRunGetServerMetricsConfigdefaultResponse + | TestRunGetServerMetricsConfigDefaultResponse ): response is - | LoadTestAdministrationCreateOrUpdateTestdefaultResponse - | LoadTestAdministrationDeleteTestdefaultResponse - | LoadTestAdministrationGetTestdefaultResponse - | LoadTestAdministrationListTestsdefaultResponse - | LoadTestAdministrationUploadFiledefaultResponse - | LoadTestAdministrationGetFiledefaultResponse - | LoadTestAdministrationDeleteFiledefaultResponse - | LoadTestAdministrationListFilesTestdefaultResponse - | LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse - | LoadTestAdministrationGetAppComponentsTestdefaultResponse - | LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse - | LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse - | TestRunDeletedefaultResponse - | TestRunCreateOrUpdatedefaultResponse - | TestRunGetdefaultResponse - | TestRunGetFiledefaultResponse - | TestRunListdefaultResponse - | TestRunStopdefaultResponse - | TestRunListMetricNamespacesdefaultResponse - | TestRunListMetricDefinitionsdefaultResponse - | TestRunGetMetricsdefaultResponse - | TestRunCreateOrUpdateAppComponentdefaultResponse - | TestRunGetAppComponentsdefaultResponse - | TestRunCreateOrUpdateServerMetricsConfigdefaultResponse - | TestRunGetServerMetricsConfigdefaultResponse { + | TestCreateOrUpdateDefaultResponse + | TestDeleteDefaultResponse + | TestGetDefaultResponse + | TestListDefaultResponse + | TestUploadFileDefaultResponse + | TestGetFileDefaultResponse + | TestDeleteFileDefaultResponse + | TestListFilesDefaultResponse + | TestCreateOrUpdateAppComponentDefaultResponse + | TestGetAppComponentsDefaultResponse + | TestCreateOrUpdateServerMetricsConfigDefaultResponse + | TestGetServerMetricsConfigDefaultResponse + | TestRunDeleteDefaultResponse + | TestRunCreateOrUpdateDefaultResponse + | TestRunGetDefaultResponse + | TestRunGetFileDefaultResponse + | TestRunListDefaultResponse + | TestRunStopDefaultResponse + | TestRunListMetricNamespacesDefaultResponse + | TestRunListMetricDefinitionsDefaultResponse + | TestRunGetMetricsDefaultResponse + | TestRunGetMetricDimensionValuesDefaultResponse + | TestRunCreateOrUpdateAppComponentDefaultResponse + | TestRunGetAppComponentsDefaultResponse + | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse + | TestRunGetServerMetricsConfigDefaultResponse { const lroOriginal = response.headers["x-ms-original-url"]; const url = new URL(lroOriginal ?? response.request.url); const method = response.request.method; let pathDetails = responseMap[`${method} ${url.pathname}`]; if (!pathDetails) { - pathDetails = geParametrizedPathSuccess(url.pathname); + pathDetails = geParametrizedPathSuccess(method, url.pathname); } return !pathDetails.includes(response.status); } -function geParametrizedPathSuccess(path: string): string[] { +function geParametrizedPathSuccess(method: string, path: string): string[] { const pathParts = path.split("/"); // Iterate the responseMap to find a match for (const [key, value] of Object.entries(responseMap)) { // Extracting the path from the map key which is in format // GET /path/foo + if (!key.startsWith(method)) { + continue; + } const candidatePath = getPathFromMapKey(key); // Get each part of the url path const candidateParts = candidatePath.split("/"); @@ -301,7 +306,7 @@ function geParametrizedPathSuccess(path: string): string[] { // track if we have found a match to return the values found. let found = true; for (let i = 0; i < candidateParts.length; i++) { - if (candidateParts[i].startsWith("{") && candidateParts[i].endsWith("}")) { + if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.endsWith("}")) { // If the current part of the candidate is a "template" part // it is a match with the actual path part on hand // skip as the parameterized part can match anything diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 91e7056a3ef9..8cda6147fbba 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +/** Load test model */ export interface Test { /** Pass fail criteria for a test. */ passFailCriteria?: PassFailCriteria; @@ -36,14 +37,16 @@ export interface Test { lastModifiedBy?: string; } +/** Pass fail criteria for a test. */ export interface PassFailCriteria { /** Map of id and pass fail metrics { id : pass fail metrics }. */ passFailMetrics?: Record; } +/** Pass fail metric */ export interface PassFailMetric { /** The client metric on which the criteria should be applied. */ - clientmetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; + clientMetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests */ aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; /** The comparison operator. Supported types ‘>’, ‘<’ */ @@ -60,6 +63,7 @@ export interface PassFailMetric { result?: "passed" | "undetermined" | "failed"; } +/** Secret */ export interface Secret { /** The value of the secret for the respective type */ value?: string; @@ -67,6 +71,7 @@ export interface Secret { type?: "AKV_SECRET_URI" | "SECRET_VALUE"; } +/** Certificates metadata */ export interface CertificateMetadata { /** The value of the certificate for respective type */ value?: string; @@ -76,6 +81,7 @@ export interface CertificateMetadata { name?: string; } +/** The load test configuration. */ export interface LoadTestConfiguration { /** The number of engine instances to execute load test. Supported values are in range of 1-45. Required for creating a new test. */ engineInstances?: number; @@ -87,17 +93,19 @@ export interface LoadTestConfiguration { optionalLoadTestConfig?: OptionalLoadTestConfig; } +/** Optional load test config */ export interface OptionalLoadTestConfig { /** Test URL. Provide the complete HTTP URL. For example, http://contoso-app.azurewebsites.net/login */ endpointUrl?: string; /** No of concurrent virtual users */ - vusers?: number; + virtualUsers?: number; /** Ramp up time */ rampUpTime?: number; /** Test run duration */ duration?: number; } +/** The input artifacts for the test. */ export interface TestInputArtifacts { /** File info */ configFileInfo?: FileInfo; @@ -111,11 +119,10 @@ export interface TestInputArtifacts { additionalFileInfo?: Array; } +/** File info */ export interface FileInfo { /** File URL. */ url?: string; - /** Unique name for test file. */ - fileId?: string; /** Name of the file. */ filename?: string; /** File type */ @@ -131,6 +138,7 @@ export interface FileInfo { | "VALIDATION_NOT_REQUIRED"; } +/** Test app component */ export interface TestAppComponents { /** Test identifier */ testId?: string; @@ -146,6 +154,7 @@ export interface TestAppComponents { lastModifiedBy?: string; } +/** An Azure resource object (Refer azure generic resource model : https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) */ export interface AppComponent { /** fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} */ resourceId?: string; @@ -163,6 +172,7 @@ export interface AppComponent { kind?: string; } +/** Test server metric configuration */ export interface TestServerMetricConfig { /** Test identifier */ testId?: string; @@ -178,6 +188,7 @@ export interface TestServerMetricConfig { lastModifiedBy?: string; } +/** Associated metric definition for particular metrics of the azure resource ( Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition). */ export interface ResourceMetric { /** Unique name for metric. */ id?: string; @@ -187,8 +198,8 @@ export interface ResourceMetric { metricNamespace: string; /** Metric description. */ displayDescription?: string; - /** The localizable string class. */ - name: LocalizableString; + /** The invariant value of metric name */ + name: string; /** Metric aggregation. */ aggregation: string; /** Metric unit. */ @@ -197,13 +208,7 @@ export interface ResourceMetric { resourceType: string; } -export interface LocalizableString { - /** The locale specific value. */ - localizedValue?: string; - /** The invariant value. */ - value?: string; -} - +/** Load test run model */ export interface TestRun { /** Pass fail criteria for a test. */ passFailCriteria?: PassFailCriteria; @@ -256,7 +261,7 @@ export interface TestRun { /** Test run initiated time. */ executedDateTime?: Date | string; /** Number of virtual users, for which test has been run. */ - vusers?: number; + virtualUsers?: number; /** Portal url. */ portalUrl?: string; /** Test run duration in milliseconds. */ @@ -273,11 +278,13 @@ export interface TestRun { lastModifiedBy?: string; } +/** Error details if there is any failure in load test run */ export interface ErrorDetails { /** Error details in case test run was not successfully run. */ message?: string; } +/** Test run statistics. */ export interface TestRunStatistics { /** Transaction name. */ transaction?: string; @@ -309,6 +316,7 @@ export interface TestRunStatistics { sentKBytesPerSec?: number; } +/** Collection of test run artifacts */ export interface TestRunArtifacts { /** The input artifacts for the test run. */ inputArtifacts?: TestRunInputArtifacts; @@ -316,6 +324,7 @@ export interface TestRunArtifacts { outputArtifacts?: TestRunOutputArtifacts; } +/** The input artifacts for the test run. */ export interface TestRunInputArtifacts { /** File info */ configFileInfo?: FileInfo; @@ -329,6 +338,7 @@ export interface TestRunInputArtifacts { additionalFileInfo?: Array; } +/** The output artifacts for the test run. */ export interface TestRunOutputArtifacts { /** File info */ resultUrl?: FileInfo; @@ -336,18 +346,21 @@ export interface TestRunOutputArtifacts { logsUrl?: FileInfo; } +/** Filters to fetch the set of metric */ export interface MetricRequestPayload { - /** The MetadataFilter is used to reduce the set of metric data returned. Example: Metric contains metadata like SamplerName, Error. To retrieve all the time series data where SamplerName is equals to HTTPRequest1 or HTTPRequest2, the MetadataFilter value will be {"SamplerName", ["HTTPRequest1", "HTTPRequest2"} */ - filters?: Array; + /** Get metrics for specific dimension values. Example: Metric contains dimension like SamplerName, Error. To retrieve all the time series data where SamplerName is equals to HTTPRequest1 or HTTPRequest2, the DimensionFilter value will be {"SamplerName", ["HTTPRequest1", "HTTPRequest2"} */ + filters?: Array; } -export interface MetadataFilter { - /** The invariant metadata name */ +/** Dimension name and values to filter */ +export interface DimensionFilter { + /** The dimension name */ name?: string; - /** The metadata values. Maximum values can be 20. */ + /** The dimension values. Maximum values can be 20. */ values?: Array; } +/** Test run app component */ export interface TestRunAppComponents { /** Test run identifier */ testRunId?: string; @@ -363,6 +376,7 @@ export interface TestRunAppComponents { lastModifiedBy?: string; } +/** Test run server metric configuration */ export interface TestRunServerMetricConfig { /** Test run identifier */ testRunId?: string; diff --git a/sdk/loadtestservice/load-testing-rest/src/outputModels.ts b/sdk/loadtestservice/load-testing-rest/src/outputModels.ts index 5624b4a36798..d225da909090 100644 --- a/sdk/loadtestservice/load-testing-rest/src/outputModels.ts +++ b/sdk/loadtestservice/load-testing-rest/src/outputModels.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +/** Load test model */ export interface TestOutput { /** Pass fail criteria for a test. */ passFailCriteria?: PassFailCriteriaOutput; @@ -36,14 +37,16 @@ export interface TestOutput { lastModifiedBy?: string; } +/** Pass fail criteria for a test. */ export interface PassFailCriteriaOutput { /** Map of id and pass fail metrics { id : pass fail metrics }. */ passFailMetrics?: Record; } +/** Pass fail metric */ export interface PassFailMetricOutput { /** The client metric on which the criteria should be applied. */ - clientmetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; + clientMetric?: "response_time_ms" | "latency" | "error" | "requests" | "requests_per_sec"; /** The aggregation function to be applied on the client metric. Allowed functions - ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, ‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, ‘count’ - for requests */ aggregate?: "count" | "percentage" | "avg" | "p50" | "p90" | "p95" | "p99" | "min" | "max"; /** The comparison operator. Supported types ‘>’, ‘<’ */ @@ -60,6 +63,7 @@ export interface PassFailMetricOutput { result?: "passed" | "undetermined" | "failed"; } +/** Secret */ export interface SecretOutput { /** The value of the secret for the respective type */ value?: string; @@ -67,6 +71,7 @@ export interface SecretOutput { type?: "AKV_SECRET_URI" | "SECRET_VALUE"; } +/** Certificates metadata */ export interface CertificateMetadataOutput { /** The value of the certificate for respective type */ value?: string; @@ -76,6 +81,7 @@ export interface CertificateMetadataOutput { name?: string; } +/** The load test configuration. */ export interface LoadTestConfigurationOutput { /** The number of engine instances to execute load test. Supported values are in range of 1-45. Required for creating a new test. */ engineInstances?: number; @@ -87,17 +93,19 @@ export interface LoadTestConfigurationOutput { optionalLoadTestConfig?: OptionalLoadTestConfigOutput; } +/** Optional load test config */ export interface OptionalLoadTestConfigOutput { /** Test URL. Provide the complete HTTP URL. For example, http://contoso-app.azurewebsites.net/login */ endpointUrl?: string; /** No of concurrent virtual users */ - vusers?: number; + virtualUsers?: number; /** Ramp up time */ rampUpTime?: number; /** Test run duration */ duration?: number; } +/** The input artifacts for the test. */ export interface TestInputArtifactsOutput { /** File info */ configFileInfo?: FileInfoOutput; @@ -111,11 +119,10 @@ export interface TestInputArtifactsOutput { additionalFileInfo?: Array; } +/** File info */ export interface FileInfoOutput { /** File URL. */ url?: string; - /** Unique name for test file. */ - fileId?: string; /** Name of the file. */ filename?: string; /** File type */ @@ -131,11 +138,13 @@ export interface FileInfoOutput { | "VALIDATION_NOT_REQUIRED"; } +/** The definition of an error object. */ export interface ErrorResponseBodyOutput { /** Error from a REST request. */ error: ErrorModelOutput; } +/** Error from a REST request. */ export interface ErrorModelOutput { /** The error code. */ code: string; @@ -147,6 +156,7 @@ export interface ErrorModelOutput { details?: Array; } +/** Collection of tests */ export interface TestsListOutput { /** List of tests */ value: Array; @@ -154,6 +164,7 @@ export interface TestsListOutput { nextLink?: string; } +/** Collection of files. */ export interface FileInfoListOutput { /** List of file info. */ value: Array; @@ -161,6 +172,7 @@ export interface FileInfoListOutput { nextLink?: string; } +/** Test app component */ export interface TestAppComponentsOutput { /** Test identifier */ testId?: string; @@ -176,6 +188,7 @@ export interface TestAppComponentsOutput { lastModifiedBy?: string; } +/** An Azure resource object (Refer azure generic resource model : https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id#genericresource) */ export interface AppComponentOutput { /** fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName} */ resourceId?: string; @@ -193,6 +206,7 @@ export interface AppComponentOutput { kind?: string; } +/** Test server metric configuration */ export interface TestServerMetricConfigOutput { /** Test identifier */ testId?: string; @@ -208,6 +222,7 @@ export interface TestServerMetricConfigOutput { lastModifiedBy?: string; } +/** Associated metric definition for particular metrics of the azure resource ( Refer : https://docs.microsoft.com/en-us/rest/api/monitor/metric-definitions/list#metricdefinition). */ export interface ResourceMetricOutput { /** Unique name for metric. */ id?: string; @@ -217,8 +232,8 @@ export interface ResourceMetricOutput { metricNamespace: string; /** Metric description. */ displayDescription?: string; - /** The localizable string class. */ - name: LocalizableStringOutput; + /** The invariant value of metric name */ + name: string; /** Metric aggregation. */ aggregation: string; /** Metric unit. */ @@ -227,13 +242,7 @@ export interface ResourceMetricOutput { resourceType: string; } -export interface LocalizableStringOutput { - /** The locale specific value. */ - localizedValue?: string; - /** The invariant value. */ - value?: string; -} - +/** Load test run model */ export interface TestRunOutput { /** Pass fail criteria for a test. */ passFailCriteria?: PassFailCriteriaOutput; @@ -286,7 +295,7 @@ export interface TestRunOutput { /** Test run initiated time. */ executedDateTime?: string; /** Number of virtual users, for which test has been run. */ - vusers?: number; + virtualUsers?: number; /** Portal url. */ portalUrl?: string; /** Test run duration in milliseconds. */ @@ -303,11 +312,13 @@ export interface TestRunOutput { lastModifiedBy?: string; } +/** Error details if there is any failure in load test run */ export interface ErrorDetailsOutput { /** Error details in case test run was not successfully run. */ message?: string; } +/** Test run statistics. */ export interface TestRunStatisticsOutput { /** Transaction name. */ transaction?: string; @@ -339,6 +350,7 @@ export interface TestRunStatisticsOutput { sentKBytesPerSec?: number; } +/** Collection of test run artifacts */ export interface TestRunArtifactsOutput { /** The input artifacts for the test run. */ inputArtifacts?: TestRunInputArtifactsOutput; @@ -346,6 +358,7 @@ export interface TestRunArtifactsOutput { outputArtifacts?: TestRunOutputArtifactsOutput; } +/** The input artifacts for the test run. */ export interface TestRunInputArtifactsOutput { /** File info */ configFileInfo?: FileInfoOutput; @@ -359,6 +372,7 @@ export interface TestRunInputArtifactsOutput { additionalFileInfo?: Array; } +/** The output artifacts for the test run. */ export interface TestRunOutputArtifactsOutput { /** File info */ resultUrl?: FileInfoOutput; @@ -366,6 +380,7 @@ export interface TestRunOutputArtifactsOutput { logsUrl?: FileInfoOutput; } +/** Collection of test runs */ export interface TestRunsListOutput { /** List of test runs */ value: Array; @@ -373,44 +388,46 @@ export interface TestRunsListOutput { nextLink?: string; } +/** Represents collection of metric namespaces. */ export interface MetricNamespaceCollectionOutput { /** The values for the metric namespaces. */ value: Array; } +/** Metric namespace class specifies the metadata for a metric namespace. */ export interface MetricNamespaceOutput { - /** The escaped name of the namespace. */ + /** The namespace description. */ + description?: string; + /** The metric namespace name. */ name?: string; - /** The fully qualified metric namespace name. */ - metricNamespaceName?: string; } +/** Represents collection of metric definitions. */ export interface MetricDefinitionCollectionOutput { /** the values for the metric definitions. */ value: Array; } +/** Metric definition */ export interface MetricDefinitionOutput { - /** The name and the display name of the dimension, i.e. it is a localizable string. */ - dimensions?: Array; - /** Detailed description of this metric. */ - displayDescription?: string; - /** The localizable string class. */ - name?: LocalizableStringOutput; + /** List of dimensions */ + dimensions?: Array; + /** The metric description */ + description?: string; + /** The metric name */ + name?: string; /** The namespace the metric belongs to. */ namespace?: string; - /** the primary aggregation type value defining how to use the values for display. */ + /** The primary aggregation type value defining how to use the values for display. */ primaryAggregationType?: | "Average" | "Count" - | "Minimum" - | "Maximum" | "None" | "Total" | "Percentile90" | "Percentile95" | "Percentile99"; - /** the collection of what aggregation types are supported. */ + /** The collection of what all aggregation types are supported. */ supportedAggregationTypes?: Array; /** The unit of the metric. */ unit?: @@ -422,80 +439,65 @@ export interface MetricDefinitionOutput { | "Bytes" | "BytesPerSecond" | "CountPerSecond"; - /** Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. */ + /** Metric availability specifies the time grain (aggregation interval or frequency). */ metricAvailabilities?: Array; } +/** The name and description */ +export interface NameAndDescOutput { + /** The description */ + description?: string; + /** The name */ + name?: string; +} + +/** Metric availability specifies the time grain (aggregation interval or frequency) */ export interface MetricAvailabilityOutput { /** The time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'PT1H', etc. */ timeGrain?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; } -export interface ResponseOutput { - /** Test run identifier */ - testRunId?: string; - /** The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. */ - interval?: string; - /** The namespace of the metrics being queried. */ - namespace?: string; - /** The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. */ - timespan?: string; - /** The result data of a query. */ - value?: MetricOutput; -} - -export interface MetricOutput { - /** The localizable string class. */ - name?: LocalizableStringOutput; - /** The time series returned when a data query is performed. */ +/** The response to a metrics query. */ +export interface MetricsOutput { + /** Timeseries data for metric query. */ timeseries?: Array; - /** The unit of the metric. */ - unit?: - | "NotSpecified" - | "Percent" - | "Count" - | "Seconds" - | "Milliseconds" - | "Bytes" - | "BytesPerSecond" - | "CountPerSecond"; + /** Link for the next set of timeseries in case of paginated results, if applicable */ + nextLink?: string; } +/** The time series returned when a data query is performed. */ export interface TimeSeriesElementOutput { - /** An array of data points representing the metric values. This is only returned if a result type of "Data" is specified. */ + /** An array of data points representing the metric values. */ data?: Array; - /** The metadata values */ - metadatavalues?: Array; + /** The dimension values */ + dimensionValues?: Array; } +/** Represents a metric value. */ export interface MetricValueOutput { - /** The average value in the time range. */ - average?: number; - /** The number of samples in the time range. Can be used to determine the number of values that contributed to the average value. */ - count?: number; - /** The greatest value in the time range. */ - maximum?: number; - /** The least value in the time range. */ - minimum?: number; /** The timestamp for the metric value in ISO 8601 format. */ - timeStamp?: string; - /** The sum of all of the values in the time range. */ - total?: number; - /** 90th percentile value in the time range. */ - percentile90?: number; - /** 95th percentile value in the time range. */ - percentile95?: number; - /** 99th percentile value in the time range. */ - percentile99?: number; -} - -export interface MetadataValueOutput { - /** The localizable string class. */ - name?: LocalizableStringOutput; - /** The value of the metadata. */ + timestamp?: string; + /** The metric value. */ + value?: number; +} + +/** Represents a metric dimension value. */ +export interface DimensionValueOutput { + /** The name of the dimension. */ + name?: string; + /** The value of the dimension. */ value?: string; } +/** Metrics dimension values. */ +export interface DimensionValueListOutput { + /** The dimension values */ + value?: Array; + /** Link for the next set of values in case of paginated results, if applicable */ + nextLink?: string; +} + +/** Test run app component */ export interface TestRunAppComponentsOutput { /** Test run identifier */ testRunId?: string; @@ -511,6 +513,7 @@ export interface TestRunAppComponentsOutput { lastModifiedBy?: string; } +/** Test run server metric configuration */ export interface TestRunServerMetricConfigOutput { /** Test run identifier */ testRunId?: string; diff --git a/sdk/loadtestservice/load-testing-rest/src/parameters.ts b/sdk/loadtestservice/load-testing-rest/src/parameters.ts index ca132584acc2..8deefade619a 100644 --- a/sdk/loadtestservice/load-testing-rest/src/parameters.ts +++ b/sdk/loadtestservice/load-testing-rest/src/parameters.ts @@ -12,26 +12,26 @@ import { TestRunServerMetricConfig, } from "./models"; -export interface LoadTestAdministrationCreateOrUpdateTestBodyParam { +export interface TestCreateOrUpdateBodyParam { /** Load test model */ body: Test; } -export interface LoadTestAdministrationCreateOrUpdateTestMediaTypesParam { +export interface TestCreateOrUpdateMediaTypesParam { /** Request content type */ contentType?: "application/merge-patch+json"; } -export type LoadTestAdministrationCreateOrUpdateTestParameters = LoadTestAdministrationCreateOrUpdateTestMediaTypesParam & - LoadTestAdministrationCreateOrUpdateTestBodyParam & +export type TestCreateOrUpdateParameters = TestCreateOrUpdateMediaTypesParam & + TestCreateOrUpdateBodyParam & RequestParameters; -export type LoadTestAdministrationDeleteTestParameters = RequestParameters; -export type LoadTestAdministrationGetTestParameters = RequestParameters; +export type TestDeleteParameters = RequestParameters; +export type TestGetParameters = RequestParameters; -export interface LoadTestAdministrationListTestsQueryParamProperties { - /** Sort on one of the field - lastModifiedDateTime, displayName, createdBy in (field asc/desc) format. eg: displayName asc. */ +export interface TestListQueryParamProperties { + /** Sort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime */ orderby?: string; - /** Filter search based on searchable fields - testId, createdBy. */ + /** Prefix based, case sensitive search on searchable fields - testId, createdBy. */ search?: string; /** Start DateTime(ISO 8601 literal format) of the last updated time range to filter tests. */ lastModifiedStartTime?: Date | string; @@ -43,88 +43,82 @@ export interface LoadTestAdministrationListTestsQueryParamProperties { maxpagesize?: number; } -export interface LoadTestAdministrationListTestsQueryParam { - queryParameters?: LoadTestAdministrationListTestsQueryParamProperties; +export interface TestListQueryParam { + queryParameters?: TestListQueryParamProperties; } -export type LoadTestAdministrationListTestsParameters = LoadTestAdministrationListTestsQueryParam & - RequestParameters; - -export interface LoadTestAdministrationUploadFileBodyParam { - body: LoadTestAdministrationUploadFileFormBody; -} +export type TestListParameters = TestListQueryParam & RequestParameters; -export interface LoadTestAdministrationUploadFileFormBody { +export interface TestUploadFileBodyParam { /** - * The file to be uploaded as multipart form-data. + * The file content as application/octet-stream. * * Value may contain any sequence of octets */ - file: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; + body: string | Uint8Array | ReadableStream | NodeJS.ReadableStream; } -export interface LoadTestAdministrationUploadFileQueryParamProperties { +export interface TestUploadFileQueryParamProperties { /** File type */ fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; } -export interface LoadTestAdministrationUploadFileQueryParam { - queryParameters?: LoadTestAdministrationUploadFileQueryParamProperties; +export interface TestUploadFileQueryParam { + queryParameters?: TestUploadFileQueryParamProperties; } -export interface LoadTestAdministrationUploadFileMediaTypesParam { +export interface TestUploadFileMediaTypesParam { /** Request content type */ - contentType?: "multipart/form-data"; + contentType?: "application/octet-stream"; } -export type LoadTestAdministrationUploadFileParameters = LoadTestAdministrationUploadFileQueryParam & - LoadTestAdministrationUploadFileMediaTypesParam & - LoadTestAdministrationUploadFileBodyParam & +export type TestUploadFileParameters = TestUploadFileQueryParam & + TestUploadFileMediaTypesParam & + TestUploadFileBodyParam & RequestParameters; -export type LoadTestAdministrationGetFileParameters = RequestParameters; -export type LoadTestAdministrationDeleteFileParameters = RequestParameters; +export type TestGetFileParameters = RequestParameters; +export type TestDeleteFileParameters = RequestParameters; -export interface LoadTestAdministrationListFilesTestQueryParamProperties { +export interface TestListFilesQueryParamProperties { /** Continuation token to get the next page of response */ continuationToken?: string; } -export interface LoadTestAdministrationListFilesTestQueryParam { - queryParameters?: LoadTestAdministrationListFilesTestQueryParamProperties; +export interface TestListFilesQueryParam { + queryParameters?: TestListFilesQueryParamProperties; } -export type LoadTestAdministrationListFilesTestParameters = LoadTestAdministrationListFilesTestQueryParam & - RequestParameters; +export type TestListFilesParameters = TestListFilesQueryParam & RequestParameters; -export interface LoadTestAdministrationCreateOrUpdateAppComponentTestBodyParam { +export interface TestCreateOrUpdateAppComponentBodyParam { /** App Component model. */ body: TestAppComponents; } -export interface LoadTestAdministrationCreateOrUpdateAppComponentTestMediaTypesParam { +export interface TestCreateOrUpdateAppComponentMediaTypesParam { /** Request content type */ contentType?: "application/merge-patch+json"; } -export type LoadTestAdministrationCreateOrUpdateAppComponentTestParameters = LoadTestAdministrationCreateOrUpdateAppComponentTestMediaTypesParam & - LoadTestAdministrationCreateOrUpdateAppComponentTestBodyParam & +export type TestCreateOrUpdateAppComponentParameters = TestCreateOrUpdateAppComponentMediaTypesParam & + TestCreateOrUpdateAppComponentBodyParam & RequestParameters; -export type LoadTestAdministrationGetAppComponentsTestParameters = RequestParameters; +export type TestGetAppComponentsParameters = RequestParameters; -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestBodyParam { +export interface TestCreateOrUpdateServerMetricsConfigBodyParam { /** Server metric configuration model. */ body: TestServerMetricConfig; } -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestMediaTypesParam { +export interface TestCreateOrUpdateServerMetricsConfigMediaTypesParam { /** Request content type */ contentType?: "application/merge-patch+json"; } -export type LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestParameters = LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestMediaTypesParam & - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestBodyParam & +export type TestCreateOrUpdateServerMetricsConfigParameters = TestCreateOrUpdateServerMetricsConfigMediaTypesParam & + TestCreateOrUpdateServerMetricsConfigBodyParam & RequestParameters; -export type LoadTestAdministrationGetServerMetricsConfigTestParameters = RequestParameters; +export type TestGetServerMetricsConfigParameters = RequestParameters; export type TestRunDeleteParameters = RequestParameters; export interface TestRunCreateOrUpdateBodyParam { @@ -154,11 +148,11 @@ export type TestRunGetParameters = RequestParameters; export type TestRunGetFileParameters = RequestParameters; export interface TestRunListQueryParamProperties { - /** Sort on one of the field - status, displayName, executedDateTime in (field asc/desc) format. eg: displayName asc. */ + /** Sort on the supported fields in (field asc/desc) format. eg: executedDateTime asc. Supported fields - executedDateTime */ orderby?: string; /** Continuation token to get the next page of response */ continuationToken?: string; - /** Filter search based on searchable fields - description, executedUser. */ + /** Prefix based, case sensitive search on searchable fields - description, executedUser. */ search?: string; /** Unique name of an existing load test. */ testId?: string; @@ -193,12 +187,12 @@ export type TestRunListMetricDefinitionsParameters = TestRunListMetricDefinition RequestParameters; export interface TestRunGetMetricsBodyParam { - /** Metric metadata filter to fetch the set of metric */ + /** Metric dimension filter */ body?: MetricRequestPayload; } export interface TestRunGetMetricsQueryParamProperties { - /** The list of aggregation types (comma separated) to retrieve. */ + /** The aggregation */ aggregation?: string; /** The interval (i.e. timegrain) of the query. */ interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; @@ -206,8 +200,6 @@ export interface TestRunGetMetricsQueryParamProperties { metricname: string; /** Metric namespace to query metric definitions for. */ metricNamespace: string; - /** Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. */ - resultType: "Data" | "Metadata"; /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */ timespan: string; } @@ -226,6 +218,24 @@ export type TestRunGetMetricsParameters = TestRunGetMetricsQueryParam & TestRunGetMetricsBodyParam & RequestParameters; +export interface TestRunGetMetricDimensionValuesQueryParamProperties { + /** The interval (i.e. timegrain) of the query. */ + interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; + /** Metric name */ + metricname: string; + /** Metric namespace to query metric definitions for. */ + metricNamespace: string; + /** The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. */ + timespan: string; +} + +export interface TestRunGetMetricDimensionValuesQueryParam { + queryParameters: TestRunGetMetricDimensionValuesQueryParamProperties; +} + +export type TestRunGetMetricDimensionValuesParameters = TestRunGetMetricDimensionValuesQueryParam & + RequestParameters; + export interface TestRunCreateOrUpdateAppComponentBodyParam { /** App Component model. */ body: TestRunAppComponents; diff --git a/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts deleted file mode 100644 index 7e1e7cdff70c..000000000000 --- a/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Client, HttpResponse } from "@azure-rest/core-client"; -import { - LongRunningOperation, - LroEngine, - LroEngineOptions, - LroResponse, - PollerLike, - PollOperationState, -} from "@azure/core-lro"; - -/** - * Helper function that builds a Poller object to help polling a long running operation. - * @param client - Client to use for sending the request to get additional pages. - * @param initialResponse - The initial response. - * @param options - Options to set a resume state or custom polling interval. - * @returns - A poller object to poll for operation state updates and eventually get the final response. - */ -export function getLongRunningPoller( - client: Client, - initialResponse: TResult, - options: LroEngineOptions> = {} -): PollerLike, TResult> { - const poller: LongRunningOperation = { - requestMethod: initialResponse.request.method, - // Override this so we can poll on requests sent while recording - requestPath: - initialResponse.request.headers.get("x-recording-upstream-base-uri") ?? - initialResponse.request.url, - sendInitialRequest: async () => { - // In the case of Rest Clients we are building the LRO poller object from a response that's the reason - // we are not triggering the initial request here, just extracting the information from the - // response we were provided. - return getLroResponse(initialResponse); - }, - sendPollRequest: async (path) => { - // This is the callback that is going to be called to poll the service - // to get the latest status. We use the client provided and the polling path - // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location - // depending on the lro pattern that the service implements. If non is provided we default to the initial path. - const response = await client.pathUnchecked(path ?? initialResponse.request.url).get(); - const lroResponse = getLroResponse(response as TResult); - lroResponse.rawResponse.headers["x-ms-original-url"] = initialResponse.request.url; - return lroResponse; - }, - }; - - return new LroEngine(poller, options); -} - -/** - * Converts a Rest Client response to a response that the LRO engine knows about - * @param response - a rest client http response - * @returns - An LRO response that the LRO engine can work with - */ -function getLroResponse(response: TResult): LroResponse { - if (Number.isNaN(response.status)) { - throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`); - } - - return { - flatResponse: response, - rawResponse: { - ...response, - statusCode: Number.parseInt(response.status), - body: response.body, - }, - }; -} diff --git a/sdk/loadtestservice/load-testing-rest/src/responses.ts b/sdk/loadtestservice/load-testing-rest/src/responses.ts index f79716a8c8ee..354fe5f35e60 100644 --- a/sdk/loadtestservice/load-testing-rest/src/responses.ts +++ b/sdk/loadtestservice/load-testing-rest/src/responses.ts @@ -15,251 +15,244 @@ import { TestRunsListOutput, MetricNamespaceCollectionOutput, MetricDefinitionCollectionOutput, - ResponseOutput, + MetricsOutput, + DimensionValueListOutput, TestRunAppComponentsOutput, TestRunServerMetricConfigOutput, } from "./outputModels"; /** Create a new test or update an existing test. */ -export interface LoadTestAdministrationCreateOrUpdateTest200Response extends HttpResponse { +export interface TestCreateOrUpdate200Response extends HttpResponse { status: "200"; body: TestOutput; } /** Create a new test or update an existing test. */ -export interface LoadTestAdministrationCreateOrUpdateTest201Response extends HttpResponse { +export interface TestCreateOrUpdate201Response extends HttpResponse { status: "201"; body: TestOutput; } -export interface LoadTestAdministrationCreateOrUpdateTestdefaultHeaders { +export interface TestCreateOrUpdateDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Create a new test or update an existing test. */ -export interface LoadTestAdministrationCreateOrUpdateTestdefaultResponse extends HttpResponse { +export interface TestCreateOrUpdateDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateTestdefaultHeaders; + headers: RawHttpHeaders & TestCreateOrUpdateDefaultHeaders; } /** Delete a test by its name. */ -export interface LoadTestAdministrationDeleteTest204Response extends HttpResponse { +export interface TestDelete204Response extends HttpResponse { status: "204"; body: Record; } -export interface LoadTestAdministrationDeleteTestdefaultHeaders { +export interface TestDeleteDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Delete a test by its name. */ -export interface LoadTestAdministrationDeleteTestdefaultResponse extends HttpResponse { +export interface TestDeleteDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationDeleteTestdefaultHeaders; + headers: RawHttpHeaders & TestDeleteDefaultHeaders; } /** Get load test details by test name */ -export interface LoadTestAdministrationGetTest200Response extends HttpResponse { +export interface TestGet200Response extends HttpResponse { status: "200"; body: TestOutput; } -export interface LoadTestAdministrationGetTestdefaultHeaders { +export interface TestGetDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get load test details by test name */ -export interface LoadTestAdministrationGetTestdefaultResponse extends HttpResponse { +export interface TestGetDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationGetTestdefaultHeaders; + headers: RawHttpHeaders & TestGetDefaultHeaders; } /** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ -export interface LoadTestAdministrationListTests200Response extends HttpResponse { +export interface TestList200Response extends HttpResponse { status: "200"; body: TestsListOutput; } -export interface LoadTestAdministrationListTestsdefaultHeaders { +export interface TestListDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get all load tests by the fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}. */ -export interface LoadTestAdministrationListTestsdefaultResponse extends HttpResponse { +export interface TestListDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationListTestsdefaultHeaders; + headers: RawHttpHeaders & TestListDefaultHeaders; } -/** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ -export interface LoadTestAdministrationUploadFile201Response extends HttpResponse { +/** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as application/octet-stream. */ +export interface TestUploadFile201Response extends HttpResponse { status: "201"; body: FileInfoOutput; } -export interface LoadTestAdministrationUploadFiledefaultHeaders { +export interface TestUploadFileDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as multipart/form-data. */ -export interface LoadTestAdministrationUploadFiledefaultResponse extends HttpResponse { +/** Upload input file for a given test name. File size can't be more than 50 MB. Existing file with same name for the given test will be overwritten. File should be provided in the request body as application/octet-stream. */ +export interface TestUploadFileDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationUploadFiledefaultHeaders; + headers: RawHttpHeaders & TestUploadFileDefaultHeaders; } /** Get test file by the file name. */ -export interface LoadTestAdministrationGetFile200Response extends HttpResponse { +export interface TestGetFile200Response extends HttpResponse { status: "200"; body: FileInfoOutput; } -export interface LoadTestAdministrationGetFiledefaultHeaders { +export interface TestGetFileDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get test file by the file name. */ -export interface LoadTestAdministrationGetFiledefaultResponse extends HttpResponse { +export interface TestGetFileDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationGetFiledefaultHeaders; + headers: RawHttpHeaders & TestGetFileDefaultHeaders; } /** Delete file by the file name for a test */ -export interface LoadTestAdministrationDeleteFile204Response extends HttpResponse { +export interface TestDeleteFile204Response extends HttpResponse { status: "204"; body: Record; } -export interface LoadTestAdministrationDeleteFiledefaultHeaders { +export interface TestDeleteFileDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Delete file by the file name for a test */ -export interface LoadTestAdministrationDeleteFiledefaultResponse extends HttpResponse { +export interface TestDeleteFileDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationDeleteFiledefaultHeaders; + headers: RawHttpHeaders & TestDeleteFileDefaultHeaders; } /** Get all test files. */ -export interface LoadTestAdministrationListFilesTest200Response extends HttpResponse { +export interface TestListFiles200Response extends HttpResponse { status: "200"; body: FileInfoListOutput; } -export interface LoadTestAdministrationListFilesTestdefaultHeaders { +export interface TestListFilesDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get all test files. */ -export interface LoadTestAdministrationListFilesTestdefaultResponse extends HttpResponse { +export interface TestListFilesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationListFilesTestdefaultHeaders; + headers: RawHttpHeaders & TestListFilesDefaultHeaders; } /** Associate an app component (collection of azure resources) to a test */ -export interface LoadTestAdministrationCreateOrUpdateAppComponentTest200Response - extends HttpResponse { +export interface TestCreateOrUpdateAppComponent200Response extends HttpResponse { status: "200"; body: TestAppComponentsOutput; } /** Associate an app component (collection of azure resources) to a test */ -export interface LoadTestAdministrationCreateOrUpdateAppComponentTest201Response - extends HttpResponse { +export interface TestCreateOrUpdateAppComponent201Response extends HttpResponse { status: "201"; body: TestAppComponentsOutput; } -export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders { +export interface TestCreateOrUpdateAppComponentDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Associate an app component (collection of azure resources) to a test */ -export interface LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultResponse - extends HttpResponse { +export interface TestCreateOrUpdateAppComponentDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationCreateOrUpdateAppComponentTestdefaultHeaders; + headers: RawHttpHeaders & TestCreateOrUpdateAppComponentDefaultHeaders; } /** Get associated app component (collection of azure resources) for the given test. */ -export interface LoadTestAdministrationGetAppComponentsTest200Response extends HttpResponse { +export interface TestGetAppComponents200Response extends HttpResponse { status: "200"; body: TestAppComponentsOutput; } -export interface LoadTestAdministrationGetAppComponentsTestdefaultHeaders { +export interface TestGetAppComponentsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get associated app component (collection of azure resources) for the given test. */ -export interface LoadTestAdministrationGetAppComponentsTestdefaultResponse extends HttpResponse { +export interface TestGetAppComponentsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationGetAppComponentsTestdefaultHeaders; + headers: RawHttpHeaders & TestGetAppComponentsDefaultHeaders; } /** Configure server metrics for a test */ -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest200Response - extends HttpResponse { +export interface TestCreateOrUpdateServerMetricsConfig200Response extends HttpResponse { status: "200"; body: TestServerMetricConfigOutput; } /** Configure server metrics for a test */ -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTest201Response - extends HttpResponse { +export interface TestCreateOrUpdateServerMetricsConfig201Response extends HttpResponse { status: "201"; body: TestServerMetricConfigOutput; } -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultHeaders { +export interface TestCreateOrUpdateServerMetricsConfigDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Configure server metrics for a test */ -export interface LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultResponse - extends HttpResponse { +export interface TestCreateOrUpdateServerMetricsConfigDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & - LoadTestAdministrationCreateOrUpdateServerMetricsConfigTestdefaultHeaders; + headers: RawHttpHeaders & TestCreateOrUpdateServerMetricsConfigDefaultHeaders; } /** Get server metric configuration for the given test. */ -export interface LoadTestAdministrationGetServerMetricsConfigTest200Response extends HttpResponse { +export interface TestGetServerMetricsConfig200Response extends HttpResponse { status: "200"; body: TestServerMetricConfigOutput; } -export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders { +export interface TestGetServerMetricsConfigDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get server metric configuration for the given test. */ -export interface LoadTestAdministrationGetServerMetricsConfigTestdefaultResponse - extends HttpResponse { +export interface TestGetServerMetricsConfigDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & LoadTestAdministrationGetServerMetricsConfigTestdefaultHeaders; + headers: RawHttpHeaders & TestGetServerMetricsConfigDefaultHeaders; } /** Delete a test run by its name. */ @@ -268,16 +261,16 @@ export interface TestRunDelete204Response extends HttpResponse { body: Record; } -export interface TestRunDeletedefaultHeaders { +export interface TestRunDeleteDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Delete a test run by its name. */ -export interface TestRunDeletedefaultResponse extends HttpResponse { +export interface TestRunDeleteDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunDeletedefaultHeaders; + headers: RawHttpHeaders & TestRunDeleteDefaultHeaders; } /** Create and start a new test run with the given name. */ @@ -286,16 +279,22 @@ export interface TestRunCreateOrUpdate200Response extends HttpResponse { body: TestRunOutput; } -export interface TestRunCreateOrUpdatedefaultHeaders { +/** Create and start a new test run with the given name. */ +export interface TestRunCreateOrUpdate201Response extends HttpResponse { + status: "201"; + body: TestRunOutput; +} + +export interface TestRunCreateOrUpdateDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Create and start a new test run with the given name. */ -export interface TestRunCreateOrUpdatedefaultResponse extends HttpResponse { +export interface TestRunCreateOrUpdateDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunCreateOrUpdatedefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateDefaultHeaders; } /** Get test run details by name. */ @@ -304,16 +303,16 @@ export interface TestRunGet200Response extends HttpResponse { body: TestRunOutput; } -export interface TestRunGetdefaultHeaders { +export interface TestRunGetDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get test run details by name. */ -export interface TestRunGetdefaultResponse extends HttpResponse { +export interface TestRunGetDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetdefaultHeaders; + headers: RawHttpHeaders & TestRunGetDefaultHeaders; } /** Get test run file by file name. */ @@ -322,16 +321,16 @@ export interface TestRunGetFile200Response extends HttpResponse { body: FileInfoOutput; } -export interface TestRunGetFiledefaultHeaders { +export interface TestRunGetFileDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get test run file by file name. */ -export interface TestRunGetFiledefaultResponse extends HttpResponse { +export interface TestRunGetFileDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetFiledefaultHeaders; + headers: RawHttpHeaders & TestRunGetFileDefaultHeaders; } /** Get all test runs with given filters */ @@ -340,16 +339,16 @@ export interface TestRunList200Response extends HttpResponse { body: TestRunsListOutput; } -export interface TestRunListdefaultHeaders { +export interface TestRunListDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get all test runs with given filters */ -export interface TestRunListdefaultResponse extends HttpResponse { +export interface TestRunListDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunListdefaultHeaders; + headers: RawHttpHeaders & TestRunListDefaultHeaders; } /** Stop test run by name. */ @@ -358,16 +357,16 @@ export interface TestRunStop200Response extends HttpResponse { body: TestRunOutput; } -export interface TestRunStopdefaultHeaders { +export interface TestRunStopDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Stop test run by name. */ -export interface TestRunStopdefaultResponse extends HttpResponse { +export interface TestRunStopDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunStopdefaultHeaders; + headers: RawHttpHeaders & TestRunStopDefaultHeaders; } /** Lists the metric namespaces for a load test run. */ @@ -376,16 +375,16 @@ export interface TestRunListMetricNamespaces200Response extends HttpResponse { body: MetricNamespaceCollectionOutput; } -export interface TestRunListMetricNamespacesdefaultHeaders { +export interface TestRunListMetricNamespacesDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Lists the metric namespaces for a load test run. */ -export interface TestRunListMetricNamespacesdefaultResponse extends HttpResponse { +export interface TestRunListMetricNamespacesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunListMetricNamespacesdefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricNamespacesDefaultHeaders; } /** Lists the metric definitions for a load test run. */ @@ -394,34 +393,52 @@ export interface TestRunListMetricDefinitions200Response extends HttpResponse { body: MetricDefinitionCollectionOutput; } -export interface TestRunListMetricDefinitionsdefaultHeaders { +export interface TestRunListMetricDefinitionsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Lists the metric definitions for a load test run. */ -export interface TestRunListMetricDefinitionsdefaultResponse extends HttpResponse { +export interface TestRunListMetricDefinitionsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunListMetricDefinitionsdefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricDefinitionsDefaultHeaders; } /** Lists the metric values for a load test run. */ export interface TestRunGetMetrics200Response extends HttpResponse { status: "200"; - body: ResponseOutput; + body: MetricsOutput; } -export interface TestRunGetMetricsdefaultHeaders { +export interface TestRunGetMetricsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Lists the metric values for a load test run. */ -export interface TestRunGetMetricsdefaultResponse extends HttpResponse { +export interface TestRunGetMetricsDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponseBodyOutput; + headers: RawHttpHeaders & TestRunGetMetricsDefaultHeaders; +} + +/** Lists the dimension values for the given metric dimension name. */ +export interface TestRunGetMetricDimensionValues200Response extends HttpResponse { + status: "200"; + body: DimensionValueListOutput; +} + +export interface TestRunGetMetricDimensionValuesDefaultHeaders { + /** The error code for specific error that occurred. */ + "x-ms-error-code"?: string; +} + +/** Lists the dimension values for the given metric dimension name. */ +export interface TestRunGetMetricDimensionValuesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetMetricsdefaultHeaders; + headers: RawHttpHeaders & TestRunGetMetricDimensionValuesDefaultHeaders; } /** Associate an app component (collection of azure resources) to a test run */ @@ -436,16 +453,16 @@ export interface TestRunCreateOrUpdateAppComponent201Response extends HttpRespon body: TestRunAppComponentsOutput; } -export interface TestRunCreateOrUpdateAppComponentdefaultHeaders { +export interface TestRunCreateOrUpdateAppComponentDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Associate an app component (collection of azure resources) to a test run */ -export interface TestRunCreateOrUpdateAppComponentdefaultResponse extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponentDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentdefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentDefaultHeaders; } /** Get associated app component (collection of azure resources) for the given test run. */ @@ -454,16 +471,16 @@ export interface TestRunGetAppComponents200Response extends HttpResponse { body: TestRunAppComponentsOutput; } -export interface TestRunGetAppComponentsdefaultHeaders { +export interface TestRunGetAppComponentsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get associated app component (collection of azure resources) for the given test run. */ -export interface TestRunGetAppComponentsdefaultResponse extends HttpResponse { +export interface TestRunGetAppComponentsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetAppComponentsdefaultHeaders; + headers: RawHttpHeaders & TestRunGetAppComponentsDefaultHeaders; } /** Configure server metrics for a test run */ @@ -478,16 +495,16 @@ export interface TestRunCreateOrUpdateServerMetricsConfig201Response extends Htt body: TestRunServerMetricConfigOutput; } -export interface TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders { +export interface TestRunCreateOrUpdateServerMetricsConfigDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Configure server metrics for a test run */ -export interface TestRunCreateOrUpdateServerMetricsConfigdefaultResponse extends HttpResponse { +export interface TestRunCreateOrUpdateServerMetricsConfigDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunCreateOrUpdateServerMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateServerMetricsConfigDefaultHeaders; } /** Get server metric configuration for the given test run. */ @@ -496,14 +513,14 @@ export interface TestRunGetServerMetricsConfig200Response extends HttpResponse { body: TestRunServerMetricConfigOutput; } -export interface TestRunGetServerMetricsConfigdefaultHeaders { +export interface TestRunGetServerMetricsConfigDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get server metric configuration for the given test run. */ -export interface TestRunGetServerMetricsConfigdefaultResponse extends HttpResponse { +export interface TestRunGetServerMetricsConfigDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetServerMetricsConfigdefaultHeaders; + headers: RawHttpHeaders & TestRunGetServerMetricsConfigDefaultHeaders; } diff --git a/sdk/loadtestservice/load-testing-rest/swagger/README.md b/sdk/loadtestservice/load-testing-rest/swagger/README.md index 3f95e8c1e9d0..1e10980817c3 100644 --- a/sdk/loadtestservice/load-testing-rest/swagger/README.md +++ b/sdk/loadtestservice/load-testing-rest/swagger/README.md @@ -1,4 +1,4 @@ -# Azure Load Testing TypeScript Protocol Layer +# Azure Load Testing Typescript Protocol Layer > see https://aka.ms/autorest @@ -13,61 +13,13 @@ generate-test: true license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src -input-file: https://github.com/Azure/azure-rest-api-specs/blob/loadtest_stableapis/specification/loadtestservice/data-plane/Microsoft.LoadTestService/stable/2022-11-01/loadtestservice.json +input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/loadtestservice/data-plane/Microsoft.LoadTestService/stable/2022-11-01/loadtestservice.json package-version: 1.0.0 rest-level-client: true security: AADToken security-scopes: "https://cnt-prod.loadtesting.azure.com/.default" use-extension: - "@autorest/typescript": "6.0.0-rc.1" + "@autorest/typescript": "6.0.0-rc.3" service-versions: - '2022-11-01' -directive: -- from: swagger-document - where: '$.parameters["TestIdQueryParameter"]' - transform: > - $["x-ms-parameter-location"] = "method"; -- from: swagger-document - where: '$.paths.*[?(@.tags=="AppComponent")]' - transform: > - $["operationId"] = $["operationId"].replace("AppComponent_", "LoadTestAdministration_").concat("AppComponent"); -- from: swagger-document - where: '$.paths.*[?(@.tags=="ServerMetrics")]' - transform: > - $["operationId"] = $["operationId"].replace("ServerMetrics_", "LoadTestAdministration_").concat("ServerMetrics"); -- from: swagger-document - where: '$.paths.*[?(@.tags=="Test")]' - transform: > - $["operationId"] = $["operationId"].replace("Test_", "LoadTestAdministration_").concat("Test"); -- from: swagger-document - where: '$.paths.*[?(@.operationId.includes("TestRun_Metric"))]' - transform: > - $["operationId"] = $["operationId"].replace("TestRun_Metric", "TestRun_GetMetric"); -- rename-operation: - from: LoadTestAdministration_GetByTestOrTestRunAppComponent - to: LoadTestAdministration_GetAppComponentByTestOrTestRun -- rename-operation: - from: LoadTestAdministration_GetByTestOrTestRunServerMetrics - to: LoadTestAdministration_GetServerMetricsByTestOrTestRun -- rename-operation: - from: LoadTestAdministration_GetDefaultMetricsServerMetrics - to: LoadTestAdministration_GetDefaultServerMetrics -- rename-operation: - from: LoadTestAdministration_ListSupportedResourceTypeServerMetrics - to: LoadTestAdministration_ListSupportedResourceType -- rename-operation: - from: LoadTestAdministration_ListTest - to: LoadTestAdministration_ListTests -- rename-operation: - from: LoadTestAdministration_UploadFileTest - to: LoadTestAdministration_UploadFile -- rename-operation: - from: LoadTestAdministration_GetFileTest - to: LoadTestAdministration_GetFile -- rename-operation: - from: LoadTestAdministration_DeleteFileTest - to: LoadTestAdministration_DeleteFile -- rename-operation: - from: LoadTestAdministration_GetAllFilesTest - to: LoadTestAdministration_ListFiles ``` diff --git a/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts index 7304af7efa7f..1993e52276b9 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts @@ -26,7 +26,7 @@ describe("Test Run Creation", () => { body: { testId: "abc", displayName: "sample_testrun", - vusers: 10, + virtualUsers: 10, }, }); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts index eb66a7dec533..59e779486650 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts @@ -28,11 +28,9 @@ describe("File Upload", () => { }); it("should upload the test file", async () => { - const result = await client.path("/tests/{testId}/files/{fileId}", "abc", "xyz12365").put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, + const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "xyz12365").put({ + contentType: "application/octet-stream", + body: readStream, }); assert.include(["201"], result.status); From 5a07b96329d760cf23ea4da75763a8741f64a8b6 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 17 Nov 2022 22:43:35 +0530 Subject: [PATCH 14/60] Added Test Recordings --- ...ding_should_create_the_app_components.json | 57 ++++++++++++++++++ ...recording_should_upload_the_test_file.json | 4 ++ .../recording_should_create_a_loadtest.json | 60 +++++++++++++++++++ .../recording_should_create_a_test_run.json | 51 ++++++++++++++++ .../recording_should_get_a_test_run.json | 45 ++++++++++++++ ...ding_should_create_the_app_components.json | 48 +++++++++++++++ ...recording_should_upload_the_test_file.json | 38 ++++++++++++ .../recording_should_create_a_loadtest.json | 51 ++++++++++++++++ .../recording_should_create_a_test_run.json | 42 +++++++++++++ .../recording_should_get_a_test_run.json | 36 +++++++++++ 10 files changed, 432 insertions(+) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json new file mode 100644 index 000000000000..c5819309c4f5 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json @@ -0,0 +1,57 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/appcomp123/app-components?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "427", + "Content-Type": "application/merge-patch\u002Bjson", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "7c6ba601-eb11-4333-99da-a970ff699054", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": { + "testId": "abc", + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "subscriptionId": "azure_subscription_id" + } + } + }, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "92", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:53:59 GMT", + "mise-correlation-id": "accff988-9b4a-444a-b4cc-f9a61c96459e", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f302dcd2-220d-4237-8c2a-28af344ef603" + }, + "ResponseBody": { + "error": { + "code": "TestNotFound", + "message": "Test not found with given name \u0022appcomp123\u0022." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json new file mode 100644 index 000000000000..5c901b7a86bc --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json @@ -0,0 +1,60 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "113", + "Content-Type": "application/merge-patch\u002Bjson", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "d5c438f5-a2cd-4714-a614-30149f9acbca", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": { + "displayName": "sample_test", + "description": "", + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "179", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:53:57 GMT", + "mise-correlation-id": "5ec0dd20-9d7f-469f-9b70-a21554873201", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d5e91f89-bab5-4291-bc10-24515b64c8f3" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "inputArtifacts": { + "additionalFileInfo": [] + }, + "description": "", + "displayName": "sample_test" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json new file mode 100644 index 000000000000..bb667736a38d --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json @@ -0,0 +1,51 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "65", + "Content-Type": "application/merge-patch\u002Bjson", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "c0876ad4-71d0-4a9f-abf5-37ee794f53ad", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": { + "testId": "abc", + "displayName": "sample_testrun", + "virtualUsers": 10 + }, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "152", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:54:01 GMT", + "mise-correlation-id": "86c6a0f2-a3c7-41ff-870b-d8a6f9ef9bd2", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "346207e8-0898-4344-ae09-83b348041db6" + }, + "ResponseBody": { + "error": { + "code": "TestRunFileNotFound", + "message": "Test doesn\u0027t have any jmx file. Please upload a jmx file first, it\u0027s mandatory to create a TestRun." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json new file mode 100644 index 000000000000..541a9b6d5ff7 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json @@ -0,0 +1,45 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "916e6bae-5137-406c-a27b-45d64efbc614", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "94", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:54:03 GMT", + "mise-correlation-id": "3e696d21-ac85-469b-9bb7-90c3f4d230f1", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "89ec45bc-f35f-4c98-a3ad-0e996ff6f49c" + }, + "ResponseBody": { + "error": { + "code": "TestRunNotFound", + "message": "Test run not found with given name \u0022abcde\u0022." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json new file mode 100644 index 000000000000..2b8dd815bf29 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json @@ -0,0 +1,48 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/appcomp123/app-components?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "427", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "ff0c9843-d754-4421-94d5-64037ada4684" + }, + "RequestBody": { + "testId": "abc", + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "subscriptionId": "azure_subscription_id" + } + } + }, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "92", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:48:25 GMT", + "mise-correlation-id": "0bd322d0-6a7a-4b9d-b337-0b3f60a993e9", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f769eaed-4b01-48e9-880c-c6090a4ebd07" + }, + "ResponseBody": { + "error": { + "code": "TestNotFound", + "message": "Test not found with given name \u0022appcomp123\u0022." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json new file mode 100644 index 000000000000..5dce4104f5f2 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json @@ -0,0 +1,38 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/xyz12365?api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "application/octet-stream", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "33dec0e9-2418-471e-a5b2-06303d3c40e2" + }, + "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjUwPC9zdHJpbmdQcm9wPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLnJhbXBfdGltZSI\u002BMjwvc3RyaW5nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuc3RhcnRfdGltZSI\u002BMTUxNTA2MzY1MDAwMDwvbG9uZ1Byb3A\u002BCiAgICAgICAgPGxvbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLmVuZF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2NoZWR1bGVyIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZHVyYXRpb24iPjYwPC9zdHJpbmdQcm9wPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLmRlbGF5Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGJvb2xQcm9wIG5hbWU9IlRocmVhZEdyb3VwLnNhbWVfdXNlcl9vbl9uZXh0X2l0ZXJhdGlvbiI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgIDwvVGhyZWFkR3JvdXA\u002BCiAgICAgIDxoYXNoVHJlZT4KICAgICAgICA8SFRUUFNhbXBsZXJQcm94eSBndWljbGFzcz0iSHR0cFRlc3RTYW1wbGVHdWkiIHRlc3RjbGFzcz0iSFRUUFNhbXBsZXJQcm94eSIgdGVzdG5hbWU9IlNhbXBsZSIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8ZWxlbWVudFByb3AgbmFtZT0iSFRUUHNhbXBsZXIuQXJndW1lbnRzIiBlbGVtZW50VHlwZT0iQXJndW1lbnRzIiBndWljbGFzcz0iSFRUUEFyZ3VtZW50c1BhbmVsIiB0ZXN0Y2xhc3M9IkFyZ3VtZW50cyIgdGVzdG5hbWU9IlVzZXIgRGVmaW5lZCBWYXJpYWJsZXMiIGVuYWJsZWQ9InRydWUiPgogICAgICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICAgICAgPC9lbGVtZW50UHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmRvbWFpbiI\u002BbWljcm9zb2Z0LmNvbTwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLnBvcnQiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLnByb3RvY29sIj48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5jb250ZW50RW5jb2RpbmciPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLnBhdGgiPi88L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5tZXRob2QiPkdFVDwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5mb2xsb3dfcmVkaXJlY3RzIj50cnVlPC9ib29sUHJvcD4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5hdXRvX3JlZGlyZWN0cyI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLnVzZV9rZWVwYWxpdmUiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLkRPX01VTFRJUEFSVF9QT1NUIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5lbWJlZGRlZF91cmxfcmUiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbm5lY3RfdGltZW91dCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucmVzcG9uc2VfdGltZW91dCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgIDwvSFRUUFNhbXBsZXJQcm94eT4KICAgICAgICA8aGFzaFRyZWUvPgogICAgICA8L2hhc2hUcmVlPgogICAgICA8UmVzdWx0Q29sbGVjdG9yIGd1aWNsYXNzPSJWaWV3UmVzdWx0c0Z1bGxWaXN1YWxpemVyIiB0ZXN0Y2xhc3M9IlJlc3VsdENvbGxlY3RvciIgdGVzdG5hbWU9IlZpZXcgUmVzdWx0cyBUcmVlIiBlbmFibGVkPSJmYWxzZSI\u002BCiAgICAgICAgPGJvb2xQcm9wIG5hbWU9IlJlc3VsdENvbGxlY3Rvci5lcnJvcl9sb2dnaW5nIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgPG9ialByb3A\u002BCiAgICAgICAgICA8bmFtZT5zYXZlQ29uZmlnPC9uYW1lPgogICAgICAgICAgPHZhbHVlIGNsYXNzPSJTYW1wbGVTYXZlQ29uZmlndXJhdGlvbiI\u002BCiAgICAgICAgICAgIDx0aW1lPnRydWU8L3RpbWU\u002BCiAgICAgICAgICAgIDxsYXRlbmN5PnRydWU8L2xhdGVuY3k\u002BCiAgICAgICAgICAgIDx0aW1lc3RhbXA\u002BdHJ1ZTwvdGltZXN0YW1wPgogICAgICAgICAgICA8c3VjY2Vzcz50cnVlPC9zdWNjZXNzPgogICAgICAgICAgICA8bGFiZWw\u002BdHJ1ZTwvbGFiZWw\u002BCiAgICAgICAgICAgIDxjb2RlPnRydWU8L2NvZGU\u002BCiAgICAgICAgICAgIDxtZXNzYWdlPnRydWU8L21lc3NhZ2U\u002BCiAgICAgICAgICAgIDx0aHJlYWROYW1lPnRydWU8L3RocmVhZE5hbWU\u002BCiAgICAgICAgICAgIDxkYXRhVHlwZT50cnVlPC9kYXRhVHlwZT4KICAgICAgICAgICAgPGVuY29kaW5nPmZhbHNlPC9lbmNvZGluZz4KICAgICAgICAgICAgPGFzc2VydGlvbnM\u002BdHJ1ZTwvYXNzZXJ0aW9ucz4KICAgICAgICAgICAgPHN1YnJlc3VsdHM\u002BdHJ1ZTwvc3VicmVzdWx0cz4KICAgICAgICAgICAgPHJlc3BvbnNlRGF0YT5mYWxzZTwvcmVzcG9uc2VEYXRhPgogICAgICAgICAgICA8c2FtcGxlckRhdGE\u002BZmFsc2U8L3NhbXBsZXJEYXRhPgogICAgICAgICAgICA8eG1sPmZhbHNlPC94bWw\u002BCiAgICAgICAgICAgIDxmaWVsZE5hbWVzPnRydWU8L2ZpZWxkTmFtZXM\u002BCiAgICAgICAgICAgIDxyZXNwb25zZUhlYWRlcnM\u002BZmFsc2U8L3Jlc3BvbnNlSGVhZGVycz4KICAgICAgICAgICAgPHJlcXVlc3RIZWFkZXJzPmZhbHNlPC9yZXF1ZXN0SGVhZGVycz4KICAgICAgICAgICAgPHJlc3BvbnNlRGF0YU9uRXJyb3I\u002BZmFsc2U8L3Jlc3BvbnNlRGF0YU9uRXJyb3I\u002BCiAgICAgICAgICAgIDxzYXZlQXNzZXJ0aW9uUmVzdWx0c0ZhaWx1cmVNZXNzYWdlPnRydWU8L3NhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BCiAgICAgICAgICAgIDxhc3NlcnRpb25zUmVzdWx0c1RvU2F2ZT4wPC9hc3NlcnRpb25zUmVzdWx0c1RvU2F2ZT4KICAgICAgICAgICAgPGJ5dGVzPnRydWU8L2J5dGVzPgogICAgICAgICAgICA8c2VudEJ5dGVzPnRydWU8L3NlbnRCeXRlcz4KICAgICAgICAgICAgPHVybD50cnVlPC91cmw\u002BCiAgICAgICAgICAgIDx0aHJlYWRDb3VudHM\u002BdHJ1ZTwvdGhyZWFkQ291bnRzPgogICAgICAgICAgICA8aWRsZVRpbWU\u002BdHJ1ZTwvaWRsZVRpbWU\u002BCiAgICAgICAgICAgIDxjb25uZWN0VGltZT50cnVlPC9jb25uZWN0VGltZT4KICAgICAgICAgIDwvdmFsdWU\u002BCiAgICAgICAgPC9vYmpQcm9wPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9ImZpbGVuYW1lIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDwvUmVzdWx0Q29sbGVjdG9yPgogICAgICA8aGFzaFRyZWUvPgogICAgPC9oYXNoVHJlZT4KICA8L2hhc2hUcmVlPgo8L2ptZXRlclRlc3RQbGFuPgo=", + "StatusCode": 400, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "91", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:48:27 GMT", + "mise-correlation-id": "9928d2a3-268b-4cc0-af28-0fdd39586c8b", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "9ca8a85d-31c4-49e3-ad88-7621cd6dbc39" + }, + "ResponseBody": { + "error": { + "code": "InvalidFileName", + "message": "File name should have extension - xyz12365" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json new file mode 100644 index 000000000000..ff24076eb028 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -0,0 +1,51 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "113", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "3aaf9bcc-7a29-4af1-a93d-080e751d0097" + }, + "RequestBody": { + "displayName": "sample_test", + "description": "", + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "179", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:48:26 GMT", + "mise-correlation-id": "b27cf54c-346e-47cd-8409-c211e5112912", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f3eafa0d-f11b-461a-b37d-adfa2788794d" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "inputArtifacts": { + "additionalFileInfo": [] + }, + "description": "", + "displayName": "sample_test" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json new file mode 100644 index 000000000000..2d404401bd68 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json @@ -0,0 +1,42 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "65", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "45eaf678-dba1-452a-afa1-704c50a45a4a" + }, + "RequestBody": { + "testId": "abc", + "displayName": "sample_testrun", + "virtualUsers": 10 + }, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "152", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:48:26 GMT", + "mise-correlation-id": "865b3696-553c-4d83-bc67-dac026d8412c", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7ef1cb3f-e101-447d-a1ae-e17120eecafe" + }, + "ResponseBody": { + "error": { + "code": "TestRunFileNotFound", + "message": "Test doesn\u0027t have any jmx file. Please upload a jmx file first, it\u0027s mandatory to create a TestRun." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json new file mode 100644 index 000000000000..009830446f70 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -0,0 +1,36 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", + "x-ms-client-request-id": "00fa65d7-e768-40e4-ae77-cc0ff2e79be6" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "94", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 17 Nov 2022 16:48:27 GMT", + "mise-correlation-id": "7744acda-c871-47d1-9b7c-dbd62cf9736d", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c7e51952-d266-49c4-8e58-38943db3b4f7" + }, + "ResponseBody": { + "error": { + "code": "TestRunNotFound", + "message": "Test run not found with given name \u0022abcde\u0022." + } + } + } + ], + "Variables": {} +} From 38397f38a293b4c115e3165cc86c1f97f1c76b80 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 17 Nov 2022 23:17:43 +0530 Subject: [PATCH 15/60] Added Samples for JS and TS --- .../load-testing-rest/package.json | 9 +++ .../samples/v1/javascript/README.md | 68 ++++++++++++++++ .../v1/javascript/createAppComponent.js | 67 +++++++++++++++ .../v1/javascript/createOrUpdateTest.js | 35 ++++++++ .../javascript/createTestRunAndGetMetrics.js | 62 ++++++++++++++ .../samples/v1/javascript/fileUpload.js | 59 ++++++++++++++ .../samples/v1/javascript/package.json | 34 ++++++++ .../samples/v1/javascript/sample.env | 4 + .../samples/v1/typescript/README.md | 81 +++++++++++++++++++ .../samples/v1/typescript/package.json | 44 ++++++++++ .../samples/v1/typescript/sample.env | 4 + .../v1/typescript/src/createAppComponent.ts | 65 +++++++++++++++ .../v1/typescript/src/createOrUpdateTest.ts | 35 ++++++++ .../src/createTestRunAndGetMetrics.ts | 61 ++++++++++++++ .../samples/v1/typescript/src/fileUpload.ts | 58 +++++++++++++ .../samples/v1/typescript/tsconfig.json | 17 ++++ 16 files changed, 703 insertions(+) create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index 4c4b510f602e..fb13474b6e3d 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -28,6 +28,15 @@ "LICENSE", "review/*" ], + "//sampleConfiguration": { + "productName": "Azure Load Testing rest", + "productSlugs": [ + "azure" + ], + "requiredResources": { + "Azure LoadTesting Service instance": "https://learn.microsoft.com/azure/load-testing/" + } + }, "engines": { "node": ">=14.0.0" }, diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md new file mode 100644 index 000000000000..c74cf067da36 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/README.md @@ -0,0 +1,68 @@ +--- +page_type: sample +languages: + - javascript +products: + - azure +urlFragment: load-testing-javascript +--- + +# Azure Load Testing rest client library samples for JavaScript + +These sample programs show how to use the JavaScript client libraries for Azure Load Testing rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------- | -------------------------- | +| [createAppComponent.js][createappcomponent] | creates and run a loadtest | +| [createOrUpdateTest.js][createorupdatetest] | creates and run a loadtest | +| [createTestRunAndGetMetrics.js][createtestrunandgetmetrics] | creates and run a loadtest | +| [fileUpload.js][fileupload] | creates and run a loadtest | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node createAppComponent.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node createAppComponent.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[createappcomponent]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js +[createorupdatetest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js +[createtestrunandgetmetrics]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js +[fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing +[freesub]: https://azure.microsoft.com/free/ +[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js new file mode 100644 index 000000000000..c2f6d46dc94d --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createAppComponent.js @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { v4: uuidv4 } = require("uuid"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": + { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js new file mode 100644 index 000000000000..5cab86a174ce --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createOrUpdateTest.js @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting /*, { isUnexpected }*/ = require("@azure-rest/load-testing").default; +const { DefaultAzureCredential } = require("@azure/identity"); +const { v4: uuidv4 } = require("uuid"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the Load test + await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js new file mode 100644 index 000000000000..1539a1481460 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/createTestRunAndGetMetrics.js @@ -0,0 +1,62 @@ +/** + * This sample demonstrates how to run a test and get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { v4: uuidv4 } = require("uuid"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testStatus = null; + var getTestRunResult = null; + const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + console.log(getTestRunResult); +} +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js new file mode 100644 index 000000000000..0d9c0a0b6258 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/fileUpload.js @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { createReadStream } = require("fs"); +const { v4: uuidv4 } = require("uuid"); + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const fileId = uuidv4(); // ID to be assigned to the file being uploaded + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileId) + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json new file mode 100644 index 000000000000..e61020757e2e --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/package.json @@ -0,0 +1,34 @@ +{ + "name": "@azure-samples/load-testing-js", + "private": true, + "version": "1.0.0", + "description": "Azure Load Testing rest client library samples for JavaScript", + "engines": { + "node": ">=14.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/loadtestservice/load-testing-rest" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", + "dependencies": { + "@azure-rest/load-testing": "latest", + "dotenv": "latest", + "@azure/identity": "^2.0.1", + "uuid": "^9.0.0" + } +} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/javascript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md new file mode 100644 index 000000000000..3b0d5579d4e4 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/README.md @@ -0,0 +1,81 @@ +--- +page_type: sample +languages: + - typescript +products: + - azure +urlFragment: load-testing-typescript +--- + +# Azure Load Testing rest client library samples for TypeScript + +These sample programs show how to use the TypeScript client libraries for Azure Load Testing rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------------------------------------------- | -------------------------- | +| [createAppComponent.ts][createappcomponent] | creates and run a loadtest | +| [createOrUpdateTest.ts][createorupdatetest] | creates and run a loadtest | +| [createTestRunAndGetMetrics.ts][createtestrunandgetmetrics] | creates and run a loadtest | +| [fileUpload.ts][fileupload] | creates and run a loadtest | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/createAppComponent.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node dist/createAppComponent.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[createappcomponent]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts +[createorupdatetest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts +[createtestrunandgetmetrics]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts +[fileupload]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing +[freesub]: https://azure.microsoft.com/free/ +[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json new file mode 100644 index 000000000000..0a1dad64a501 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/package.json @@ -0,0 +1,44 @@ +{ + "name": "@azure-samples/load-testing-ts", + "private": true, + "version": "1.0.0", + "description": "Azure Load Testing rest client library samples for TypeScript", + "engines": { + "node": ">=14.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/loadtestservice/load-testing-rest" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", + "dependencies": { + "@azure-rest/load-testing": "latest", + "dotenv": "latest", + "@azure/identity": "^2.0.1", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@types/uuid": "^8.3.4", + "@types/node": "^14.0.0", + "typescript": "~4.8.0", + "rimraf": "latest" + } +} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts new file mode 100644 index 000000000000..aad2b0ae5bdb --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createAppComponent.ts @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts new file mode 100644 index 000000000000..cb01b392be9d --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createOrUpdateTest.ts @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +import AzureLoadTesting /*, { isUnexpected }*/ from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the Load test + await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts new file mode 100644 index 000000000000..23592802ebb5 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/createTestRunAndGetMetrics.ts @@ -0,0 +1,61 @@ +/** + * This sample demonstrates how to run a test and get test status + * + * @summary creates and run a loadtest + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testStatus = null; + var getTestRunResult = null; + const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + console.log(getTestRunResult); +} +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts new file mode 100644 index 000000000000..0a17bcf65c80 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/src/fileUpload.ts @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status + * + * @summary creates and run a loadtest + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; +import { v4 as uuidv4 } from "uuid"; + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const fileId = uuidv4(); // ID to be assigned to the file being uploaded + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileId) + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json new file mode 100644 index 000000000000..416c2dd82e00 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2018", + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**.ts" + ] +} From 75d462ffee6713ca65fcd97f358d5b5d44c27e14 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Sat, 19 Nov 2022 00:29:01 +0530 Subject: [PATCH 16/60] Added Validation Poller --- .../load-testing-rest/package.json | 3 +- .../samples-dev/fileUpload.ts | 15 +- .../src/beginFileValidation.ts | 178 ++++++++++++++++++ .../load-testing-rest/src/index.ts | 1 + .../load-testing-rest/src/models.ts | 19 ++ 5 files changed, 211 insertions(+), 5 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index fb13474b6e3d..ba1d5bfb8da5 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -75,7 +75,8 @@ "@azure/core-paging": "^1.2.0", "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" + "tslib": "^2.2.0", + "@azure/core-lro": "~2.4.1" }, "devDependencies": { "@azure-tools/test-credential": "~1.0.0", diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts index 3762c69c92ac..6a79feb5cd1f 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts @@ -8,7 +8,7 @@ * @azsdk-weight 10 */ -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import AzureLoadTesting, { isUnexpected, beginFileValidation } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; @@ -19,7 +19,7 @@ async function main() { const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; const displayName = "some-load-test"; const testId = uuidv4(); // ID to be assigned to a test - const fileId = uuidv4(); // ID to be assigned to the file being uploaded + const fileName = uuidv4(); // ID to be assigned to the file being uploaded // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); @@ -44,7 +44,7 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadResult = await client + /*const fileUploadResult = await client .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileId) .put({ contentType: "application/octet-stream", @@ -53,7 +53,14 @@ async function main() { if (isUnexpected(fileUploadResult)) { throw fileUploadResult.body.error; - } + }*/ + + const TEST_ID = testCreationResult.body.testId; + const fileValidationPoller = await beginFileValidation(client, TEST_ID, fileName, readStream); + const fileValidationResult = await fileValidationPoller.pollUntilDone(); + console.log( + `Provisioned environment with state ${fileValidationResult.body.validationStatus}.` + ); } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts b/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts new file mode 100644 index 000000000000..83e6bec4853b --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; +import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; +import { AzureLoadTestingClient } from "./index.js"; +import { TestUploadFile201Response } from "./responses"; +import { isUnexpected } from "./isUnexpected"; +import { ReadStream } from "fs"; + +/** + * Submits a Notification Hub job and creates a poller to poll for results. + * @param client - The Load Testing client. + * @param options - The operation options. + * @returns A poller which can be called to poll until completion of the job. + */ +export async function beginFileValidation( + client : AzureLoadTestingClient, + testId: string, + fileName: string, + file: ReadStream, + polledOperationOptions: PolledOperationOptions = {} +): Promise { + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testId, fileName) + .put({ + contentType: "application/octet-stream", + body: file, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + let fileValidationResponse : TestUploadFile201Response; + + type Handler = (state: OperationState) => void; + + const state: OperationState = { + status: "notStarted", + }; + + const progressCallbacks = new Map(); + const processProgressCallbacks = async (): Promise => + progressCallbacks.forEach((h) => h(state)); + let resultPromise: Promise | undefined; + let cancelJob: (() => void) | undefined; + const abortController = new AbortController(); + const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; + + const poller: SimplePollerLike, TestUploadFile201Response> = { + async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { + + await client.path("/tests/{testId}/files/{fileName}", testId, fileName).get(); + if (fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED" || fileValidationResponse.body.validationStatus === "NOT_VALIDATED") { + state.status = "running"; + } + + if (fileValidationResponse.body.validationStatus === "VALIDATION_SUCCESS" || fileValidationResponse.body.validationStatus === "VALIDATION_NOT_REQUIRED") { + state.status = "succeeded"; + state.result = fileValidationResponse; + } + + if (fileValidationResponse.body.validationStatus === "VALIDATION_FAILURE") { + state.status = "failed"; + state.error = new Error(fileValidationResponse.body.validationStatus); + } + + await processProgressCallbacks(); + + if (state.status === "canceled") { + throw new Error("Operation was canceled"); + } + if (state.status === "failed") { + throw state.error; + } + }, + + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise { + return (resultPromise ??= (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + const { signal: abortSignal } = inputAbortSignal + ? new AbortController([inputAbortSignal, abortController.signal]) + : abortController; + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + const delay = sleep(currentPollIntervalInMs, abortSignal); + cancelJob = () => abortController.abort(); + await delay; + await poller.poll({ abortSignal }); + } + } + switch (state.status) { + case "succeeded": { + return poller.getResult() as TestUploadFile201Response; + } + case "canceled": { + throw new Error("Operation was canceled"); + } + case "failed": { + throw state.error; + } + case "notStarted": + case "running": { + // Unreachable + throw new Error(`polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = undefined; + })); + }, + + onProgress(callback: (state: OperationState) => void): CancelOnProgress { + const s = Symbol(); + progressCallbacks.set(s, callback); + + return () => progressCallbacks.delete(s); + }, + + isDone(): boolean { + return ["succeeded", "failed", "canceled"].includes(state.status); + }, + + stopPolling(): void { + abortController.abort(); + cancelJob?.(); + }, + + isStopped(): boolean { + return resultPromise === undefined; + }, + + getOperationState(): OperationState { + return state; + }, + + getResult(): TestUploadFile201Response | undefined { + return state.result; + }, + + toString() { + return JSON.stringify({ state }); + }, + }; + + return poller; +} + +const REJECTED_ERR = new Error("The operation has been aborted"); + +function sleep(ms: number, signal: AbortSignalLike): Promise { + return new Promise((resolve, reject) => { + if (signal.aborted) { + reject(REJECTED_ERR); + return; + } + + const id = setTimeout(() => { + signal.removeEventListener("abort", onAbort); + + if (signal.aborted) { + reject(REJECTED_ERR); + return; + } + + resolve(); + }, ms); + + signal.addEventListener("abort", onAbort, { once: true }); + + function onAbort(): void { + clearTimeout(id); + reject(REJECTED_ERR); + } + }); +} diff --git a/sdk/loadtestservice/load-testing-rest/src/index.ts b/sdk/loadtestservice/load-testing-rest/src/index.ts index c89f862565f6..9f16befced4e 100644 --- a/sdk/loadtestservice/load-testing-rest/src/index.ts +++ b/sdk/loadtestservice/load-testing-rest/src/index.ts @@ -11,5 +11,6 @@ export * from "./isUnexpected"; export * from "./models"; export * from "./outputModels"; export * from "./paginateHelper"; +export * from "./beginFileValidation"; export default AzureLoadTesting; diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 8cda6147fbba..7b7710872dad 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { OperationState, SimplePollerLike } from "@azure/core-lro"; +import { CommonClientOptions, OperationOptions } from "@azure/core-client"; +import { TestUploadFile201Response } from "./responses" + /** Load test model */ export interface Test { /** Pass fail criteria for a test. */ @@ -391,3 +395,18 @@ export interface TestRunServerMetricConfig { /** The user that last modified. */ lastModifiedBy?: string; } + +/** + * Describes a poller for NotificationHubJob types. + */ +export type FileUploadAndValidatePoller = SimplePollerLike< + OperationState, + TestUploadFile201Response +>; + +export interface PolledOperationOptions extends OperationOptions { + /** + * Time delay between poll requests, in milliseconds. + */ + updateIntervalInMs?: number; +} From 42658f5e29582471bdea73380d94d415c466b7ed Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 23 Nov 2022 19:05:30 +0530 Subject: [PATCH 17/60] added champion scenario in single file --- ...onent.ts => createOrUpdateAppComponent.ts} | 5 +- .../samples-dev/createOrUpdateTest.ts | 13 +- ... => createOrUpdateTestRunAndGetMetrics.ts} | 51 ++++- .../samples-dev/fileUpload.ts | 13 +- .../load-testing-rest/samples-dev/sample.ts | 201 ++++++++++++++++++ .../src/beginFileValidation.ts | 28 ++- .../src/clientDefinitions.ts | 134 ++++++------ .../load-testing-rest/src/index.ts | 2 - .../load-testing-rest/src/isUnexpected.ts | 142 +++++++------ .../load-testing-rest/src/models.ts | 43 ++-- .../load-testing-rest/src/outputModels.ts | 24 ++- .../load-testing-rest/src/parameters.ts | 52 ++--- .../load-testing-rest/src/responses.ts | 92 ++++---- 13 files changed, 522 insertions(+), 278 deletions(-) rename sdk/loadtestservice/load-testing-rest/samples-dev/{createAppComponent.ts => createOrUpdateAppComponent.ts} (92%) rename sdk/loadtestservice/load-testing-rest/samples-dev/{createTestRunAndGetMetrics.ts => createOrUpdateTestRunAndGetMetrics.ts} (53%) create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateAppComponent.ts similarity index 92% rename from sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts rename to sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateAppComponent.ts index 9c48998390ef..2d928cf9c372 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createAppComponent.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateAppComponent.ts @@ -2,9 +2,8 @@ // Licensed under the MIT license. /** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest + * This sample demonstrates how to create or update appcomponents + * @summary create or update appcomponents * @azsdk-weight 10 */ diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts index 7905167c3914..29e0655dddd7 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts @@ -2,13 +2,12 @@ // Licensed under the MIT license. /** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest + * This sample demonstrates how to create a loadtest + * @summary creates a loadtest * @azsdk-weight 10 */ -import AzureLoadTesting /*, { isUnexpected }*/ from "@azure-rest/load-testing"; +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { v4 as uuidv4 } from "uuid"; @@ -21,7 +20,7 @@ async function main() { const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); // Creating the Load test - await client.path("/tests/{testId}", testId).patch({ + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ contentType: "application/merge-patch+json", body: { displayName: displayName, @@ -31,6 +30,10 @@ async function main() { }, }, }); + + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts similarity index 53% rename from sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts rename to sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts index ace80bffaa98..9aa08b17de37 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createTestRunAndGetMetrics.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts @@ -37,7 +37,7 @@ async function main() { // Checking the test run status and printing metrics var testStatus = null; - var getTestRunResult = null; + var getTestRunResult; const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); //wait for terminal state @@ -57,6 +57,55 @@ async function main() { sleep(5000); } + if (getTestRunResult === undefined) throw new Error("There is some issue in running the test."); + + let testRunStarttime = getTestRunResult.body.startDateTime; + let testRunEndTime = getTestRunResult.body.endDateTime; + + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunCreationResult.body.testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunCreationResult.body.testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + let metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + queryParameters: { + metricname: metricDefinition.name, + metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, + }, + }); + + console.log(metricsResult); console.log(getTestRunResult); } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts index 6a79feb5cd1f..8b08f6b88e83 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts @@ -44,8 +44,8 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - /*const fileUploadResult = await client - .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileId) + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileName) .put({ contentType: "application/octet-stream", body: readStream, @@ -53,14 +53,7 @@ async function main() { if (isUnexpected(fileUploadResult)) { throw fileUploadResult.body.error; - }*/ - - const TEST_ID = testCreationResult.body.testId; - const fileValidationPoller = await beginFileValidation(client, TEST_ID, fileName, readStream); - const fileValidationResult = await fileValidationPoller.pollUntilDone(); - console.log( - `Provisioned environment with state ${fileValidationResult.body.validationStatus}.` - ); + } } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts new file mode 100644 index 000000000000..e06289a9bf7c --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status f) get test metrics + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; +import { v4 as uuidv4 } from "uuid"; + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + const testId = uuidv4(); // ID to be assigned to a test + const fileName = uuidv4(); // ID to be assigned to the file being uploaded + const testRunId = uuidv4(); // ID to be assigned to a testRun + const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileName) + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + // Getting the Validation Status of file + + let fileValidationResult; + let validationStatus = null; + //wait for terminal state + while ( + validationStatus == null || + (validationStatus != "VALIDATION_SUCCESS" && + validationStatus != "VALIDATION_FAILURE" && + validationStatus != "VALIDATION_NOT_REQUIRED") + ) { + fileValidationResult = await client + .path("/tests/{testId}/files/{fileName}", testId, fileName) + .get(); + if (isUnexpected(fileValidationResult)) { + throw fileValidationResult.body.error; + } + validationStatus = fileValidationResult.body.validationStatus; + + //Check test status after every 2 seconds + sleep(2000); + } + + if (validationStatus == "VALIDATION_FAILURE") { + throw new Error("Invalid file."); + } + + // Creating app component + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testStatus = null; + var getTestRunResult; + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + if (getTestRunResult === undefined) throw new Error("There is some issue in running the test."); + + let testRunStarttime = getTestRunResult.body.startDateTime; + let testRunEndTime = getTestRunResult.body.endDateTime; + + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunCreationResult.body.testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunCreationResult.body.testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + let metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + queryParameters: { + metricname: metricDefinition.name, + metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, + }, + }); + + console.log(metricsResult); + console.log(getTestRunResult); +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts b/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts index 83e6bec4853b..4aea63b878a0 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts @@ -16,7 +16,7 @@ import { ReadStream } from "fs"; * @returns A poller which can be called to poll until completion of the job. */ export async function beginFileValidation( - client : AzureLoadTestingClient, + client: AzureLoadTestingClient, testId: string, fileName: string, file: ReadStream, @@ -32,7 +32,7 @@ export async function beginFileValidation( if (isUnexpected(fileUploadResult)) { throw fileUploadResult.body.error; } - let fileValidationResponse : TestUploadFile201Response; + let fileValidationResponse: TestUploadFile201Response; type Handler = (state: OperationState) => void; @@ -48,15 +48,23 @@ export async function beginFileValidation( const abortController = new AbortController(); const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; - const poller: SimplePollerLike, TestUploadFile201Response> = { + const poller: SimplePollerLike< + OperationState, + TestUploadFile201Response + > = { async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { - await client.path("/tests/{testId}/files/{fileName}", testId, fileName).get(); - if (fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED" || fileValidationResponse.body.validationStatus === "NOT_VALIDATED") { + if ( + fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED" || + fileValidationResponse.body.validationStatus === "NOT_VALIDATED" + ) { state.status = "running"; } - if (fileValidationResponse.body.validationStatus === "VALIDATION_SUCCESS" || fileValidationResponse.body.validationStatus === "VALIDATION_NOT_REQUIRED") { + if ( + fileValidationResponse.body.validationStatus === "VALIDATION_SUCCESS" || + fileValidationResponse.body.validationStatus === "VALIDATION_NOT_REQUIRED" + ) { state.status = "succeeded"; state.result = fileValidationResponse; } @@ -76,7 +84,9 @@ export async function beginFileValidation( } }, - pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise { + pollUntilDone(pollOptions?: { + abortSignal?: AbortSignalLike; + }): Promise { return (resultPromise ??= (async () => { const { abortSignal: inputAbortSignal } = pollOptions || {}; const { signal: abortSignal } = inputAbortSignal @@ -112,7 +122,9 @@ export async function beginFileValidation( })); }, - onProgress(callback: (state: OperationState) => void): CancelOnProgress { + onProgress( + callback: (state: OperationState) => void + ): CancelOnProgress { const s = Symbol(); progressCallbacks.set(s, callback); diff --git a/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts b/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts index fa060ea97a24..aac5c99ec252 100644 --- a/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts +++ b/sdk/loadtestservice/load-testing-rest/src/clientDefinitions.ts @@ -10,10 +10,10 @@ import { TestGetFileParameters, TestDeleteFileParameters, TestListFilesParameters, - TestCreateOrUpdateAppComponentParameters, - TestGetAppComponentsParameters, + TestCreateOrUpdateAppComponentsParameters, + TestListAppComponentsParameters, TestCreateOrUpdateServerMetricsConfigParameters, - TestGetServerMetricsConfigParameters, + TestListServerMetricsConfigParameters, TestRunDeleteParameters, TestRunCreateOrUpdateParameters, TestRunGetParameters, @@ -22,12 +22,12 @@ import { TestRunStopParameters, TestRunListMetricNamespacesParameters, TestRunListMetricDefinitionsParameters, - TestRunGetMetricsParameters, - TestRunGetMetricDimensionValuesParameters, - TestRunCreateOrUpdateAppComponentParameters, - TestRunGetAppComponentsParameters, + TestRunListMetricsParameters, + TestRunListMetricDimensionValuesParameters, + TestRunCreateOrUpdateAppComponentsParameters, + TestRunListAppComponentsParameters, TestRunCreateOrUpdateServerMetricsConfigParameters, - TestRunGetServerMetricsConfigParameters, + TestRunListServerMetricsConfigParameters, } from "./parameters"; import { TestCreateOrUpdate200Response, @@ -47,16 +47,16 @@ import { TestDeleteFileDefaultResponse, TestListFiles200Response, TestListFilesDefaultResponse, - TestCreateOrUpdateAppComponent200Response, - TestCreateOrUpdateAppComponent201Response, - TestCreateOrUpdateAppComponentDefaultResponse, - TestGetAppComponents200Response, - TestGetAppComponentsDefaultResponse, + TestCreateOrUpdateAppComponents200Response, + TestCreateOrUpdateAppComponents201Response, + TestCreateOrUpdateAppComponentsDefaultResponse, + TestListAppComponents200Response, + TestListAppComponentsDefaultResponse, TestCreateOrUpdateServerMetricsConfig200Response, TestCreateOrUpdateServerMetricsConfig201Response, TestCreateOrUpdateServerMetricsConfigDefaultResponse, - TestGetServerMetricsConfig200Response, - TestGetServerMetricsConfigDefaultResponse, + TestListServerMetricsConfig200Response, + TestListServerMetricsConfigDefaultResponse, TestRunDelete204Response, TestRunDeleteDefaultResponse, TestRunCreateOrUpdate200Response, @@ -74,20 +74,20 @@ import { TestRunListMetricNamespacesDefaultResponse, TestRunListMetricDefinitions200Response, TestRunListMetricDefinitionsDefaultResponse, - TestRunGetMetrics200Response, - TestRunGetMetricsDefaultResponse, - TestRunGetMetricDimensionValues200Response, - TestRunGetMetricDimensionValuesDefaultResponse, - TestRunCreateOrUpdateAppComponent200Response, - TestRunCreateOrUpdateAppComponent201Response, - TestRunCreateOrUpdateAppComponentDefaultResponse, - TestRunGetAppComponents200Response, - TestRunGetAppComponentsDefaultResponse, + TestRunListMetrics200Response, + TestRunListMetricsDefaultResponse, + TestRunListMetricDimensionValues200Response, + TestRunListMetricDimensionValuesDefaultResponse, + TestRunCreateOrUpdateAppComponents200Response, + TestRunCreateOrUpdateAppComponents201Response, + TestRunCreateOrUpdateAppComponentsDefaultResponse, + TestRunListAppComponents200Response, + TestRunListAppComponentsDefaultResponse, TestRunCreateOrUpdateServerMetricsConfig200Response, TestRunCreateOrUpdateServerMetricsConfig201Response, TestRunCreateOrUpdateServerMetricsConfigDefaultResponse, - TestRunGetServerMetricsConfig200Response, - TestRunGetServerMetricsConfigDefaultResponse, + TestRunListServerMetricsConfig200Response, + TestRunListServerMetricsConfigDefaultResponse, } from "./responses"; import { Client, StreamableMethod } from "@azure-rest/core-client"; @@ -137,19 +137,19 @@ export interface TestListFiles { ): StreamableMethod; } -export interface TestCreateOrUpdateAppComponent { +export interface TestCreateOrUpdateAppComponents { /** Associate an app component (collection of azure resources) to a test */ patch( - options: TestCreateOrUpdateAppComponentParameters + options: TestCreateOrUpdateAppComponentsParameters ): StreamableMethod< - | TestCreateOrUpdateAppComponent200Response - | TestCreateOrUpdateAppComponent201Response - | TestCreateOrUpdateAppComponentDefaultResponse + | TestCreateOrUpdateAppComponents200Response + | TestCreateOrUpdateAppComponents201Response + | TestCreateOrUpdateAppComponentsDefaultResponse >; /** Get associated app component (collection of azure resources) for the given test. */ get( - options?: TestGetAppComponentsParameters - ): StreamableMethod; + options?: TestListAppComponentsParameters + ): StreamableMethod; } export interface TestCreateOrUpdateServerMetricsConfig { @@ -161,11 +161,11 @@ export interface TestCreateOrUpdateServerMetricsConfig { | TestCreateOrUpdateServerMetricsConfig201Response | TestCreateOrUpdateServerMetricsConfigDefaultResponse >; - /** Get server metric configuration for the given test. */ + /** List server metrics configuration for the given test. */ get( - options?: TestGetServerMetricsConfigParameters + options?: TestListServerMetricsConfigParameters ): StreamableMethod< - TestGetServerMetricsConfig200Response | TestGetServerMetricsConfigDefaultResponse + TestListServerMetricsConfig200Response | TestListServerMetricsConfigDefaultResponse >; } @@ -210,7 +210,7 @@ export interface TestRunStop { } export interface TestRunListMetricNamespaces { - /** Lists the metric namespaces for a load test run. */ + /** List the metric namespaces for a load test run. */ get( options?: TestRunListMetricNamespacesParameters ): StreamableMethod< @@ -219,7 +219,7 @@ export interface TestRunListMetricNamespaces { } export interface TestRunListMetricDefinitions { - /** Lists the metric definitions for a load test run. */ + /** List the metric definitions for a load test run. */ get( options: TestRunListMetricDefinitionsParameters ): StreamableMethod< @@ -227,35 +227,37 @@ export interface TestRunListMetricDefinitions { >; } -export interface TestRunGetMetrics { - /** Lists the metric values for a load test run. */ +export interface TestRunListMetrics { + /** List the metric values for a load test run. */ post( - options: TestRunGetMetricsParameters - ): StreamableMethod; + options: TestRunListMetricsParameters + ): StreamableMethod; } -export interface TestRunGetMetricDimensionValues { - /** Lists the dimension values for the given metric dimension name. */ +export interface TestRunListMetricDimensionValues { + /** List the dimension values for the given metric dimension name. */ get( - options: TestRunGetMetricDimensionValuesParameters + options: TestRunListMetricDimensionValuesParameters ): StreamableMethod< - TestRunGetMetricDimensionValues200Response | TestRunGetMetricDimensionValuesDefaultResponse + TestRunListMetricDimensionValues200Response | TestRunListMetricDimensionValuesDefaultResponse >; } -export interface TestRunCreateOrUpdateAppComponent { +export interface TestRunCreateOrUpdateAppComponents { /** Associate an app component (collection of azure resources) to a test run */ patch( - options: TestRunCreateOrUpdateAppComponentParameters + options: TestRunCreateOrUpdateAppComponentsParameters ): StreamableMethod< - | TestRunCreateOrUpdateAppComponent200Response - | TestRunCreateOrUpdateAppComponent201Response - | TestRunCreateOrUpdateAppComponentDefaultResponse + | TestRunCreateOrUpdateAppComponents200Response + | TestRunCreateOrUpdateAppComponents201Response + | TestRunCreateOrUpdateAppComponentsDefaultResponse >; /** Get associated app component (collection of azure resources) for the given test run. */ get( - options?: TestRunGetAppComponentsParameters - ): StreamableMethod; + options?: TestRunListAppComponentsParameters + ): StreamableMethod< + TestRunListAppComponents200Response | TestRunListAppComponentsDefaultResponse + >; } export interface TestRunCreateOrUpdateServerMetricsConfig { @@ -267,11 +269,11 @@ export interface TestRunCreateOrUpdateServerMetricsConfig { | TestRunCreateOrUpdateServerMetricsConfig201Response | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse >; - /** Get server metric configuration for the given test run. */ + /** List server metrics configuration for the given test run. */ get( - options?: TestRunGetServerMetricsConfigParameters + options?: TestRunListServerMetricsConfigParameters ): StreamableMethod< - TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigDefaultResponse + TestRunListServerMetricsConfig200Response | TestRunListServerMetricsConfigDefaultResponse >; } @@ -285,10 +287,10 @@ export interface Routes { /** Resource for '/tests/\{testId\}/files' has methods for the following verbs: get */ (path: "/tests/{testId}/files", testId: string): TestListFiles; /** Resource for '/tests/\{testId\}/app-components' has methods for the following verbs: patch, get */ - (path: "/tests/{testId}/app-components", testId: string): TestCreateOrUpdateAppComponent; - /** Resource for '/tests/\{testId\}/server-metric-configs' has methods for the following verbs: patch, get */ + (path: "/tests/{testId}/app-components", testId: string): TestCreateOrUpdateAppComponents; + /** Resource for '/tests/\{testId\}/server-metrics-config' has methods for the following verbs: patch, get */ ( - path: "/tests/{testId}/server-metric-configs", + path: "/tests/{testId}/server-metrics-config", testId: string ): TestCreateOrUpdateServerMetricsConfig; /** Resource for '/test-runs/\{testRunId\}' has methods for the following verbs: delete, patch, get */ @@ -314,21 +316,21 @@ export interface Routes { testRunId: string ): TestRunListMetricDefinitions; /** Resource for '/test-runs/\{testRunId\}/metrics' has methods for the following verbs: post */ - (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunGetMetrics; - /** Resource for '/test-runs/\{testRunId\}/metric-dimension/\{name\}/values' has methods for the following verbs: get */ + (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunListMetrics; + /** Resource for '/test-runs/\{testRunId\}/metric-dimensions/\{name\}/values' has methods for the following verbs: get */ ( - path: "/test-runs/{testRunId}/metric-dimension/{name}/values", + path: "/test-runs/{testRunId}/metric-dimensions/{name}/values", testRunId: string, name: string - ): TestRunGetMetricDimensionValues; + ): TestRunListMetricDimensionValues; /** Resource for '/test-runs/\{testRunId\}/app-components' has methods for the following verbs: patch, get */ ( path: "/test-runs/{testRunId}/app-components", testRunId: string - ): TestRunCreateOrUpdateAppComponent; - /** Resource for '/test-runs/\{testRunId\}/server-metric-configs' has methods for the following verbs: patch, get */ + ): TestRunCreateOrUpdateAppComponents; + /** Resource for '/test-runs/\{testRunId\}/server-metrics-config' has methods for the following verbs: patch, get */ ( - path: "/test-runs/{testRunId}/server-metric-configs", + path: "/test-runs/{testRunId}/server-metrics-config", testRunId: string ): TestRunCreateOrUpdateServerMetricsConfig; } diff --git a/sdk/loadtestservice/load-testing-rest/src/index.ts b/sdk/loadtestservice/load-testing-rest/src/index.ts index 9f16befced4e..f3218d4dd5f4 100644 --- a/sdk/loadtestservice/load-testing-rest/src/index.ts +++ b/sdk/loadtestservice/load-testing-rest/src/index.ts @@ -11,6 +11,4 @@ export * from "./isUnexpected"; export * from "./models"; export * from "./outputModels"; export * from "./paginateHelper"; -export * from "./beginFileValidation"; - export default AzureLoadTesting; diff --git a/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts b/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts index 3a973627bd6f..80cb61595245 100644 --- a/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts +++ b/sdk/loadtestservice/load-testing-rest/src/isUnexpected.ts @@ -19,16 +19,16 @@ import { TestDeleteFileDefaultResponse, TestListFiles200Response, TestListFilesDefaultResponse, - TestCreateOrUpdateAppComponent200Response, - TestCreateOrUpdateAppComponent201Response, - TestCreateOrUpdateAppComponentDefaultResponse, - TestGetAppComponents200Response, - TestGetAppComponentsDefaultResponse, + TestCreateOrUpdateAppComponents200Response, + TestCreateOrUpdateAppComponents201Response, + TestCreateOrUpdateAppComponentsDefaultResponse, + TestListAppComponents200Response, + TestListAppComponentsDefaultResponse, TestCreateOrUpdateServerMetricsConfig200Response, TestCreateOrUpdateServerMetricsConfig201Response, TestCreateOrUpdateServerMetricsConfigDefaultResponse, - TestGetServerMetricsConfig200Response, - TestGetServerMetricsConfigDefaultResponse, + TestListServerMetricsConfig200Response, + TestListServerMetricsConfigDefaultResponse, TestRunDelete204Response, TestRunDeleteDefaultResponse, TestRunCreateOrUpdate200Response, @@ -46,20 +46,20 @@ import { TestRunListMetricNamespacesDefaultResponse, TestRunListMetricDefinitions200Response, TestRunListMetricDefinitionsDefaultResponse, - TestRunGetMetrics200Response, - TestRunGetMetricsDefaultResponse, - TestRunGetMetricDimensionValues200Response, - TestRunGetMetricDimensionValuesDefaultResponse, - TestRunCreateOrUpdateAppComponent200Response, - TestRunCreateOrUpdateAppComponent201Response, - TestRunCreateOrUpdateAppComponentDefaultResponse, - TestRunGetAppComponents200Response, - TestRunGetAppComponentsDefaultResponse, + TestRunListMetrics200Response, + TestRunListMetricsDefaultResponse, + TestRunListMetricDimensionValues200Response, + TestRunListMetricDimensionValuesDefaultResponse, + TestRunCreateOrUpdateAppComponents200Response, + TestRunCreateOrUpdateAppComponents201Response, + TestRunCreateOrUpdateAppComponentsDefaultResponse, + TestRunListAppComponents200Response, + TestRunListAppComponentsDefaultResponse, TestRunCreateOrUpdateServerMetricsConfig200Response, TestRunCreateOrUpdateServerMetricsConfig201Response, TestRunCreateOrUpdateServerMetricsConfigDefaultResponse, - TestRunGetServerMetricsConfig200Response, - TestRunGetServerMetricsConfigDefaultResponse, + TestRunListServerMetricsConfig200Response, + TestRunListServerMetricsConfigDefaultResponse, } from "./responses"; const responseMap: Record = { @@ -73,8 +73,8 @@ const responseMap: Record = { "GET /tests/{testId}/files": ["200"], "PATCH /tests/{testId}/app-components": ["200", "201"], "GET /tests/{testId}/app-components": ["200"], - "PATCH /tests/{testId}/server-metric-configs": ["200", "201"], - "GET /tests/{testId}/server-metric-configs": ["200"], + "PATCH /tests/{testId}/server-metrics-config": ["200", "201"], + "GET /tests/{testId}/server-metrics-config": ["200"], "DELETE /test-runs/{testRunId}": ["204"], "PATCH /test-runs/{testRunId}": ["200", "201"], "GET /test-runs/{testRunId}": ["200"], @@ -84,11 +84,11 @@ const responseMap: Record = { "GET /test-runs/{testRunId}/metric-namespaces": ["200"], "GET /test-runs/{testRunId}/metric-definitions": ["200"], "POST /test-runs/{testRunId}/metrics": ["200"], - "GET /test-runs/{testRunId}/metric-dimension/{name}/values": ["200"], + "GET /test-runs/{testRunId}/metric-dimensions/{name}/values": ["200"], "PATCH /test-runs/{testRunId}/app-components": ["200", "201"], "GET /test-runs/{testRunId}/app-components": ["200"], - "PATCH /test-runs/{testRunId}/server-metric-configs": ["200", "201"], - "GET /test-runs/{testRunId}/server-metric-configs": ["200"], + "PATCH /test-runs/{testRunId}/server-metrics-config": ["200", "201"], + "GET /test-runs/{testRunId}/server-metrics-config": ["200"], }; export function isUnexpected( @@ -120,13 +120,13 @@ export function isUnexpected( ): response is TestListFilesDefaultResponse; export function isUnexpected( response: - | TestCreateOrUpdateAppComponent200Response - | TestCreateOrUpdateAppComponent201Response - | TestCreateOrUpdateAppComponentDefaultResponse -): response is TestCreateOrUpdateAppComponentDefaultResponse; + | TestCreateOrUpdateAppComponents200Response + | TestCreateOrUpdateAppComponents201Response + | TestCreateOrUpdateAppComponentsDefaultResponse +): response is TestCreateOrUpdateAppComponentsDefaultResponse; export function isUnexpected( - response: TestGetAppComponents200Response | TestGetAppComponentsDefaultResponse -): response is TestGetAppComponentsDefaultResponse; + response: TestListAppComponents200Response | TestListAppComponentsDefaultResponse +): response is TestListAppComponentsDefaultResponse; export function isUnexpected( response: | TestCreateOrUpdateServerMetricsConfig200Response @@ -134,8 +134,8 @@ export function isUnexpected( | TestCreateOrUpdateServerMetricsConfigDefaultResponse ): response is TestCreateOrUpdateServerMetricsConfigDefaultResponse; export function isUnexpected( - response: TestGetServerMetricsConfig200Response | TestGetServerMetricsConfigDefaultResponse -): response is TestGetServerMetricsConfigDefaultResponse; + response: TestListServerMetricsConfig200Response | TestListServerMetricsConfigDefaultResponse +): response is TestListServerMetricsConfigDefaultResponse; export function isUnexpected( response: TestRunDelete204Response | TestRunDeleteDefaultResponse ): response is TestRunDeleteDefaultResponse; @@ -164,22 +164,22 @@ export function isUnexpected( response: TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsDefaultResponse ): response is TestRunListMetricDefinitionsDefaultResponse; export function isUnexpected( - response: TestRunGetMetrics200Response | TestRunGetMetricsDefaultResponse -): response is TestRunGetMetricsDefaultResponse; + response: TestRunListMetrics200Response | TestRunListMetricsDefaultResponse +): response is TestRunListMetricsDefaultResponse; export function isUnexpected( response: - | TestRunGetMetricDimensionValues200Response - | TestRunGetMetricDimensionValuesDefaultResponse -): response is TestRunGetMetricDimensionValuesDefaultResponse; + | TestRunListMetricDimensionValues200Response + | TestRunListMetricDimensionValuesDefaultResponse +): response is TestRunListMetricDimensionValuesDefaultResponse; export function isUnexpected( response: - | TestRunCreateOrUpdateAppComponent200Response - | TestRunCreateOrUpdateAppComponent201Response - | TestRunCreateOrUpdateAppComponentDefaultResponse -): response is TestRunCreateOrUpdateAppComponentDefaultResponse; + | TestRunCreateOrUpdateAppComponents200Response + | TestRunCreateOrUpdateAppComponents201Response + | TestRunCreateOrUpdateAppComponentsDefaultResponse +): response is TestRunCreateOrUpdateAppComponentsDefaultResponse; export function isUnexpected( - response: TestRunGetAppComponents200Response | TestRunGetAppComponentsDefaultResponse -): response is TestRunGetAppComponentsDefaultResponse; + response: TestRunListAppComponents200Response | TestRunListAppComponentsDefaultResponse +): response is TestRunListAppComponentsDefaultResponse; export function isUnexpected( response: | TestRunCreateOrUpdateServerMetricsConfig200Response @@ -187,8 +187,10 @@ export function isUnexpected( | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse ): response is TestRunCreateOrUpdateServerMetricsConfigDefaultResponse; export function isUnexpected( - response: TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigDefaultResponse -): response is TestRunGetServerMetricsConfigDefaultResponse; + response: + | TestRunListServerMetricsConfig200Response + | TestRunListServerMetricsConfigDefaultResponse +): response is TestRunListServerMetricsConfigDefaultResponse; export function isUnexpected( response: | TestCreateOrUpdate200Response @@ -208,16 +210,16 @@ export function isUnexpected( | TestDeleteFileDefaultResponse | TestListFiles200Response | TestListFilesDefaultResponse - | TestCreateOrUpdateAppComponent200Response - | TestCreateOrUpdateAppComponent201Response - | TestCreateOrUpdateAppComponentDefaultResponse - | TestGetAppComponents200Response - | TestGetAppComponentsDefaultResponse + | TestCreateOrUpdateAppComponents200Response + | TestCreateOrUpdateAppComponents201Response + | TestCreateOrUpdateAppComponentsDefaultResponse + | TestListAppComponents200Response + | TestListAppComponentsDefaultResponse | TestCreateOrUpdateServerMetricsConfig200Response | TestCreateOrUpdateServerMetricsConfig201Response | TestCreateOrUpdateServerMetricsConfigDefaultResponse - | TestGetServerMetricsConfig200Response - | TestGetServerMetricsConfigDefaultResponse + | TestListServerMetricsConfig200Response + | TestListServerMetricsConfigDefaultResponse | TestRunDelete204Response | TestRunDeleteDefaultResponse | TestRunCreateOrUpdate200Response @@ -235,20 +237,20 @@ export function isUnexpected( | TestRunListMetricNamespacesDefaultResponse | TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsDefaultResponse - | TestRunGetMetrics200Response - | TestRunGetMetricsDefaultResponse - | TestRunGetMetricDimensionValues200Response - | TestRunGetMetricDimensionValuesDefaultResponse - | TestRunCreateOrUpdateAppComponent200Response - | TestRunCreateOrUpdateAppComponent201Response - | TestRunCreateOrUpdateAppComponentDefaultResponse - | TestRunGetAppComponents200Response - | TestRunGetAppComponentsDefaultResponse + | TestRunListMetrics200Response + | TestRunListMetricsDefaultResponse + | TestRunListMetricDimensionValues200Response + | TestRunListMetricDimensionValuesDefaultResponse + | TestRunCreateOrUpdateAppComponents200Response + | TestRunCreateOrUpdateAppComponents201Response + | TestRunCreateOrUpdateAppComponentsDefaultResponse + | TestRunListAppComponents200Response + | TestRunListAppComponentsDefaultResponse | TestRunCreateOrUpdateServerMetricsConfig200Response | TestRunCreateOrUpdateServerMetricsConfig201Response | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse - | TestRunGetServerMetricsConfig200Response - | TestRunGetServerMetricsConfigDefaultResponse + | TestRunListServerMetricsConfig200Response + | TestRunListServerMetricsConfigDefaultResponse ): response is | TestCreateOrUpdateDefaultResponse | TestDeleteDefaultResponse @@ -258,10 +260,10 @@ export function isUnexpected( | TestGetFileDefaultResponse | TestDeleteFileDefaultResponse | TestListFilesDefaultResponse - | TestCreateOrUpdateAppComponentDefaultResponse - | TestGetAppComponentsDefaultResponse + | TestCreateOrUpdateAppComponentsDefaultResponse + | TestListAppComponentsDefaultResponse | TestCreateOrUpdateServerMetricsConfigDefaultResponse - | TestGetServerMetricsConfigDefaultResponse + | TestListServerMetricsConfigDefaultResponse | TestRunDeleteDefaultResponse | TestRunCreateOrUpdateDefaultResponse | TestRunGetDefaultResponse @@ -270,12 +272,12 @@ export function isUnexpected( | TestRunStopDefaultResponse | TestRunListMetricNamespacesDefaultResponse | TestRunListMetricDefinitionsDefaultResponse - | TestRunGetMetricsDefaultResponse - | TestRunGetMetricDimensionValuesDefaultResponse - | TestRunCreateOrUpdateAppComponentDefaultResponse - | TestRunGetAppComponentsDefaultResponse + | TestRunListMetricsDefaultResponse + | TestRunListMetricDimensionValuesDefaultResponse + | TestRunCreateOrUpdateAppComponentsDefaultResponse + | TestRunListAppComponentsDefaultResponse | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse - | TestRunGetServerMetricsConfigDefaultResponse { + | TestRunListServerMetricsConfigDefaultResponse { const lroOriginal = response.headers["x-ms-original-url"]; const url = new URL(lroOriginal ?? response.request.url); const method = response.request.method; diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 7b7710872dad..32fe15484e6f 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -1,10 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { OperationState, SimplePollerLike } from "@azure/core-lro"; -import { CommonClientOptions, OperationOptions } from "@azure/core-client"; -import { TestUploadFile201Response } from "./responses" - /** Load test model */ export interface Test { /** Pass fail criteria for a test. */ @@ -128,7 +124,7 @@ export interface FileInfo { /** File URL. */ url?: string; /** Name of the file. */ - filename?: string; + fileName?: string; /** File type */ fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; /** Expiry time of the file (ISO 8601 literal format) */ @@ -140,14 +136,16 @@ export interface FileInfo { | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED"; + /** Validation failure error details */ + validationFailureDetails?: string; } /** Test app component */ export interface TestAppComponents { - /** Test identifier */ - testId?: string; /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ components: Record; + /** Test identifier */ + testId?: string; /** The creation datetime(ISO 8601 literal format). */ createdDateTime?: Date | string; /** The user that created. */ @@ -176,7 +174,7 @@ export interface AppComponent { kind?: string; } -/** Test server metric configuration */ +/** Test server metrics configuration */ export interface TestServerMetricConfig { /** Test identifier */ testId?: string; @@ -232,6 +230,8 @@ export interface TestRun { testArtifacts?: TestRunArtifacts; /** Test result for pass/Fail criteria used during the test run. */ testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED"; + /** Number of virtual users, for which test has been run. */ + virtualUsers?: number; /** Unique test run name as identifier */ testRunId?: string; /** Display name of a testRun. */ @@ -264,8 +264,6 @@ export interface TestRun { endDateTime?: Date | string; /** Test run initiated time. */ executedDateTime?: Date | string; - /** Number of virtual users, for which test has been run. */ - virtualUsers?: number; /** Portal url. */ portalUrl?: string; /** Test run duration in milliseconds. */ @@ -345,9 +343,9 @@ export interface TestRunInputArtifacts { /** The output artifacts for the test run. */ export interface TestRunOutputArtifacts { /** File info */ - resultUrl?: FileInfo; + resultFileInfo?: FileInfo; /** File info */ - logsUrl?: FileInfo; + logsFileInfo?: FileInfo; } /** Filters to fetch the set of metric */ @@ -366,10 +364,10 @@ export interface DimensionFilter { /** Test run app component */ export interface TestRunAppComponents { - /** Test run identifier */ - testRunId?: string; /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ components: Record; + /** Test run identifier */ + testRunId?: string; /** The creation datetime(ISO 8601 literal format). */ createdDateTime?: Date | string; /** The user that created. */ @@ -380,7 +378,7 @@ export interface TestRunAppComponents { lastModifiedBy?: string; } -/** Test run server metric configuration */ +/** Test run server metrics configuration */ export interface TestRunServerMetricConfig { /** Test run identifier */ testRunId?: string; @@ -395,18 +393,3 @@ export interface TestRunServerMetricConfig { /** The user that last modified. */ lastModifiedBy?: string; } - -/** - * Describes a poller for NotificationHubJob types. - */ -export type FileUploadAndValidatePoller = SimplePollerLike< - OperationState, - TestUploadFile201Response ->; - -export interface PolledOperationOptions extends OperationOptions { - /** - * Time delay between poll requests, in milliseconds. - */ - updateIntervalInMs?: number; -} diff --git a/sdk/loadtestservice/load-testing-rest/src/outputModels.ts b/sdk/loadtestservice/load-testing-rest/src/outputModels.ts index d225da909090..6b117ce1e44f 100644 --- a/sdk/loadtestservice/load-testing-rest/src/outputModels.ts +++ b/sdk/loadtestservice/load-testing-rest/src/outputModels.ts @@ -124,7 +124,7 @@ export interface FileInfoOutput { /** File URL. */ url?: string; /** Name of the file. */ - filename?: string; + fileName?: string; /** File type */ fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; /** Expiry time of the file (ISO 8601 literal format) */ @@ -136,6 +136,8 @@ export interface FileInfoOutput { | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED"; + /** Validation failure error details */ + validationFailureDetails?: string; } /** The definition of an error object. */ @@ -174,10 +176,10 @@ export interface FileInfoListOutput { /** Test app component */ export interface TestAppComponentsOutput { - /** Test identifier */ - testId?: string; /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ components: Record; + /** Test identifier */ + testId?: string; /** The creation datetime(ISO 8601 literal format). */ createdDateTime?: string; /** The user that created. */ @@ -206,7 +208,7 @@ export interface AppComponentOutput { kind?: string; } -/** Test server metric configuration */ +/** Test server metrics configuration */ export interface TestServerMetricConfigOutput { /** Test identifier */ testId?: string; @@ -262,6 +264,8 @@ export interface TestRunOutput { testArtifacts?: TestRunArtifactsOutput; /** Test result for pass/Fail criteria used during the test run. */ testResult?: "PASSED" | "NOT_APPLICABLE" | "FAILED"; + /** Number of virtual users, for which test has been run. */ + virtualUsers?: number; /** Unique test run name as identifier */ testRunId?: string; /** Display name of a testRun. */ @@ -294,8 +298,6 @@ export interface TestRunOutput { endDateTime?: string; /** Test run initiated time. */ executedDateTime?: string; - /** Number of virtual users, for which test has been run. */ - virtualUsers?: number; /** Portal url. */ portalUrl?: string; /** Test run duration in milliseconds. */ @@ -375,9 +377,9 @@ export interface TestRunInputArtifactsOutput { /** The output artifacts for the test run. */ export interface TestRunOutputArtifactsOutput { /** File info */ - resultUrl?: FileInfoOutput; + resultFileInfo?: FileInfoOutput; /** File info */ - logsUrl?: FileInfoOutput; + logsFileInfo?: FileInfoOutput; } /** Collection of test runs */ @@ -499,10 +501,10 @@ export interface DimensionValueListOutput { /** Test run app component */ export interface TestRunAppComponentsOutput { - /** Test run identifier */ - testRunId?: string; /** Azure resource collection { resource id (fully qualified resource Id e.g subscriptions/{subId}/resourceGroups/{rg}/providers/Microsoft.LoadTestService/loadtests/{resName}) : resource object } */ components: Record; + /** Test run identifier */ + testRunId?: string; /** The creation datetime(ISO 8601 literal format). */ createdDateTime?: string; /** The user that created. */ @@ -513,7 +515,7 @@ export interface TestRunAppComponentsOutput { lastModifiedBy?: string; } -/** Test run server metric configuration */ +/** Test run server metrics configuration */ export interface TestRunServerMetricConfigOutput { /** Test run identifier */ testRunId?: string; diff --git a/sdk/loadtestservice/load-testing-rest/src/parameters.ts b/sdk/loadtestservice/load-testing-rest/src/parameters.ts index 8deefade619a..8ed525826295 100644 --- a/sdk/loadtestservice/load-testing-rest/src/parameters.ts +++ b/sdk/loadtestservice/load-testing-rest/src/parameters.ts @@ -31,7 +31,7 @@ export type TestGetParameters = RequestParameters; export interface TestListQueryParamProperties { /** Sort on the supported fields in (field asc/desc) format. eg: lastModifiedDateTime asc. Supported fields - lastModifiedDateTime */ orderby?: string; - /** Prefix based, case sensitive search on searchable fields - testId, createdBy. */ + /** Prefix based, case sensitive search on searchable fields - displayName, createdBy. For example, to search for a test, with display name is Login Test, the search parameter can be Login. */ search?: string; /** Start DateTime(ISO 8601 literal format) of the last updated time range to filter tests. */ lastModifiedStartTime?: Date | string; @@ -90,20 +90,20 @@ export interface TestListFilesQueryParam { export type TestListFilesParameters = TestListFilesQueryParam & RequestParameters; -export interface TestCreateOrUpdateAppComponentBodyParam { +export interface TestCreateOrUpdateAppComponentsBodyParam { /** App Component model. */ body: TestAppComponents; } -export interface TestCreateOrUpdateAppComponentMediaTypesParam { +export interface TestCreateOrUpdateAppComponentsMediaTypesParam { /** Request content type */ contentType?: "application/merge-patch+json"; } -export type TestCreateOrUpdateAppComponentParameters = TestCreateOrUpdateAppComponentMediaTypesParam & - TestCreateOrUpdateAppComponentBodyParam & +export type TestCreateOrUpdateAppComponentsParameters = TestCreateOrUpdateAppComponentsMediaTypesParam & + TestCreateOrUpdateAppComponentsBodyParam & RequestParameters; -export type TestGetAppComponentsParameters = RequestParameters; +export type TestListAppComponentsParameters = RequestParameters; export interface TestCreateOrUpdateServerMetricsConfigBodyParam { /** Server metric configuration model. */ @@ -118,7 +118,7 @@ export interface TestCreateOrUpdateServerMetricsConfigMediaTypesParam { export type TestCreateOrUpdateServerMetricsConfigParameters = TestCreateOrUpdateServerMetricsConfigMediaTypesParam & TestCreateOrUpdateServerMetricsConfigBodyParam & RequestParameters; -export type TestGetServerMetricsConfigParameters = RequestParameters; +export type TestListServerMetricsConfigParameters = RequestParameters; export type TestRunDeleteParameters = RequestParameters; export interface TestRunCreateOrUpdateBodyParam { @@ -152,7 +152,7 @@ export interface TestRunListQueryParamProperties { orderby?: string; /** Continuation token to get the next page of response */ continuationToken?: string; - /** Prefix based, case sensitive search on searchable fields - description, executedUser. */ + /** 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. */ search?: string; /** Unique name of an existing load test. */ testId?: string; @@ -186,12 +186,12 @@ export interface TestRunListMetricDefinitionsQueryParam { export type TestRunListMetricDefinitionsParameters = TestRunListMetricDefinitionsQueryParam & RequestParameters; -export interface TestRunGetMetricsBodyParam { +export interface TestRunListMetricsBodyParam { /** Metric dimension filter */ body?: MetricRequestPayload; } -export interface TestRunGetMetricsQueryParamProperties { +export interface TestRunListMetricsQueryParamProperties { /** The aggregation */ aggregation?: string; /** The interval (i.e. timegrain) of the query. */ @@ -204,21 +204,21 @@ export interface TestRunGetMetricsQueryParamProperties { timespan: string; } -export interface TestRunGetMetricsQueryParam { - queryParameters: TestRunGetMetricsQueryParamProperties; +export interface TestRunListMetricsQueryParam { + queryParameters: TestRunListMetricsQueryParamProperties; } -export interface TestRunGetMetricsMediaTypesParam { +export interface TestRunListMetricsMediaTypesParam { /** Request content type */ contentType?: "application/json"; } -export type TestRunGetMetricsParameters = TestRunGetMetricsQueryParam & - TestRunGetMetricsMediaTypesParam & - TestRunGetMetricsBodyParam & +export type TestRunListMetricsParameters = TestRunListMetricsQueryParam & + TestRunListMetricsMediaTypesParam & + TestRunListMetricsBodyParam & RequestParameters; -export interface TestRunGetMetricDimensionValuesQueryParamProperties { +export interface TestRunListMetricDimensionValuesQueryParamProperties { /** The interval (i.e. timegrain) of the query. */ interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; /** Metric name */ @@ -229,27 +229,27 @@ export interface TestRunGetMetricDimensionValuesQueryParamProperties { timespan: string; } -export interface TestRunGetMetricDimensionValuesQueryParam { - queryParameters: TestRunGetMetricDimensionValuesQueryParamProperties; +export interface TestRunListMetricDimensionValuesQueryParam { + queryParameters: TestRunListMetricDimensionValuesQueryParamProperties; } -export type TestRunGetMetricDimensionValuesParameters = TestRunGetMetricDimensionValuesQueryParam & +export type TestRunListMetricDimensionValuesParameters = TestRunListMetricDimensionValuesQueryParam & RequestParameters; -export interface TestRunCreateOrUpdateAppComponentBodyParam { +export interface TestRunCreateOrUpdateAppComponentsBodyParam { /** App Component model. */ body: TestRunAppComponents; } -export interface TestRunCreateOrUpdateAppComponentMediaTypesParam { +export interface TestRunCreateOrUpdateAppComponentsMediaTypesParam { /** Request content type */ contentType?: "application/merge-patch+json"; } -export type TestRunCreateOrUpdateAppComponentParameters = TestRunCreateOrUpdateAppComponentMediaTypesParam & - TestRunCreateOrUpdateAppComponentBodyParam & +export type TestRunCreateOrUpdateAppComponentsParameters = TestRunCreateOrUpdateAppComponentsMediaTypesParam & + TestRunCreateOrUpdateAppComponentsBodyParam & RequestParameters; -export type TestRunGetAppComponentsParameters = RequestParameters; +export type TestRunListAppComponentsParameters = RequestParameters; export interface TestRunCreateOrUpdateServerMetricsConfigBodyParam { /** Server metric configuration model. */ @@ -264,4 +264,4 @@ export interface TestRunCreateOrUpdateServerMetricsConfigMediaTypesParam { export type TestRunCreateOrUpdateServerMetricsConfigParameters = TestRunCreateOrUpdateServerMetricsConfigMediaTypesParam & TestRunCreateOrUpdateServerMetricsConfigBodyParam & RequestParameters; -export type TestRunGetServerMetricsConfigParameters = RequestParameters; +export type TestRunListServerMetricsConfigParameters = RequestParameters; diff --git a/sdk/loadtestservice/load-testing-rest/src/responses.ts b/sdk/loadtestservice/load-testing-rest/src/responses.ts index 354fe5f35e60..1f47b6e230de 100644 --- a/sdk/loadtestservice/load-testing-rest/src/responses.ts +++ b/sdk/loadtestservice/load-testing-rest/src/responses.ts @@ -172,45 +172,45 @@ export interface TestListFilesDefaultResponse extends HttpResponse { } /** Associate an app component (collection of azure resources) to a test */ -export interface TestCreateOrUpdateAppComponent200Response extends HttpResponse { +export interface TestCreateOrUpdateAppComponents200Response extends HttpResponse { status: "200"; body: TestAppComponentsOutput; } /** Associate an app component (collection of azure resources) to a test */ -export interface TestCreateOrUpdateAppComponent201Response extends HttpResponse { +export interface TestCreateOrUpdateAppComponents201Response extends HttpResponse { status: "201"; body: TestAppComponentsOutput; } -export interface TestCreateOrUpdateAppComponentDefaultHeaders { +export interface TestCreateOrUpdateAppComponentsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Associate an app component (collection of azure resources) to a test */ -export interface TestCreateOrUpdateAppComponentDefaultResponse extends HttpResponse { +export interface TestCreateOrUpdateAppComponentsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestCreateOrUpdateAppComponentDefaultHeaders; + headers: RawHttpHeaders & TestCreateOrUpdateAppComponentsDefaultHeaders; } /** Get associated app component (collection of azure resources) for the given test. */ -export interface TestGetAppComponents200Response extends HttpResponse { +export interface TestListAppComponents200Response extends HttpResponse { status: "200"; body: TestAppComponentsOutput; } -export interface TestGetAppComponentsDefaultHeaders { +export interface TestListAppComponentsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get associated app component (collection of azure resources) for the given test. */ -export interface TestGetAppComponentsDefaultResponse extends HttpResponse { +export interface TestListAppComponentsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestGetAppComponentsDefaultHeaders; + headers: RawHttpHeaders & TestListAppComponentsDefaultHeaders; } /** Configure server metrics for a test */ @@ -237,22 +237,22 @@ export interface TestCreateOrUpdateServerMetricsConfigDefaultResponse extends Ht headers: RawHttpHeaders & TestCreateOrUpdateServerMetricsConfigDefaultHeaders; } -/** Get server metric configuration for the given test. */ -export interface TestGetServerMetricsConfig200Response extends HttpResponse { +/** List server metrics configuration for the given test. */ +export interface TestListServerMetricsConfig200Response extends HttpResponse { status: "200"; body: TestServerMetricConfigOutput; } -export interface TestGetServerMetricsConfigDefaultHeaders { +export interface TestListServerMetricsConfigDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get server metric configuration for the given test. */ -export interface TestGetServerMetricsConfigDefaultResponse extends HttpResponse { +/** List server metrics configuration for the given test. */ +export interface TestListServerMetricsConfigDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestGetServerMetricsConfigDefaultHeaders; + headers: RawHttpHeaders & TestListServerMetricsConfigDefaultHeaders; } /** Delete a test run by its name. */ @@ -369,7 +369,7 @@ export interface TestRunStopDefaultResponse extends HttpResponse { headers: RawHttpHeaders & TestRunStopDefaultHeaders; } -/** Lists the metric namespaces for a load test run. */ +/** List the metric namespaces for a load test run. */ export interface TestRunListMetricNamespaces200Response extends HttpResponse { status: "200"; body: MetricNamespaceCollectionOutput; @@ -380,14 +380,14 @@ export interface TestRunListMetricNamespacesDefaultHeaders { "x-ms-error-code"?: string; } -/** Lists the metric namespaces for a load test run. */ +/** List the metric namespaces for a load test run. */ export interface TestRunListMetricNamespacesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & TestRunListMetricNamespacesDefaultHeaders; } -/** Lists the metric definitions for a load test run. */ +/** List the metric definitions for a load test run. */ export interface TestRunListMetricDefinitions200Response extends HttpResponse { status: "200"; body: MetricDefinitionCollectionOutput; @@ -398,89 +398,89 @@ export interface TestRunListMetricDefinitionsDefaultHeaders { "x-ms-error-code"?: string; } -/** Lists the metric definitions for a load test run. */ +/** List the metric definitions for a load test run. */ export interface TestRunListMetricDefinitionsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; headers: RawHttpHeaders & TestRunListMetricDefinitionsDefaultHeaders; } -/** Lists the metric values for a load test run. */ -export interface TestRunGetMetrics200Response extends HttpResponse { +/** List the metric values for a load test run. */ +export interface TestRunListMetrics200Response extends HttpResponse { status: "200"; body: MetricsOutput; } -export interface TestRunGetMetricsDefaultHeaders { +export interface TestRunListMetricsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Lists the metric values for a load test run. */ -export interface TestRunGetMetricsDefaultResponse extends HttpResponse { +/** List the metric values for a load test run. */ +export interface TestRunListMetricsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetMetricsDefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricsDefaultHeaders; } -/** Lists the dimension values for the given metric dimension name. */ -export interface TestRunGetMetricDimensionValues200Response extends HttpResponse { +/** List the dimension values for the given metric dimension name. */ +export interface TestRunListMetricDimensionValues200Response extends HttpResponse { status: "200"; body: DimensionValueListOutput; } -export interface TestRunGetMetricDimensionValuesDefaultHeaders { +export interface TestRunListMetricDimensionValuesDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Lists the dimension values for the given metric dimension name. */ -export interface TestRunGetMetricDimensionValuesDefaultResponse extends HttpResponse { +/** List the dimension values for the given metric dimension name. */ +export interface TestRunListMetricDimensionValuesDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetMetricDimensionValuesDefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricDimensionValuesDefaultHeaders; } /** Associate an app component (collection of azure resources) to a test run */ -export interface TestRunCreateOrUpdateAppComponent200Response extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponents200Response extends HttpResponse { status: "200"; body: TestRunAppComponentsOutput; } /** Associate an app component (collection of azure resources) to a test run */ -export interface TestRunCreateOrUpdateAppComponent201Response extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponents201Response extends HttpResponse { status: "201"; body: TestRunAppComponentsOutput; } -export interface TestRunCreateOrUpdateAppComponentDefaultHeaders { +export interface TestRunCreateOrUpdateAppComponentsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Associate an app component (collection of azure resources) to a test run */ -export interface TestRunCreateOrUpdateAppComponentDefaultResponse extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponentsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentDefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentsDefaultHeaders; } /** Get associated app component (collection of azure resources) for the given test run. */ -export interface TestRunGetAppComponents200Response extends HttpResponse { +export interface TestRunListAppComponents200Response extends HttpResponse { status: "200"; body: TestRunAppComponentsOutput; } -export interface TestRunGetAppComponentsDefaultHeaders { +export interface TestRunListAppComponentsDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } /** Get associated app component (collection of azure resources) for the given test run. */ -export interface TestRunGetAppComponentsDefaultResponse extends HttpResponse { +export interface TestRunListAppComponentsDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetAppComponentsDefaultHeaders; + headers: RawHttpHeaders & TestRunListAppComponentsDefaultHeaders; } /** Configure server metrics for a test run */ @@ -507,20 +507,20 @@ export interface TestRunCreateOrUpdateServerMetricsConfigDefaultResponse extends headers: RawHttpHeaders & TestRunCreateOrUpdateServerMetricsConfigDefaultHeaders; } -/** Get server metric configuration for the given test run. */ -export interface TestRunGetServerMetricsConfig200Response extends HttpResponse { +/** List server metrics configuration for the given test run. */ +export interface TestRunListServerMetricsConfig200Response extends HttpResponse { status: "200"; body: TestRunServerMetricConfigOutput; } -export interface TestRunGetServerMetricsConfigDefaultHeaders { +export interface TestRunListServerMetricsConfigDefaultHeaders { /** The error code for specific error that occurred. */ "x-ms-error-code"?: string; } -/** Get server metric configuration for the given test run. */ -export interface TestRunGetServerMetricsConfigDefaultResponse extends HttpResponse { +/** List server metrics configuration for the given test run. */ +export interface TestRunListServerMetricsConfigDefaultResponse extends HttpResponse { status: string; body: ErrorResponseBodyOutput; - headers: RawHttpHeaders & TestRunGetServerMetricsConfigDefaultHeaders; + headers: RawHttpHeaders & TestRunListServerMetricsConfigDefaultHeaders; } From 8dd5fc92e0dd645eb9b7267b9b996fc01ac898b6 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 23 Nov 2022 19:32:37 +0530 Subject: [PATCH 18/60] added stop and delete samples --- .../createOrUpdateTestRunAndGetMetrics.ts | 21 ++++- .../load-testing-rest/samples-dev/sample.ts | 14 +++ .../load-testing-rest/samples-dev/stopTest.ts | 89 +++++++++++++++++++ 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts index 9aa08b17de37..43073f0cac92 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts @@ -1,5 +1,5 @@ /** - * This sample demonstrates how to run a test and get test status + * This sample demonstrates how to run a test and get test status * * @summary creates and run a loadtest * @azsdk-weight 10 @@ -18,6 +18,25 @@ async function main() { // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + // Creating the test run const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ contentType: "application/merge-patch+json", diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index e06289a9bf7c..4c1b5e57a52a 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -196,6 +196,20 @@ async function main() { console.log(metricsResult); console.log(getTestRunResult); + + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } + + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts new file mode 100644 index 000000000000..d93f01ea6c89 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts @@ -0,0 +1,89 @@ +/** + * This sample demonstrates how to run a test and get test status + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { v4 as uuidv4 } from "uuid"; + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testStatus = null; + var getTestRunResult; + const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "EXECUTING" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + if (testStatus == "EXECUTING") { + let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); + + if (isUnexpected(stopTestRunResult)) { + throw stopTestRunResult.body.error; + } + + console.log("Test run is stopped."); + } +} +main().catch(console.error); From e70fabc0dd4fdeff70b39321870f23044f4f203f Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 23 Nov 2022 22:31:16 +0530 Subject: [PATCH 19/60] Update sdk/loadtestservice/load-testing-rest/package.json Co-authored-by: Deyaaeldeen Almahallawi --- sdk/loadtestservice/load-testing-rest/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index ba1d5bfb8da5..2758efd596f6 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -76,7 +76,7 @@ "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0", - "@azure/core-lro": "~2.4.1" + "@azure/core-lro": "^2.4.1" }, "devDependencies": { "@azure-tools/test-credential": "~1.0.0", From 3571eb2e25e2b12ea24d034ed19a51d17aa13331 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 14 Dec 2022 09:53:19 +0530 Subject: [PATCH 20/60] added TestRun LRO --- .../load-testing-rest/package.json | 3 +- .../load-testing-rest/samples-dev/sample.ts | 1 + .../load-testing-rest/samples-dev/stopTest.ts | 2 +- .../src/beginTestRunStatus.ts | 175 ++++++++++++++++++ ...ation.ts => beginUploadAndValidateFile.ts} | 25 ++- .../load-testing-rest/src/models.ts | 24 +++ 6 files changed, 218 insertions(+), 12 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts rename sdk/loadtestservice/load-testing-rest/src/{beginFileValidation.ts => beginUploadAndValidateFile.ts} (90%) diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index ba1d5bfb8da5..d274705d8bb9 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -76,7 +76,8 @@ "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0", - "@azure/core-lro": "~2.4.1" + "@azure/core-lro": "~2.4.1", + "@azure/core-client": "1.6.1" }, "devDependencies": { "@azure-tools/test-credential": "~1.0.0", diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 4c1b5e57a52a..88464a540840 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -59,6 +59,7 @@ async function main() { } // Getting the Validation Status of file + // We need to validate JMX input script. let fileValidationResult; let validationStatus = null; diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts index d93f01ea6c89..e159d83efa19 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts @@ -54,7 +54,7 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - // Checking the test run status and printing metrics + // Checking the test run status var testStatus = null; var getTestRunResult; const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); diff --git a/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts b/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts new file mode 100644 index 000000000000..6850ec504ae4 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; +import { TestRunStatusPoller, PolledOperationOptions } from "./models"; +import { AzureLoadTestingClient } from "./index.js"; +import { TestRunGet200Response } from "./responses"; +import { isUnexpected } from "./isUnexpected"; + +/** + * Submits a Notification Hub job and creates a poller to poll for results. + * @param client - The Load Testing client. + * @param options - The operation options. + * @returns A poller which can be called to poll until completion of the job. + */ +export async function beginTestRunStatus( + client: AzureLoadTestingClient, + testRunId: string, + polledOperationOptions: PolledOperationOptions = {} +): Promise { + let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + //let TestRunStatusResponse: TestRunGet200Response; + + type Handler = (state: OperationState) => void; + + const state: OperationState = { + status: "notStarted", + }; + + const progressCallbacks = new Map(); + const processProgressCallbacks = async (): Promise => + progressCallbacks.forEach((h) => h(state)); + let resultPromise: Promise | undefined; + let cancelJob: (() => void) | undefined; + const abortController = new AbortController(); + const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; + + const poller: SimplePollerLike, TestRunGet200Response> = { + async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { + getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + + if (getTestRunResult.body.status === "FAILED") { + state.status = "failed"; + state.error = new Error(getTestRunResult.body.status); + } + + if ( + getTestRunResult.body.status === "CANCELLING" || + getTestRunResult.body.status === "CANCELLED" + ) { + state.status === "canceled"; + } + + if (getTestRunResult.body.status === "DONE") { + state.status = "succeeded"; + state.result = getTestRunResult; + } + + await processProgressCallbacks(); + + if (state.status === "canceled") { + throw new Error("Operation was canceled"); + } + if (state.status === "failed") { + throw state.error; + } + }, + + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise { + return (resultPromise ??= (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + const { signal: abortSignal } = inputAbortSignal + ? new AbortController([inputAbortSignal, abortController.signal]) + : abortController; + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + const delay = sleep(currentPollIntervalInMs, abortSignal); + cancelJob = () => abortController.abort(); + await delay; + await poller.poll({ abortSignal }); + } + } + switch (state.status) { + case "succeeded": { + return poller.getResult() as TestRunGet200Response; + } + case "canceled": { + throw new Error("Operation was canceled"); + } + case "failed": { + throw state.error; + } + case "notStarted": + case "running": { + // Unreachable + throw new Error(`polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = undefined; + })); + }, + + onProgress(callback: (state: OperationState) => void): CancelOnProgress { + const s = Symbol(); + progressCallbacks.set(s, callback); + + return () => progressCallbacks.delete(s); + }, + + isDone(): boolean { + return ["succeeded", "failed", "canceled"].includes(state.status); + }, + + stopPolling(): void { + abortController.abort(); + cancelJob?.(); + }, + + isStopped(): boolean { + return resultPromise === undefined; + }, + + getOperationState(): OperationState { + return state; + }, + + getResult(): TestRunGet200Response | undefined { + return state.result; + }, + + toString() { + return JSON.stringify({ state }); + }, + }; + + return poller; +} + +const REJECTED_ERR = new Error("The operation has been aborted"); + +function sleep(ms: number, signal: AbortSignalLike): Promise { + return new Promise((resolve, reject) => { + if (signal.aborted) { + reject(REJECTED_ERR); + return; + } + + const id = setTimeout(() => { + signal.removeEventListener("abort", onAbort); + + if (signal.aborted) { + reject(REJECTED_ERR); + return; + } + + resolve(); + }, ms); + + signal.addEventListener("abort", onAbort, { once: true }); + + function onAbort(): void { + clearTimeout(id); + reject(REJECTED_ERR); + } + }); +} diff --git a/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts similarity index 90% rename from sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts rename to sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts index 4aea63b878a0..13a4a7bd31a1 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginFileValidation.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts @@ -5,7 +5,11 @@ import { AbortController, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./index.js"; -import { TestUploadFile201Response } from "./responses"; +import { + TestGetFile200Response, + TestGetFileDefaultResponse, + TestUploadFile201Response, +} from "./responses"; import { isUnexpected } from "./isUnexpected"; import { ReadStream } from "fs"; @@ -32,7 +36,6 @@ export async function beginFileValidation( if (isUnexpected(fileUploadResult)) { throw fileUploadResult.body.error; } - let fileValidationResponse: TestUploadFile201Response; type Handler = (state: OperationState) => void; @@ -48,12 +51,14 @@ export async function beginFileValidation( const abortController = new AbortController(); const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; - const poller: SimplePollerLike< - OperationState, - TestUploadFile201Response - > = { + const poller: SimplePollerLike, TestGetFile200Response> = { async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { - await client.path("/tests/{testId}/files/{fileName}", testId, fileName).get(); + let fileValidationResponse = await client + .path("/tests/{testId}/files/{fileName}", testId, fileName) + .get(); + if (isUnexpected(fileValidationResponse)) { + throw fileValidationResponse.body.error; + } if ( fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED" || fileValidationResponse.body.validationStatus === "NOT_VALIDATED" @@ -76,9 +81,9 @@ export async function beginFileValidation( await processProgressCallbacks(); - if (state.status === "canceled") { - throw new Error("Operation was canceled"); - } + //if (state.status === "canceled") { + // throw new Error("Operation was canceled"); + //} if (state.status === "failed") { throw state.error; } diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 32fe15484e6f..65372ca4224e 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -1,6 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. +import { OperationState, SimplePollerLike } from "@azure/core-lro"; +import { OperationOptions } from "@azure/core-client"; +import { TestRunGet200Response, TestUploadFile201Response } from "./responses"; + /** Load test model */ export interface Test { /** Pass fail criteria for a test. */ @@ -393,3 +397,23 @@ export interface TestRunServerMetricConfig { /** The user that last modified. */ lastModifiedBy?: string; } + +/** + * Describes a poller for NotificationHubJob types. + */ +export type FileUploadAndValidatePoller = SimplePollerLike< + OperationState, + TestUploadFile201Response +>; + +export type TestRunStatusPoller = SimplePollerLike< + OperationState, + TestRunGet200Response +>; + +export interface PolledOperationOptions extends OperationOptions { + /** + * Time delay between poll requests, in milliseconds. + */ + updateIntervalInMs?: number; +} From 9c53dda6415bf295bfc39d218f33433efc89605d Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Mon, 19 Dec 2022 15:07:28 +0530 Subject: [PATCH 21/60] modified upload and validte LRO --- .../src/beginTestRunStatus.ts | 2 +- .../src/beginUploadAndValidateFile.ts | 23 ++++++++----------- .../load-testing-rest/src/models.ts | 6 ++--- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts b/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts index 6850ec504ae4..b6491f02dfba 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts @@ -9,7 +9,7 @@ import { TestRunGet200Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; /** - * Submits a Notification Hub job and creates a poller to poll for results. + * Creates a poller to poll for test run status. * @param client - The Load Testing client. * @param options - The operation options. * @returns A poller which can be called to poll until completion of the job. diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts index 13a4a7bd31a1..a889b32583ef 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts @@ -7,14 +7,12 @@ import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./index.js"; import { TestGetFile200Response, - TestGetFileDefaultResponse, - TestUploadFile201Response, } from "./responses"; import { isUnexpected } from "./isUnexpected"; import { ReadStream } from "fs"; /** - * Submits a Notification Hub job and creates a poller to poll for results. + * Uploads a file and creates a poller to poll for validation. * @param client - The Load Testing client. * @param options - The operation options. * @returns A poller which can be called to poll until completion of the job. @@ -37,16 +35,16 @@ export async function beginFileValidation( throw fileUploadResult.body.error; } - type Handler = (state: OperationState) => void; + type Handler = (state: OperationState) => void; - const state: OperationState = { + const state: OperationState = { status: "notStarted", }; const progressCallbacks = new Map(); const processProgressCallbacks = async (): Promise => progressCallbacks.forEach((h) => h(state)); - let resultPromise: Promise | undefined; + let resultPromise: Promise | undefined; let cancelJob: (() => void) | undefined; const abortController = new AbortController(); const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; @@ -81,9 +79,6 @@ export async function beginFileValidation( await processProgressCallbacks(); - //if (state.status === "canceled") { - // throw new Error("Operation was canceled"); - //} if (state.status === "failed") { throw state.error; } @@ -91,7 +86,7 @@ export async function beginFileValidation( pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike; - }): Promise { + }): Promise { return (resultPromise ??= (async () => { const { abortSignal: inputAbortSignal } = pollOptions || {}; const { signal: abortSignal } = inputAbortSignal @@ -108,7 +103,7 @@ export async function beginFileValidation( } switch (state.status) { case "succeeded": { - return poller.getResult() as TestUploadFile201Response; + return poller.getResult() as TestGetFile200Response; } case "canceled": { throw new Error("Operation was canceled"); @@ -128,7 +123,7 @@ export async function beginFileValidation( }, onProgress( - callback: (state: OperationState) => void + callback: (state: OperationState) => void ): CancelOnProgress { const s = Symbol(); progressCallbacks.set(s, callback); @@ -149,11 +144,11 @@ export async function beginFileValidation( return resultPromise === undefined; }, - getOperationState(): OperationState { + getOperationState(): OperationState { return state; }, - getResult(): TestUploadFile201Response | undefined { + getResult(): TestGetFile200Response | undefined { return state.result; }, diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 65372ca4224e..4b9a49bb4aae 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -3,7 +3,7 @@ import { OperationState, SimplePollerLike } from "@azure/core-lro"; import { OperationOptions } from "@azure/core-client"; -import { TestRunGet200Response, TestUploadFile201Response } from "./responses"; +import { TestGetFile200Response, TestRunGet200Response } from "./responses"; /** Load test model */ export interface Test { @@ -402,8 +402,8 @@ export interface TestRunServerMetricConfig { * Describes a poller for NotificationHubJob types. */ export type FileUploadAndValidatePoller = SimplePollerLike< - OperationState, - TestUploadFile201Response + OperationState, + TestGetFile200Response >; export type TestRunStatusPoller = SimplePollerLike< From 7e0a61c6b6e34fe8afab053f488ffb20a5fb18d9 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 30 Dec 2022 14:13:04 +0530 Subject: [PATCH 22/60] Single Test File for test and testrun --- .../load-testing-rest/package.json | 2 +- .../load-testing-rest/samples-dev/sample.ts | 68 ++--------- .../src/beginUploadAndValidateFile.ts | 2 +- .../test/public/testAdministration.spec.ts | 109 ++++++++++++++++++ .../test/public/testRun.spec.ts | 86 ++++++++++++++ 5 files changed, 208 insertions(+), 59 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index d274705d8bb9..ff2d8d7369ab 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -2,7 +2,7 @@ "name": "@azure-rest/load-testing", "sdk-type": "client", "author": "Microsoft Corporation", - "version": "1.0.0", + "version": "1.0.0-beta.2", "description": "A generated SDK for AzureLoadTesting.", "keywords": [ "node", diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 88464a540840..f18d366aca70 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -12,6 +12,8 @@ import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; +import { beginTestRunStatus } from "../src/beginTestRunStatus"; +import { beginUploadAndFileValidation } from "../src/beginUploadAndValidateFile"; const readStream = createReadStream("./sample.jmx"); @@ -47,44 +49,9 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileName) - .put({ - contentType: "application/octet-stream", - body: readStream, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - // Getting the Validation Status of file - // We need to validate JMX input script. - - let fileValidationResult; - let validationStatus = null; - //wait for terminal state - while ( - validationStatus == null || - (validationStatus != "VALIDATION_SUCCESS" && - validationStatus != "VALIDATION_FAILURE" && - validationStatus != "VALIDATION_NOT_REQUIRED") - ) { - fileValidationResult = await client - .path("/tests/{testId}/files/{fileName}", testId, fileName) - .get(); - if (isUnexpected(fileValidationResult)) { - throw fileValidationResult.body.error; - } - validationStatus = fileValidationResult.body.validationStatus; - - //Check test status after every 2 seconds - sleep(2000); - } + const fileUploadResult = await (await beginUploadAndFileValidation(client, testId, "sample", readStream)).pollUntilDone(); - if (validationStatus == "VALIDATION_FAILURE") { - throw new Error("Invalid file."); - } + if (isUnexpected(fileUploadResult)) throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX script"); // Creating app component const appComponentCreationResult = await client @@ -127,27 +94,14 @@ async function main() { throw new Error("Test Run ID returned as undefined."); // Checking the test run status and printing metrics - var testStatus = null; - var getTestRunResult; - - //wait for terminal state - while ( - testStatus == null || - (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; - - //Check test status after every 5 seconds - sleep(5000); - } + var testStatus = await (await beginTestRunStatus(client, testRunCreationResult.body.testRunId)).pollUntilDone(); + + if (isUnexpected(testStatus)) throw new Error("There is some issue in running the test."); + + + var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId).get(); - if (getTestRunResult === undefined) throw new Error("There is some issue in running the test."); + if (isUnexpected(getTestRunResult)) throw new Error("There is some issue in getting the test run."); let testRunStarttime = getTestRunResult.body.startDateTime; let testRunEndTime = getTestRunResult.body.endDateTime; diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts index a889b32583ef..5e6c8037388f 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts @@ -17,7 +17,7 @@ import { ReadStream } from "fs"; * @param options - The operation options. * @returns A poller which can be called to poll until completion of the job. */ -export async function beginFileValidation( +export async function beginUploadAndFileValidation( client: AzureLoadTestingClient, testId: string, fileName: string, diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts new file mode 100644 index 000000000000..545bcaf89218 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { assert } from "chai"; +import { createClient, createRecorder } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; +import { env, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; +import * as fs from "fs"; +import { isNode } from "@azure/core-util"; + +describe("Test Creation", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + let readStream: fs.ReadStream; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + if (!isNode || isPlaybackMode()) { + this.skip(); + } + client = createClient(recorder); + readStream = fs.createReadStream("./test/public/sample.jmx"); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create a loadtest", async () => { + const result = await client.path("/tests/{testId}", "abc").patch({ + contentType: "application/merge-patch+json", + body: { + displayName: "sample_test", + description: "", + loadTestConfiguration: { + engineInstances: 1, + splitAllCSVs: false, + }, + }, + }); + + assert.include(["200", "201"], result.status); + }); + + it("should upload the test file", async () => { + const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "fileName").put({ + contentType: "application/octet-stream", + body: readStream, + }); + + assert.include(["201"], result.status); + }); + + it("should create the app components", async () => { + const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; + const result = await client.path("/tests/{testId}/app-components", "appcomp123").patch({ + contentType: "application/merge-patch+json", + body: { + testId: "abc", + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + assert.include(["200", "201"], result.status); + }); + + //get + it("should get the test file", async () => { + const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "fileName").get(); + + assert.include(["200"], result.status); + }); + + it("should get the test", async () => { + const result = await client.path("/tests/{testId}", "abc").get(); + + assert.include(["200"], result.status); + }); + + it("should get the test app components", async () => { + const result = await client.path("/tests/{testId}/app-components", "abc").get(); + + assert.include(["200"], result.status); + }); + + //delete + it("should delete the test file", async () => { + const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "fileName").delete(); + + assert.include(["204"], result.status); + }); + + it("should delete the test", async () => { + const result = await client.path("/tests/{testId}", "abc").delete(); + + assert.include(["204"], result.status); + }); + + +}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts new file mode 100644 index 000000000000..9ff4f5695ace --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { env, Recorder } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createRecorder, createClient } from "./utils/recordedClient"; +import { Context } from "mocha"; +import { AzureLoadTestingClient } from "../../src"; + +describe("Test Run Creation", () => { + let recorder: Recorder; + let client: AzureLoadTestingClient; + const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + client = createClient(recorder); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("should create a test run", async () => { + const result = await client.path("/test-runs/{testRunId}", "abcde").patch({ + contentType: "application/merge-patch+json", + body: { + testId: "abc", + displayName: "sample_testrun", + virtualUsers: 10, + }, + }); + + assert.include(["200"], result.status); + }); + + it("should get a test run", async () => { + const result = await client.path("/test-runs/{testRunId}", "abcde").get(); + + assert.include(["200"], result.status); + }); + + it("should create a app component for test run", async () => { + const result = await client.path("/test-runs/{testRunId}/app-components", "abcde").patch({ + contentType: "application/merge-patch+json", + body: { + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + assert.include(["200"], result.status); + }); + + it("should get a test run file", async () => { + const result = await client.path("/test-runs/{testRunId}/files/{fileName}", "abcde", "filename").get(); + + assert.include(["200"], result.status); + }); + + it("should get a test run app components", async () => { + const result = await client.path("/test-runs/{testRunId}/app-components", "abcde").get(); + + assert.include(["200"], result.status); + }); + + it("should get a test run server metrics config", async () => { + const result = await client.path("/test-runs/{testRunId}/server-metrics-config", "abcde").get(); + + assert.include(["200"], result.status); + }); + + it("should delete a test run", async () => { + const result = await client.path("/test-runs/{testRunId}", "abcde").delete(); + + assert.include(["204"], result.status); + }); + +}); From 1d0468b658991a26535ea53ec6759e4409f6ea9e Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 5 Jan 2023 12:11:03 +0530 Subject: [PATCH 23/60] Samples and LRO changes --- .../load-testing-rest/package.json | 2 +- .../samples-dev/createOrUpdateAppComponent.ts | 65 ------- .../samples-dev/createOrUpdateTest.ts | 39 ---- .../samples-dev/fileUpload.ts | 59 ------ .../load-testing-rest/samples-dev/sample.ts | 14 +- .../samples/v1-beta/javascript/README.md | 64 +++++++ .../samples/v1-beta/javascript/package.json | 34 ++++ .../samples/v1-beta/javascript/sample.env | 4 + .../samples/v1-beta/javascript/sample.js | 178 ++++++++++++++++++ .../samples/v1-beta/javascript/stopTest.js | 89 +++++++++ .../samples/v1-beta/typescript/README.md | 77 ++++++++ .../samples/v1-beta/typescript/package.json | 44 +++++ .../samples/v1-beta/typescript/sample.env | 4 + .../samples/v1-beta/typescript/src/sample.ts | 169 +++++++++++++++++ .../v1-beta/typescript/src/stopTest.ts} | 58 +----- .../samples/v1-beta/typescript/tsconfig.json | 17 ++ ...tatus.ts => beginCreateOrUpdateTestRun.ts} | 28 ++- ...ValidateFile.ts => beginUploadTestFile.ts} | 0 .../load-testing-rest/swagger/README.md | 2 +- 19 files changed, 718 insertions(+), 229 deletions(-) delete mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateAppComponent.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts rename sdk/loadtestservice/load-testing-rest/{samples-dev/createOrUpdateTestRunAndGetMetrics.ts => samples/v1-beta/typescript/src/stopTest.ts} (56%) create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json rename sdk/loadtestservice/load-testing-rest/src/{beginTestRunStatus.ts => beginCreateOrUpdateTestRun.ts} (87%) rename sdk/loadtestservice/load-testing-rest/src/{beginUploadAndValidateFile.ts => beginUploadTestFile.ts} (100%) diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index ff2d8d7369ab..97b3378259ad 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -3,7 +3,7 @@ "sdk-type": "client", "author": "Microsoft Corporation", "version": "1.0.0-beta.2", - "description": "A generated SDK for AzureLoadTesting.", + "description": "This package contains Microsoft Azure LoadTestingClient client library.", "keywords": [ "node", "azure", diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateAppComponent.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateAppComponent.ts deleted file mode 100644 index 2d928cf9c372..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateAppComponent.ts +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to create or update appcomponents - * @summary create or update appcomponents - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { v4 as uuidv4 } from "uuid"; - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - const appComponentCreationResult = await client - .path("/tests/{testId}/app-components", testId) - .patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - components: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts deleted file mode 100644 index 29e0655dddd7..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTest.ts +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to create a loadtest - * @summary creates a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { v4 as uuidv4 } from "uuid"; - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating the Load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts deleted file mode 100644 index 8b08f6b88e83..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/fileUpload.ts +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status - * - * @summary creates and run a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected, beginFileValidation } from "@azure-rest/load-testing"; -import { DefaultAzureCredential } from "@azure/identity"; -import { createReadStream } from "fs"; -import { v4 as uuidv4 } from "uuid"; - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const testId = uuidv4(); // ID to be assigned to a test - const fileName = uuidv4(); // ID to be assigned to the file being uploaded - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/tests/{testId}/files/{fileName}", testCreationResult.body.testId, fileName) - .put({ - contentType: "application/octet-stream", - body: readStream, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index f18d366aca70..da00a1538aeb 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -12,8 +12,8 @@ import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; -import { beginTestRunStatus } from "../src/beginTestRunStatus"; -import { beginUploadAndFileValidation } from "../src/beginUploadAndValidateFile"; +import { beginTestRun } from "../src/beginCreateOrUpdateTestRun"; +import { beginUploadAndFileValidation } from "../src/beginUploadTestFile"; const readStream = createReadStream("./sample.jmx"); @@ -22,9 +22,9 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test - const fileName = uuidv4(); // ID to be assigned to the file being uploaded + //const fileName = uuidv4(); // ID to be assigned to the file being uploaded const testRunId = uuidv4(); // ID to be assigned to a testRun - const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + //const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); @@ -51,7 +51,7 @@ async function main() { // Uploading .jmx file to a test const fileUploadResult = await (await beginUploadAndFileValidation(client, testId, "sample", readStream)).pollUntilDone(); - if (isUnexpected(fileUploadResult)) throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX script"); + if (isUnexpected(fileUploadResult)) throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX."); // Creating app component const appComponentCreationResult = await client @@ -94,9 +94,9 @@ async function main() { throw new Error("Test Run ID returned as undefined."); // Checking the test run status and printing metrics - var testStatus = await (await beginTestRunStatus(client, testRunCreationResult.body.testRunId)).pollUntilDone(); + var testRunResult = await (await beginTestRun(client, testId, displayName)).pollUntilDone(); - if (isUnexpected(testStatus)) throw new Error("There is some issue in running the test."); + if (isUnexpected(testRunResult)) throw new Error("There is some issue in running the test."); var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId).get(); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md new file mode 100644 index 000000000000..2bdef4f89bb7 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md @@ -0,0 +1,64 @@ +--- +page_type: sample +languages: + - javascript +products: + - azure +urlFragment: load-testing-javascript-beta +--- + +# Azure Load Testing rest client library samples for JavaScript (Beta) + +These sample programs show how to use the JavaScript client libraries for Azure Load Testing rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------- | -------------------------- | +| [sample.js][sample] | creates and run a loadtest | +| [stopTest.js][stoptest] | creates and run a loadtest | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +3. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node sample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node sample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +[stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing +[freesub]: https://azure.microsoft.com/free/ +[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json new file mode 100644 index 000000000000..29a6ea7e4985 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json @@ -0,0 +1,34 @@ +{ + "name": "@azure-samples/load-testing-js-beta", + "private": true, + "version": "1.0.0", + "description": "Azure Load Testing rest client library samples for JavaScript (Beta)", + "engines": { + "node": ">=14.0.0" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/loadtestservice/load-testing-rest" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", + "dependencies": { + "@azure-rest/load-testing": "next", + "dotenv": "latest", + "@azure/identity": "^2.0.1", + "uuid": "^9.0.0" + } +} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js new file mode 100644 index 000000000000..fb865efdd163 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status f) get test metrics + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { createReadStream } = require("fs"); +const { v4: uuidv4 } = require("uuid"); +const { beginTestRun } = require("../src/beginCreateOrUpdateTestRun"); +const { beginUploadAndFileValidation } = require("../src/beginUploadTestFile"); + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + const testId = uuidv4(); // ID to be assigned to a test + //const fileName = uuidv4(); // ID to be assigned to the file being uploaded + const testRunId = uuidv4(); // ID to be assigned to a testRun + //const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await ( + await beginUploadAndFileValidation(client, testId, "sample", readStream) + ).pollUntilDone(); + + if (isUnexpected(fileUploadResult)) + throw new Error( + "There is some issue in validation, please make sure uploaded file is a valid JMX." + ); + + // Creating app component + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": + { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testRunResult = await (await beginTestRun(client, testId, displayName)).pollUntilDone(); + + if (isUnexpected(testRunResult)) throw new Error("There is some issue in running the test."); + + var getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + + if (isUnexpected(getTestRunResult)) + throw new Error("There is some issue in getting the test run."); + + let testRunStarttime = getTestRunResult.body.startDateTime; + let testRunEndTime = getTestRunResult.body.endDateTime; + + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunCreationResult.body.testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunCreationResult.body.testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + let metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + queryParameters: { + metricname: metricDefinition.name, + metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, + }, + }); + + console.log(metricsResult); + console.log(getTestRunResult); + + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } + + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js new file mode 100644 index 000000000000..b7aebde176d1 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js @@ -0,0 +1,89 @@ +/** + * This sample demonstrates how to run a test and get test status + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { v4: uuidv4 } = require("uuid"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status + var testStatus = null; + var getTestRunResult; + const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); + + //wait for terminal state + while ( + testStatus == null || + (testStatus != "EXECUTING" && testStatus != "CANCELLED" && testStatus != "FAILED") + ) { + getTestRunResult = await client + .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + testStatus = getTestRunResult.body.status; + + //Check test status after every 5 seconds + sleep(5000); + } + + if (testStatus == "EXECUTING") { + let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); + + if (isUnexpected(stopTestRunResult)) { + throw stopTestRunResult.body.error; + } + + console.log("Test run is stopped."); + } +} +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md new file mode 100644 index 000000000000..12defc699d1a --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md @@ -0,0 +1,77 @@ +--- +page_type: sample +languages: + - typescript +products: + - azure +urlFragment: load-testing-typescript-beta +--- + +# Azure Load Testing rest client library samples for TypeScript (Beta) + +These sample programs show how to use the TypeScript client libraries for Azure Load Testing rest in some common scenarios. + +| **File Name** | **Description** | +| ----------------------- | -------------------------- | +| [sample.ts][sample] | creates and run a loadtest | +| [stopTest.ts][stoptest] | creates and run a loadtest | + +## Prerequisites + +The sample programs are compatible with [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule). + +Before running the samples in Node, they must be compiled to JavaScript using the TypeScript compiler. For more information on TypeScript, see the [TypeScript documentation][typescript]. Install the TypeScript compiler using: + +```bash +npm install -g typescript +``` + +You need [an Azure subscription][freesub] and the following Azure resources to run these sample programs: + +- [Azure LoadTesting Service instance][createinstance_azureloadtestingserviceinstance] + +Samples retrieve credentials to access the service endpoint from environment variables. Alternatively, edit the source code to include the appropriate credentials. See each individual sample for details on which environment variables/credentials it requires to function. + +Adapting the samples to run in the browser may require some additional consideration. For details, please see the [package README][package]. + +## Setup + +To run the samples using the published version of the package: + +1. Install the dependencies using `npm`: + +```bash +npm install +``` + +2. Compile the samples: + +```bash +npm run build +``` + +3. Edit the file `sample.env`, adding the correct credentials to access the Azure service and run the samples. Then rename the file from `sample.env` to just `.env`. The sample programs will read this file automatically. + +4. Run whichever samples you like (note that some samples may require additional setup, see the table above): + +```bash +node dist/sample.js +``` + +Alternatively, run a single sample with the correct environment variables set (setting up the `.env` file is not required if you do this), for example (cross-platform): + +```bash +npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION_ID="" node dist/sample.js +``` + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + +[sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +[stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing +[freesub]: https://azure.microsoft.com/free/ +[createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ +[package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md +[typescript]: https://www.typescriptlang.org/docs/home.html diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json new file mode 100644 index 000000000000..d68e2da1914a --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json @@ -0,0 +1,44 @@ +{ + "name": "@azure-samples/load-testing-ts-beta", + "private": true, + "version": "1.0.0", + "description": "Azure Load Testing rest client library samples for TypeScript (Beta)", + "engines": { + "node": ">=14.0.0" + }, + "scripts": { + "build": "tsc", + "prebuild": "rimraf dist/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Azure/azure-sdk-for-js.git", + "directory": "sdk/loadtestservice/load-testing-rest" + }, + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest", + "dependencies": { + "@azure-rest/load-testing": "next", + "dotenv": "latest", + "@azure/identity": "^2.0.1", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@types/uuid": "^8.3.4", + "@types/node": "^14.0.0", + "typescript": "~4.8.0", + "rimraf": "latest" + } +} diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env new file mode 100644 index 000000000000..672847a3fea0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env @@ -0,0 +1,4 @@ +# App registration secret for AAD authentication +AZURE_CLIENT_SECRET= +AZURE_CLIENT_ID= +AZURE_TENANT_ID= \ No newline at end of file diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts new file mode 100644 index 000000000000..63daf074f4b2 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status f) get test metrics + * + * @summary creates and run a loadtest + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; +import { v4 as uuidv4 } from "uuid"; +import { beginTestRun } from "../src/beginCreateOrUpdateTestRun"; +import { beginUploadAndFileValidation } from "../src/beginUploadTestFile"; + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + const testId = uuidv4(); // ID to be assigned to a test + //const fileName = uuidv4(); // ID to be assigned to the file being uploaded + const testRunId = uuidv4(); // ID to be assigned to a testRun + //const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await (await beginUploadAndFileValidation(client, testId, "sample", readStream)).pollUntilDone(); + + if (isUnexpected(fileUploadResult)) throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX."); + + // Creating app component + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } + + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + // Checking the test run status and printing metrics + var testRunResult = await (await beginTestRun(client, testId, displayName)).pollUntilDone(); + + if (isUnexpected(testRunResult)) throw new Error("There is some issue in running the test."); + + + var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId).get(); + + if (isUnexpected(getTestRunResult)) throw new Error("There is some issue in getting the test run."); + + let testRunStarttime = getTestRunResult.body.startDateTime; + let testRunEndTime = getTestRunResult.body.endDateTime; + + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunCreationResult.body.testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunCreationResult.body.testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + let metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + queryParameters: { + metricname: metricDefinition.name, + metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, + }, + }); + + console.log(metricsResult); + console.log(getTestRunResult); + + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } + + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts similarity index 56% rename from sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts rename to sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts index 43073f0cac92..0f6c5ee1e685 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/createOrUpdateTestRunAndGetMetrics.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts @@ -2,7 +2,6 @@ * This sample demonstrates how to run a test and get test status * * @summary creates and run a loadtest - * @azsdk-weight 10 */ import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; @@ -54,7 +53,7 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - // Checking the test run status and printing metrics + // Checking the test run status var testStatus = null; var getTestRunResult; const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); @@ -62,7 +61,7 @@ async function main() { //wait for terminal state while ( testStatus == null || - (testStatus != "DONE" && testStatus != "CANCELLED" && testStatus != "FAILED") + (testStatus != "EXECUTING" && testStatus != "CANCELLED" && testStatus != "FAILED") ) { getTestRunResult = await client .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) @@ -76,55 +75,14 @@ async function main() { sleep(5000); } - if (getTestRunResult === undefined) throw new Error("There is some issue in running the test."); + if (testStatus == "EXECUTING") { + let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); - let testRunStarttime = getTestRunResult.body.startDateTime; - let testRunEndTime = getTestRunResult.body.endDateTime; - - // get list of all metric namespaces and pick the first one - let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunCreationResult.body.testRunId) - .get(); - - if (isUnexpected(metricNamespaces)) { - throw metricNamespaces.body.error; - } - - let metricNamespace = metricNamespaces.body.value[0]; - - if (metricNamespace.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // get list of all metric definitions and pick the first one - let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunCreationResult.body.testRunId) - .get({ - queryParameters: { - metricNamespace: metricNamespace.name, - }, - }); - - if (isUnexpected(metricDefinitions)) { - throw metricDefinitions.body.error; - } - - let metricDefinition = metricDefinitions.body.value[0]; + if (isUnexpected(stopTestRunResult)) { + throw stopTestRunResult.body.error; + } - if (metricDefinition.name === undefined) { - throw "No Metric Namespace name is defined."; + console.log("Test run is stopped."); } - - // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ - queryParameters: { - metricname: metricDefinition.name, - metricNamespace: metricNamespace.name, - timespan: testRunStarttime + "/" + testRunEndTime, - }, - }); - - console.log(metricsResult); - console.log(getTestRunResult); } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json new file mode 100644 index 000000000000..416c2dd82e00 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "target": "ES2018", + "module": "commonjs", + "moduleResolution": "node", + "resolveJsonModule": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "alwaysStrict": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": [ + "src/**.ts" + ] +} diff --git a/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts similarity index 87% rename from sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts rename to sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index b6491f02dfba..f3453c59d07d 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginTestRunStatus.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -3,6 +3,7 @@ import { AbortController, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; +import { v4 as uuidv4 } from "uuid"; import { TestRunStatusPoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./index.js"; import { TestRunGet200Response } from "./responses"; @@ -14,16 +15,29 @@ import { isUnexpected } from "./isUnexpected"; * @param options - The operation options. * @returns A poller which can be called to poll until completion of the job. */ -export async function beginTestRunStatus( +export async function beginTestRun( client: AzureLoadTestingClient, - testRunId: string, + testId: string, + displayName: string, polledOperationOptions: PolledOperationOptions = {} ): Promise { - let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; + const testRunId = uuidv4(); // ID to be assigned to a testRun + // Creating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; } - //let TestRunStatusResponse: TestRunGet200Response; + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); type Handler = (state: OperationState) => void; @@ -41,7 +55,7 @@ export async function beginTestRunStatus( const poller: SimplePollerLike, TestRunGet200Response> = { async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { - getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); + let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); if (isUnexpected(getTestRunResult)) { throw getTestRunResult.body.error; } diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts similarity index 100% rename from sdk/loadtestservice/load-testing-rest/src/beginUploadAndValidateFile.ts rename to sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts diff --git a/sdk/loadtestservice/load-testing-rest/swagger/README.md b/sdk/loadtestservice/load-testing-rest/swagger/README.md index 1e10980817c3..76775cc5f186 100644 --- a/sdk/loadtestservice/load-testing-rest/swagger/README.md +++ b/sdk/loadtestservice/load-testing-rest/swagger/README.md @@ -14,7 +14,7 @@ license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../ source-code-folder-path: ./src input-file: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/loadtestservice/data-plane/Microsoft.LoadTestService/stable/2022-11-01/loadtestservice.json -package-version: 1.0.0 +package-version: 1.0.0-beta.2 rest-level-client: true security: AADToken security-scopes: "https://cnt-prod.loadtesting.azure.com/.default" From 297cea29d6b1ad54312ab6a7337c34d8532830e0 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 5 Jan 2023 12:22:05 +0530 Subject: [PATCH 24/60] Create Test in LRO removed from sample --- .../load-testing-rest/samples-dev/sample.ts | 24 +++---------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index da00a1538aeb..43806dec563f 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -12,7 +12,7 @@ import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; -import { beginTestRun } from "../src/beginCreateOrUpdateTestRun"; +import { beginCreateOrUpdateTestRun } from "../src/beginCreateOrUpdateTestRun"; import { beginUploadAndFileValidation } from "../src/beginUploadTestFile"; const readStream = createReadStream("./sample.jmx"); @@ -76,30 +76,12 @@ async function main() { throw appComponentCreationResult.body.error; } - // Creating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - displayName: displayName, - virtualUsers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - // Checking the test run status and printing metrics - var testRunResult = await (await beginTestRun(client, testId, displayName)).pollUntilDone(); + var testRunResult = await (await beginCreateOrUpdateTestRun(client, testId, displayName)).pollUntilDone(); if (isUnexpected(testRunResult)) throw new Error("There is some issue in running the test."); - - var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId).get(); + var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunResult.body.testRunId).get(); if (isUnexpected(getTestRunResult)) throw new Error("There is some issue in getting the test run."); From ac098bb117b5e5000782debff5d758a98cf0e167 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 12 Jan 2023 22:57:22 +0530 Subject: [PATCH 25/60] Update sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts Co-authored-by: Deyaaeldeen Almahallawi --- .../src/beginCreateOrUpdateTestRun.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index f3453c59d07d..069096b90673 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -103,14 +103,10 @@ export async function beginTestRun( } } switch (state.status) { - case "succeeded": { - return poller.getResult() as TestRunGet200Response; - } + case "succeeded": + case "failed": case "canceled": { - throw new Error("Operation was canceled"); - } - case "failed": { - throw state.error; + return poller.getResult() as TestRunGet200Response; } case "notStarted": case "running": { From a331fa12d9df2c75aae3c49fd04b85ba23921d0c Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 12 Jan 2023 22:57:56 +0530 Subject: [PATCH 26/60] Update sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts Co-authored-by: Deyaaeldeen Almahallawi --- .../load-testing-rest/src/beginUploadTestFile.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts index 5e6c8037388f..205fb4c06a60 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts @@ -102,14 +102,10 @@ export async function beginUploadAndFileValidation( } } switch (state.status) { - case "succeeded": { - return poller.getResult() as TestGetFile200Response; - } + case "succeeded": + case "failed": case "canceled": { - throw new Error("Operation was canceled"); - } - case "failed": { - throw state.error; + return poller.getResult() as TestGetFile200Response; } case "notStarted": case "running": { From f596d1f3c959e705d409a33c3b4e2b20d565cbb8 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 12 Jan 2023 23:07:06 +0530 Subject: [PATCH 27/60] Samples and LRO changes as per review --- .../load-testing-rest/sample.env | 6 +- .../load-testing-rest/samples-dev/sample.ts | 36 +++++------- .../samples/v1-beta/javascript/README.md | 2 +- .../samples/v1-beta/javascript/sample.env | 6 +- .../samples/v1-beta/javascript/sample.js | 58 +++++++------------ .../samples/v1-beta/typescript/README.md | 2 +- .../samples/v1-beta/typescript/sample.env | 6 +- .../samples/v1-beta/typescript/src/sample.ts | 49 +++++----------- .../load-testing-rest/src/azureLoadTesting.ts | 2 +- .../src/beginCreateOrUpdateTestRun.ts | 2 +- .../src/beginUploadTestFile.ts | 2 +- .../load-testing-rest/src/index.ts | 2 + 12 files changed, 74 insertions(+), 99 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/sample.env b/sdk/loadtestservice/load-testing-rest/sample.env index 672847a3fea0..d01f16f14dd8 100644 --- a/sdk/loadtestservice/load-testing-rest/sample.env +++ b/sdk/loadtestservice/load-testing-rest/sample.env @@ -1,4 +1,8 @@ # App registration secret for AAD authentication AZURE_CLIENT_SECRET= AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +AZURE_TENANT_ID= + +LOADTESTSERVICE_ENDPOINT= +SUBSCRIPTION_ID= +RESOURCE_GROUP= diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 43806dec563f..51289bb3719c 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -2,18 +2,16 @@ // Licensed under the MIT license. /** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status f) get test metrics + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics * * @summary creates and run a loadtest * @azsdk-weight 10 */ -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import AzureLoadTesting, { isUnexpected, beginCreateOrUpdateTestRun, beginUploadTestFile } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; -import { beginCreateOrUpdateTestRun } from "../src/beginCreateOrUpdateTestRun"; -import { beginUploadAndFileValidation } from "../src/beginUploadTestFile"; const readStream = createReadStream("./sample.jmx"); @@ -22,14 +20,12 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test - //const fileName = uuidv4(); // ID to be assigned to the file being uploaded const testRunId = uuidv4(); // ID to be assigned to a testRun - //const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - // Creating a load test + // Creating/Updating a load test const testCreationResult = await client.path("/tests/{testId}", testId).patch({ contentType: "application/merge-patch+json", body: { @@ -49,11 +45,12 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadResult = await (await beginUploadAndFileValidation(client, testId, "sample", readStream)).pollUntilDone(); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample", readStream); + const fileUploadResult = await fileUploadPoller.pollUntilDone(); - if (isUnexpected(fileUploadResult)) throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX."); + if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX." + fileUploadResult); - // Creating app component + // Creating/Updating app component const appComponentCreationResult = await client .path("/tests/{testId}/app-components", testId) .patch({ @@ -76,21 +73,18 @@ async function main() { throw appComponentCreationResult.body.error; } - // Checking the test run status and printing metrics - var testRunResult = await (await beginCreateOrUpdateTestRun(client, testId, displayName)).pollUntilDone(); + // Creating/Updating the test run + const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); + const testRunResult = await testRunPoller.pollUntilDone(); - if (isUnexpected(testRunResult)) throw new Error("There is some issue in running the test."); + if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunResult.body.testRunId).get(); - - if (isUnexpected(getTestRunResult)) throw new Error("There is some issue in getting the test run."); - - let testRunStarttime = getTestRunResult.body.startDateTime; - let testRunEndTime = getTestRunResult.body.endDateTime; + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; // get list of all metric namespaces and pick the first one let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunCreationResult.body.testRunId) + .path("/test-runs/{testRunId}/metric-namespaces", testRunResult.body.testRunId) .get(); if (isUnexpected(metricNamespaces)) { @@ -105,7 +99,7 @@ async function main() { // get list of all metric definitions and pick the first one let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunCreationResult.body.testRunId) + .path("/test-runs/{testRunId}/metric-definitions", testRunResult.body.testRunId) .get({ queryParameters: { metricNamespace: metricNamespace.name, diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md index 2bdef4f89bb7..2f76ccbe09a9 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md @@ -58,7 +58,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env index 672847a3fea0..d01f16f14dd8 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.env @@ -1,4 +1,8 @@ # App registration secret for AAD authentication AZURE_CLIENT_SECRET= AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +AZURE_TENANT_ID= + +LOADTESTSERVICE_ENDPOINT= +SUBSCRIPTION_ID= +RESOURCE_GROUP= diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index fb865efdd163..25eaddc06e0c 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -2,18 +2,20 @@ // Licensed under the MIT license. /** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status f) get test metrics + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics * * @summary creates and run a loadtest */ const AzureLoadTesting = require("@azure-rest/load-testing").default, - { isUnexpected } = require("@azure-rest/load-testing"); + { + isUnexpected, + beginCreateOrUpdateTestRun, + beginUploadTestFile, + } = require("@azure-rest/load-testing"); const { DefaultAzureCredential } = require("@azure/identity"); const { createReadStream } = require("fs"); const { v4: uuidv4 } = require("uuid"); -const { beginTestRun } = require("../src/beginCreateOrUpdateTestRun"); -const { beginUploadAndFileValidation } = require("../src/beginUploadTestFile"); const readStream = createReadStream("./sample.jmx"); @@ -22,14 +24,12 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test - //const fileName = uuidv4(); // ID to be assigned to the file being uploaded const testRunId = uuidv4(); // ID to be assigned to a testRun - //const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - // Creating a load test + // Creating/Updating a load test const testCreationResult = await client.path("/tests/{testId}", testId).patch({ contentType: "application/merge-patch+json", body: { @@ -49,16 +49,16 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadResult = await ( - await beginUploadAndFileValidation(client, testId, "sample", readStream) - ).pollUntilDone(); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample", readStream); + const fileUploadResult = await fileUploadPoller.pollUntilDone(); - if (isUnexpected(fileUploadResult)) + if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error( - "There is some issue in validation, please make sure uploaded file is a valid JMX." + "There is some issue in validation, please make sure uploaded file is a valid JMX." + + fileUploadResult ); - // Creating app component + // Creating/Updating app component const appComponentCreationResult = await client .path("/tests/{testId}/app-components", testId) .patch({ @@ -82,30 +82,16 @@ async function main() { throw appComponentCreationResult.body.error; } - // Creating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - displayName: displayName, - virtualUsers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - // Checking the test run status and printing metrics - var testRunResult = await (await beginTestRun(client, testId, displayName)).pollUntilDone(); + // Creating/Updating the test run + const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); + const testRunResult = await testRunPoller.pollUntilDone(); - if (isUnexpected(testRunResult)) throw new Error("There is some issue in running the test."); + if (fileUploadPoller.getOperationState().status != "succeeded") + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + //Getting the test run var getTestRunResult = await client - .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) + .path("/test-runs/{testRunId}", testRunResult.body.testRunId) .get(); if (isUnexpected(getTestRunResult)) @@ -116,7 +102,7 @@ async function main() { // get list of all metric namespaces and pick the first one let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunCreationResult.body.testRunId) + .path("/test-runs/{testRunId}/metric-namespaces", testRunResult.body.testRunId) .get(); if (isUnexpected(metricNamespaces)) { @@ -131,7 +117,7 @@ async function main() { // get list of all metric definitions and pick the first one let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunCreationResult.body.testRunId) + .path("/test-runs/{testRunId}/metric-definitions", testRunResult.body.testRunId) .get({ queryParameters: { metricNamespace: metricNamespace.name, diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md index 12defc699d1a..00a876ba1a1d 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md @@ -70,7 +70,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env index 672847a3fea0..d01f16f14dd8 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/sample.env @@ -1,4 +1,8 @@ # App registration secret for AAD authentication AZURE_CLIENT_SECRET= AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +AZURE_TENANT_ID= + +LOADTESTSERVICE_ENDPOINT= +SUBSCRIPTION_ID= +RESOURCE_GROUP= diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index 63daf074f4b2..fd762c9e682b 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -2,17 +2,15 @@ // Licensed under the MIT license. /** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status f) get test metrics + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics * * @summary creates and run a loadtest */ -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import AzureLoadTesting, { isUnexpected, beginCreateOrUpdateTestRun, beginUploadTestFile } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; -import { beginTestRun } from "../src/beginCreateOrUpdateTestRun"; -import { beginUploadAndFileValidation } from "../src/beginUploadTestFile"; const readStream = createReadStream("./sample.jmx"); @@ -21,14 +19,12 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test - //const fileName = uuidv4(); // ID to be assigned to the file being uploaded const testRunId = uuidv4(); // ID to be assigned to a testRun - //const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - // Creating a load test + // Creating/Updating a load test const testCreationResult = await client.path("/tests/{testId}", testId).patch({ contentType: "application/merge-patch+json", body: { @@ -48,11 +44,12 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadResult = await (await beginUploadAndFileValidation(client, testId, "sample", readStream)).pollUntilDone(); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample", readStream); + const fileUploadResult = await fileUploadPoller.pollUntilDone(); - if (isUnexpected(fileUploadResult)) throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX."); + if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX." + fileUploadResult); - // Creating app component + // Creating/Updating app component const appComponentCreationResult = await client .path("/tests/{testId}/app-components", testId) .patch({ @@ -75,30 +72,14 @@ async function main() { throw appComponentCreationResult.body.error; } - // Creating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - displayName: displayName, - virtualUsers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - // Checking the test run status and printing metrics - var testRunResult = await (await beginTestRun(client, testId, displayName)).pollUntilDone(); - - if (isUnexpected(testRunResult)) throw new Error("There is some issue in running the test."); + // Creating/Updating the test run + const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); + const testRunResult = await testRunPoller.pollUntilDone(); + if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId).get(); + //Getting the test run + var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunResult.body.testRunId).get(); if (isUnexpected(getTestRunResult)) throw new Error("There is some issue in getting the test run."); @@ -107,7 +88,7 @@ async function main() { // get list of all metric namespaces and pick the first one let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunCreationResult.body.testRunId) + .path("/test-runs/{testRunId}/metric-namespaces", testRunResult.body.testRunId) .get(); if (isUnexpected(metricNamespaces)) { @@ -122,7 +103,7 @@ async function main() { // get list of all metric definitions and pick the first one let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunCreationResult.body.testRunId) + .path("/test-runs/{testRunId}/metric-definitions", testRunResult.body.testRunId) .get({ queryParameters: { metricNamespace: metricNamespace.name, diff --git a/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts b/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts index 2b96833bc470..eabacd747943 100644 --- a/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts +++ b/sdk/loadtestservice/load-testing-rest/src/azureLoadTesting.ts @@ -24,7 +24,7 @@ export default function createClient( }, }; - const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0`; + const userAgentInfo = `azsdk-js-load-testing-rest/1.0.0-beta.2`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index f3453c59d07d..40cbf1842a94 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -15,7 +15,7 @@ import { isUnexpected } from "./isUnexpected"; * @param options - The operation options. * @returns A poller which can be called to poll until completion of the job. */ -export async function beginTestRun( +export async function beginCreateOrUpdateTestRun( client: AzureLoadTestingClient, testId: string, displayName: string, diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts index 5e6c8037388f..1fcd48f0d324 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts @@ -17,7 +17,7 @@ import { ReadStream } from "fs"; * @param options - The operation options. * @returns A poller which can be called to poll until completion of the job. */ -export async function beginUploadAndFileValidation( +export async function beginUploadTestFile( client: AzureLoadTestingClient, testId: string, fileName: string, diff --git a/sdk/loadtestservice/load-testing-rest/src/index.ts b/sdk/loadtestservice/load-testing-rest/src/index.ts index f3218d4dd5f4..55de0dede5ba 100644 --- a/sdk/loadtestservice/load-testing-rest/src/index.ts +++ b/sdk/loadtestservice/load-testing-rest/src/index.ts @@ -11,4 +11,6 @@ export * from "./isUnexpected"; export * from "./models"; export * from "./outputModels"; export * from "./paginateHelper"; +export {beginCreateOrUpdateTestRun} from "./beginCreateOrUpdateTestRun"; +export {beginUploadTestFile} from "./beginUploadTestFile"; export default AzureLoadTesting; From 582f42d508e1e09fbcc147b84649f0ca9088f0a9 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 14:05:47 +0530 Subject: [PATCH 28/60] Added timeout in samples and test recordings --- .../load-testing-rest/package.json | 4 +- .../recording_should_create_a_loadtest.json | 58 +-- ...ing_should_create_the_app_components.json} | 0 .../recording_should_get_the_test.json | 4 + ...ng_should_get_the_test_app_components.json | 4 + .../recording_should_get_the_test_file.json | 4 + ...recording_should_upload_the_test_file.json | 4 + ...d_create_a_app_component_for_test_run.json | 64 +++ .../recording_should_create_a_loadtest.json | 70 +++ .../recording_should_create_a_test_run.json | 60 ++- .../recording_should_delete_a_test_run.json | 38 ++ .../recording_should_get_a_test_run.json | 60 ++- ...should_get_a_test_run_app_components.json} | 48 +- ..._get_a_test_run_server_metrics_config.json | 45 ++ .../recording_should_create_a_loadtest.json | 24 +- ...ding_should_create_the_app_components.json | 56 ++ .../recording_should_delete_the_test.json | 29 ++ ...recording_should_delete_the_test_file.json | 29 ++ .../recording_should_get_the_test.json | 52 ++ ...g_should_get_the_test_app_components.json} | 48 +- .../recording_should_get_the_test_file.json | 37 ++ ...recording_should_upload_the_test_file.json | 26 +- ...d_create_a_app_component_for_test_run.json | 55 ++ .../recording_should_create_a_loadtest.json | 61 +++ .../recording_should_create_a_test_run.json | 60 ++- .../recording_should_delete_a_test_run.json | 29 ++ .../recording_should_get_a_test_run.json | 60 ++- ..._should_get_a_test_run_app_components.json | 44 ++ .../recording_should_get_a_test_run_file.json | 36 ++ ..._get_a_test_run_server_metrics_config.json | 36 ++ .../review/load-testing.api.md | 487 +++++++++--------- .../load-testing-rest/samples-dev/sample.ts | 123 +++-- .../load-testing-rest/samples-dev/stopTest.ts | 33 +- .../samples/v1-beta/javascript/README.md | 8 +- .../samples/v1-beta/javascript/sample.js | 14 +- .../samples/v1-beta/javascript/stopTest.js | 33 +- .../samples/v1-beta/typescript/README.md | 8 +- .../samples/v1-beta/typescript/src/sample.ts | 30 +- .../v1-beta/typescript/src/stopTest.ts | 33 +- .../src/beginCreateOrUpdateTestRun.ts | 2 +- .../src/beginUploadTestFile.ts | 4 +- .../load-testing-rest/src/index.ts | 4 +- .../test/public/createAppComponent.spec.ts | 43 -- .../test/public/createLoadTest.spec.ts | 38 -- .../test/public/createTestRun.spec.ts | 41 -- .../test/public/testAdministration.spec.ts | 25 +- .../test/public/testRun.spec.ts | 25 +- .../test/public/uploadTestFile.spec.ts | 38 -- 48 files changed, 1379 insertions(+), 755 deletions(-) rename sdk/loadtestservice/load-testing-rest/recordings/browsers/{file_upload/recording_should_upload_the_test_file.json => test_creation/recording_should_create_the_app_components.json} (100%) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test_app_components.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_app_component_for_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_loadtest.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_a_test_run.json rename sdk/loadtestservice/load-testing-rest/recordings/browsers/{create_app_component/recording_should_create_the_app_components.json => test_run_creation/recording_should_get_a_test_run_app_components.json} (62%) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json rename sdk/loadtestservice/load-testing-rest/recordings/node/{create_app_component/recording_should_create_the_app_components.json => test_creation/recording_should_get_the_test_app_components.json} (54%) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json rename sdk/loadtestservice/load-testing-rest/recordings/node/{file_upload => test_creation}/recording_should_upload_the_test_file.json (89%) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/createAppComponent.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/createLoadTest.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index 97b3378259ad..8648daecc2aa 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -77,7 +77,9 @@ "@azure/logger": "^1.0.0", "tslib": "^2.2.0", "@azure/core-lro": "~2.4.1", - "@azure/core-client": "1.6.1" + "@azure/core-client": "~1.6.2", + "@azure/core-util": "~1.1.2", + "@azure/abort-controller": "~1.1.1" }, "devDependencies": { "@azure-tools/test-credential": "~1.0.0", diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json index 5c901b7a86bc..f721723386d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_a_loadtest.json @@ -1,60 +1,4 @@ { - "Entries": [ - { - "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "113", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "d5c438f5-a2cd-4714-a614-30149f9acbca", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": { - "displayName": "sample_test", - "description": "", - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "179", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:53:57 GMT", - "mise-correlation-id": "5ec0dd20-9d7f-469f-9b70-a21554873201", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d5e91f89-bab5-4291-bc10-24515b64c8f3" - }, - "ResponseBody": { - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false, - "quickStartTest": false - }, - "inputArtifacts": { - "additionalFileInfo": [] - }, - "description": "", - "displayName": "sample_test" - } - } - ], + "Entries": [], "Variables": {} } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_the_app_components.json similarity index 100% rename from sdk/loadtestservice/load-testing-rest/recordings/browsers/file_upload/recording_should_upload_the_test_file.json rename to sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_create_the_app_components.json diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test_app_components.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test_app_components.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test_file.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_get_the_test_file.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_app_component_for_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_app_component_for_test_run.json new file mode 100644 index 000000000000..75c8793d863b --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_app_component_for_test_run.json @@ -0,0 +1,64 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "412", + "Content-Type": "application/merge-patch\u002Bjson", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "2dec865c-f592-46d2-a01b-aa0e5e6dc0d5", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": { + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "subscriptionId": "azure_subscription_id" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "568", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:33 GMT", + "mise-correlation-id": "2a293179-3ceb-4634-a18e-dc025da6aee8", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8c2224b3-1dca-46a1-8727-9f65eea049f2" + }, + "ResponseBody": { + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "resourceGroup": "App-Service-Sample-Demo-rg", + "subscriptionId": "{SUBSCRIPTION_ID}" + } + }, + "testRunId": "abcde", + "createdDateTime": "2023-01-19T08:04:31.385Z", + "lastModifiedDateTime": "2023-01-19T08:04:33.065Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_loadtest.json new file mode 100644 index 000000000000..ddf76a548da3 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_loadtest.json @@ -0,0 +1,70 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "113", + "Content-Type": "application/merge-patch\u002Bjson", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "28b35050-e242-40f3-ac0c-c5cce72516d0", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": { + "displayName": "sample_test", + "description": "", + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "478", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:29 GMT", + "mise-correlation-id": "8cfcaae6-73de-4844-8178-32e07b66aa91", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3284f816-e0ec-4794-91ce-b7421621d557" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "inputArtifacts": { + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T09:04:29.770143", + "validationStatus": "VALIDATION_SUCCESS" + }, + "additionalFileInfo": [] + }, + "testId": "abc", + "description": "", + "displayName": "sample_test", + "createdDateTime": "2023-01-19T07:20:48.154Z", + "lastModifiedDateTime": "2023-01-19T08:04:29.754Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json index bb667736a38d..57d3ad7e86ae 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json @@ -19,31 +19,69 @@ "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-site", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "c0876ad4-71d0-4a9f-abf5-37ee794f53ad", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + "x-ms-client-request-id": "d7d792d9-9c73-4388-8ba2-66bb8539a56f", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" }, "RequestBody": { "testId": "abc", "displayName": "sample_testrun", "virtualUsers": 10 }, - "StatusCode": 404, + "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "152", + "Content-Length": "1294", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:54:01 GMT", - "mise-correlation-id": "86c6a0f2-a3c7-41ff-870b-d8a6f9ef9bd2", + "Date": "Thu, 19 Jan 2023 08:04:31 GMT", + "Location": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "mise-correlation-id": "ce11ede6-2917-4b19-8e74-4d8db5f39b44", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "346207e8-0898-4344-ae09-83b348041db6" + "x-ms-correlation-request-id": "7071222a-9c5a-4daf-89fa-0e15d5f28c70" }, "ResponseBody": { - "error": { - "code": "TestRunFileNotFound", - "message": "Test doesn\u0027t have any jmx file. Please upload a jmx file first, it\u0027s mandatory to create a TestRun." - } + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "0001-01-01T00:00:00", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T09:04:30.7719687", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "0001-01-01T00:00:00", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample_testrun", + "testId": "abc", + "status": "ACCEPTED", + "executedDateTime": "2023-01-19T08:04:30.772Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T08:04:31.521Z", + "lastModifiedDateTime": "2023-01-19T08:04:31.521Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_a_test_run.json new file mode 100644 index 000000000000..bebb31f54980 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_a_test_run.json @@ -0,0 +1,38 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "fe737fdf-e80a-42ae-90ee-b150d13c8b30", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Date": "Thu, 19 Jan 2023 08:04:35 GMT", + "mise-correlation-id": "bdc16ddb-8fda-4bdd-b108-b95ba77f791c", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b87cc52e-ef3d-4fe0-9909-d30bf7b5b335" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json index 541a9b6d5ff7..d591a6788d5a 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json @@ -17,27 +17,65 @@ "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-site", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "916e6bae-5137-406c-a27b-45d64efbc614", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + "x-ms-client-request-id": "8b9e8ccc-1350-490e-a61e-675de7e1a9c0", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" }, "RequestBody": null, - "StatusCode": 404, + "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "94", + "Content-Length": "1356", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:54:03 GMT", - "mise-correlation-id": "3e696d21-ac85-469b-9bb7-90c3f4d230f1", + "Date": "Thu, 19 Jan 2023 08:04:32 GMT", + "mise-correlation-id": "c5da46eb-df0b-4936-a3df-32c1071ab579", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "89ec45bc-f35f-4c98-a3ad-0e996ff6f49c" + "x-ms-correlation-request-id": "ea9c2089-8677-40ad-93ad-1fd93cdf0c3a" }, "ResponseBody": { - "error": { - "code": "TestRunNotFound", - "message": "Test run not found with given name \u0022abcde\u0022." - } + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T09:04:32.2684296", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T09:04:32.2683276", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T09:04:32.2684517", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample_testrun", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-19T08:04:31.735Z", + "executedDateTime": "2023-01-19T08:04:30.772Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T08:04:31.521Z", + "lastModifiedDateTime": "2023-01-19T08:04:31.97Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_app_components.json similarity index 62% rename from sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json rename to sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_app_components.json index c5819309c4f5..02e91bbe01f1 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/create_app_component/recording_should_create_the_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_app_components.json @@ -1,16 +1,14 @@ { "Entries": [ { - "RequestUri": "https://endpoint/tests/appcomp123/app-components?api-version=2022-11-01", - "RequestMethod": "PATCH", + "RequestUri": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", + "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Accept-Encoding": "gzip, deflate, br", "Accept-Language": "en-US", "Authorization": "Sanitized", "Connection": "keep-alive", - "Content-Length": "427", - "Content-Type": "application/merge-patch\u002Bjson", "Referer": "http://localhost:9876/", "sec-ch-ua": "", "sec-ch-ua-mobile": "?0", @@ -19,37 +17,35 @@ "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "same-site", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "7c6ba601-eb11-4333-99da-a970ff699054", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 OS/Win32" + "x-ms-client-request-id": "92707126-2b7b-4900-9c56-03f0cd38d95b", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" }, - "RequestBody": { - "testId": "abc", - "components": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "subscriptionId": "azure_subscription_id" - } - } - }, - "StatusCode": 404, + "RequestBody": null, + "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "92", + "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:53:59 GMT", - "mise-correlation-id": "accff988-9b4a-444a-b4cc-f9a61c96459e", + "Date": "Thu, 19 Jan 2023 08:04:33 GMT", + "mise-correlation-id": "173fcd5d-46a3-4095-be2f-13b72bf39f2c", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f302dcd2-220d-4237-8c2a-28af344ef603" + "x-ms-correlation-request-id": "b8b773ae-22d1-48d9-83c0-b90140f70565" }, "ResponseBody": { - "error": { - "code": "TestNotFound", - "message": "Test not found with given name \u0022appcomp123\u0022." - } + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "resourceGroup": "App-Service-Sample-Demo-rg", + "subscriptionId": "{SUBSCRIPTION_ID}" + } + }, + "testRunId": "abcde", + "createdDateTime": "2023-01-19T08:04:31.385Z", + "lastModifiedDateTime": "2023-01-19T08:04:33.065Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json new file mode 100644 index 000000000000..16134d3e141a --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json @@ -0,0 +1,45 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde/server-metrics-config?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "en-US", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Referer": "http://localhost:9876/", + "sec-ch-ua": "", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-site", + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", + "x-ms-client-request-id": "f30549ea-c61e-4770-a8b4-93425c75d583", + "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "129", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:34 GMT", + "mise-correlation-id": "f2a4cc19-7c59-4268-a933-2c3e0eda53e0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d5578e69-d841-4b92-be2a-644d5d023d61" + }, + "ResponseBody": { + "testRunId": "abcde", + "metrics": {}, + "createdDateTime": "2023-01-19T08:04:31.393Z", + "lastModifiedDateTime": "2023-01-19T08:04:33.092Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json index ff24076eb028..f526514d9568 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -10,8 +10,8 @@ "Connection": "keep-alive", "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "3aaf9bcc-7a29-4af1-a93d-080e751d0097" + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "99ff5799-04cb-411a-9156-9fe078cc70e8" }, "RequestBody": { "displayName": "sample_test", @@ -25,13 +25,13 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "179", + "Content-Length": "477", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:48:26 GMT", - "mise-correlation-id": "b27cf54c-346e-47cd-8409-c211e5112912", + "Date": "Thu, 19 Jan 2023 08:04:08 GMT", + "mise-correlation-id": "907dc9f1-3e62-47c3-aef3-13f13825cb1a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f3eafa0d-f11b-461a-b37d-adfa2788794d" + "x-ms-correlation-request-id": "41324286-b9b4-4b95-8d7c-5e2a14003674" }, "ResponseBody": { "loadTestConfiguration": { @@ -40,10 +40,20 @@ "quickStartTest": false }, "inputArtifacts": { + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T09:04:08.552821", + "validationStatus": "VALIDATION_SUCCESS" + }, "additionalFileInfo": [] }, + "testId": "abc", "description": "", - "displayName": "sample_test" + "displayName": "sample_test", + "createdDateTime": "2023-01-19T07:20:48.154Z", + "lastModifiedDateTime": "2023-01-19T08:04:08.54Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json new file mode 100644 index 000000000000..db848f5cebd8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json @@ -0,0 +1,56 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/app-components?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "427", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "c6b74897-5876-426d-ad20-02f5300791ed" + }, + "RequestBody": { + "testId": "abc", + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "subscriptionId": "azure_subscription_id" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "562", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:09 GMT", + "mise-correlation-id": "02be02e3-0575-4b5e-99be-9e5393e183c8", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3256017c-9d3e-4897-8470-fcda0cc1d6c9" + }, + "ResponseBody": { + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "resourceGroup": "App-Service-Sample-Demo-rg", + "subscriptionId": "{SUBSCRIPTION_ID}" + } + }, + "testId": "abc", + "createdDateTime": "2023-01-19T07:21:57.696Z", + "lastModifiedDateTime": "2023-01-19T08:04:09.61Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json new file mode 100644 index 000000000000..5c8348724ad7 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json @@ -0,0 +1,29 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "bcd8ad12-461f-4a1b-885b-c3e73a94562f" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Date": "Thu, 19 Jan 2023 07:20:47 GMT", + "mise-correlation-id": "a7a0d020-ad4d-4661-9124-0fcabcef1c89", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "69174684-1faa-41c2-83a0-b67ca10198e0" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json new file mode 100644 index 000000000000..6950c738aa7f --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json @@ -0,0 +1,29 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/fileName.jmx?api-version=2022-11-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "852ba0da-266b-45b7-93ec-73ff15d63a82" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Date": "Thu, 19 Jan 2023 07:20:46 GMT", + "mise-correlation-id": "9cc7dad6-33e0-4050-ba2d-eceef3680001", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d74f9bb1-7362-4962-8771-e8a5caab9dec" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json new file mode 100644 index 000000000000..3f6565f3b8e8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json @@ -0,0 +1,52 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "eec5976a-47a6-4383-8aee-d0a8dbf60b13" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "481", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:10 GMT", + "mise-correlation-id": "564f363d-99f2-4f47-94f3-d906301038c7", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2c2497c7-0887-4ded-be2d-f812968e4b40" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "inputArtifacts": { + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T09:04:10.9476034", + "validationStatus": "VALIDATION_INITIATED" + }, + "additionalFileInfo": [] + }, + "testId": "abc", + "description": "", + "displayName": "sample_test", + "createdDateTime": "2023-01-19T07:20:48.154Z", + "lastModifiedDateTime": "2023-01-19T08:04:09.638Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json similarity index 54% rename from sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json rename to sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json index 2b8dd815bf29..b92720e85432 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/create_app_component/recording_should_create_the_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json @@ -1,46 +1,42 @@ { "Entries": [ { - "RequestUri": "https://endpoint/tests/appcomp123/app-components?api-version=2022-11-01", - "RequestMethod": "PATCH", + "RequestUri": "https://endpoint/tests/abc/app-components?api-version=2022-11-01", + "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Accept-Encoding": "gzip,deflate", "Authorization": "Sanitized", "Connection": "keep-alive", - "Content-Length": "427", - "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "ff0c9843-d754-4421-94d5-64037ada4684" + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "d0a69b29-ec28-4f3e-bceb-78069c1c9372" }, - "RequestBody": { - "testId": "abc", - "components": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "subscriptionId": "azure_subscription_id" - } - } - }, - "StatusCode": 404, + "RequestBody": null, + "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "92", + "Content-Length": "562", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:48:25 GMT", - "mise-correlation-id": "0bd322d0-6a7a-4b9d-b337-0b3f60a993e9", + "Date": "Thu, 19 Jan 2023 08:04:11 GMT", + "mise-correlation-id": "1afcfba0-378f-43b2-bd08-d8d608993428", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f769eaed-4b01-48e9-880c-c6090a4ebd07" + "x-ms-correlation-request-id": "58ecf0bc-35e7-42dc-b3d9-e80e287ac4c3" }, "ResponseBody": { - "error": { - "code": "TestNotFound", - "message": "Test not found with given name \u0022appcomp123\u0022." - } + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "resourceGroup": "App-Service-Sample-Demo-rg", + "subscriptionId": "{SUBSCRIPTION_ID}" + } + }, + "testId": "abc", + "createdDateTime": "2023-01-19T07:21:57.696Z", + "lastModifiedDateTime": "2023-01-19T08:04:09.61Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json new file mode 100644 index 000000000000..c27bffe8cecb --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json @@ -0,0 +1,37 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/fileName.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "bc87f84c-841e-4fb8-b4de-334a32dadea0" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "170", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:10 GMT", + "mise-correlation-id": "dedcf1ba-3e44-4dcf-9521-390a02878491", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "79b9d10f-0570-4cc6-b059-1ae7aa841634" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T08:14:10.5049762", + "validationStatus": "VALIDATION_INITIATED" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file.json similarity index 89% rename from sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json rename to sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file.json index 5dce4104f5f2..7dfe1ec46fd5 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/file_upload/recording_should_upload_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://endpoint/tests/abc/files/xyz12365?api-version=2022-11-01", + "RequestUri": "https://endpoint/tests/abc/files/fileName.jmx?api-version=2022-11-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -10,27 +10,29 @@ "Connection": "keep-alive", "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "33dec0e9-2418-471e-a5b2-06303d3c40e2" + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "c191a9ee-dd85-47e1-a315-3bc33c5aead6" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjUwPC9zdHJpbmdQcm9wPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLnJhbXBfdGltZSI\u002BMjwvc3RyaW5nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuc3RhcnRfdGltZSI\u002BMTUxNTA2MzY1MDAwMDwvbG9uZ1Byb3A\u002BCiAgICAgICAgPGxvbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLmVuZF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2NoZWR1bGVyIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZHVyYXRpb24iPjYwPC9zdHJpbmdQcm9wPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLmRlbGF5Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGJvb2xQcm9wIG5hbWU9IlRocmVhZEdyb3VwLnNhbWVfdXNlcl9vbl9uZXh0X2l0ZXJhdGlvbiI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgIDwvVGhyZWFkR3JvdXA\u002BCiAgICAgIDxoYXNoVHJlZT4KICAgICAgICA8SFRUUFNhbXBsZXJQcm94eSBndWljbGFzcz0iSHR0cFRlc3RTYW1wbGVHdWkiIHRlc3RjbGFzcz0iSFRUUFNhbXBsZXJQcm94eSIgdGVzdG5hbWU9IlNhbXBsZSIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8ZWxlbWVudFByb3AgbmFtZT0iSFRUUHNhbXBsZXIuQXJndW1lbnRzIiBlbGVtZW50VHlwZT0iQXJndW1lbnRzIiBndWljbGFzcz0iSFRUUEFyZ3VtZW50c1BhbmVsIiB0ZXN0Y2xhc3M9IkFyZ3VtZW50cyIgdGVzdG5hbWU9IlVzZXIgRGVmaW5lZCBWYXJpYWJsZXMiIGVuYWJsZWQ9InRydWUiPgogICAgICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICAgICAgPC9lbGVtZW50UHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmRvbWFpbiI\u002BbWljcm9zb2Z0LmNvbTwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLnBvcnQiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLnByb3RvY29sIj48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5jb250ZW50RW5jb2RpbmciPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLnBhdGgiPi88L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5tZXRob2QiPkdFVDwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5mb2xsb3dfcmVkaXJlY3RzIj50cnVlPC9ib29sUHJvcD4KICAgICAgICAgIDxib29sUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5hdXRvX3JlZGlyZWN0cyI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLnVzZV9rZWVwYWxpdmUiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLkRPX01VTFRJUEFSVF9QT1NUIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5lbWJlZGRlZF91cmxfcmUiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbm5lY3RfdGltZW91dCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucmVzcG9uc2VfdGltZW91dCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgIDwvSFRUUFNhbXBsZXJQcm94eT4KICAgICAgICA8aGFzaFRyZWUvPgogICAgICA8L2hhc2hUcmVlPgogICAgICA8UmVzdWx0Q29sbGVjdG9yIGd1aWNsYXNzPSJWaWV3UmVzdWx0c0Z1bGxWaXN1YWxpemVyIiB0ZXN0Y2xhc3M9IlJlc3VsdENvbGxlY3RvciIgdGVzdG5hbWU9IlZpZXcgUmVzdWx0cyBUcmVlIiBlbmFibGVkPSJmYWxzZSI\u002BCiAgICAgICAgPGJvb2xQcm9wIG5hbWU9IlJlc3VsdENvbGxlY3Rvci5lcnJvcl9sb2dnaW5nIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgPG9ialByb3A\u002BCiAgICAgICAgICA8bmFtZT5zYXZlQ29uZmlnPC9uYW1lPgogICAgICAgICAgPHZhbHVlIGNsYXNzPSJTYW1wbGVTYXZlQ29uZmlndXJhdGlvbiI\u002BCiAgICAgICAgICAgIDx0aW1lPnRydWU8L3RpbWU\u002BCiAgICAgICAgICAgIDxsYXRlbmN5PnRydWU8L2xhdGVuY3k\u002BCiAgICAgICAgICAgIDx0aW1lc3RhbXA\u002BdHJ1ZTwvdGltZXN0YW1wPgogICAgICAgICAgICA8c3VjY2Vzcz50cnVlPC9zdWNjZXNzPgogICAgICAgICAgICA8bGFiZWw\u002BdHJ1ZTwvbGFiZWw\u002BCiAgICAgICAgICAgIDxjb2RlPnRydWU8L2NvZGU\u002BCiAgICAgICAgICAgIDxtZXNzYWdlPnRydWU8L21lc3NhZ2U\u002BCiAgICAgICAgICAgIDx0aHJlYWROYW1lPnRydWU8L3RocmVhZE5hbWU\u002BCiAgICAgICAgICAgIDxkYXRhVHlwZT50cnVlPC9kYXRhVHlwZT4KICAgICAgICAgICAgPGVuY29kaW5nPmZhbHNlPC9lbmNvZGluZz4KICAgICAgICAgICAgPGFzc2VydGlvbnM\u002BdHJ1ZTwvYXNzZXJ0aW9ucz4KICAgICAgICAgICAgPHN1YnJlc3VsdHM\u002BdHJ1ZTwvc3VicmVzdWx0cz4KICAgICAgICAgICAgPHJlc3BvbnNlRGF0YT5mYWxzZTwvcmVzcG9uc2VEYXRhPgogICAgICAgICAgICA8c2FtcGxlckRhdGE\u002BZmFsc2U8L3NhbXBsZXJEYXRhPgogICAgICAgICAgICA8eG1sPmZhbHNlPC94bWw\u002BCiAgICAgICAgICAgIDxmaWVsZE5hbWVzPnRydWU8L2ZpZWxkTmFtZXM\u002BCiAgICAgICAgICAgIDxyZXNwb25zZUhlYWRlcnM\u002BZmFsc2U8L3Jlc3BvbnNlSGVhZGVycz4KICAgICAgICAgICAgPHJlcXVlc3RIZWFkZXJzPmZhbHNlPC9yZXF1ZXN0SGVhZGVycz4KICAgICAgICAgICAgPHJlc3BvbnNlRGF0YU9uRXJyb3I\u002BZmFsc2U8L3Jlc3BvbnNlRGF0YU9uRXJyb3I\u002BCiAgICAgICAgICAgIDxzYXZlQXNzZXJ0aW9uUmVzdWx0c0ZhaWx1cmVNZXNzYWdlPnRydWU8L3NhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BCiAgICAgICAgICAgIDxhc3NlcnRpb25zUmVzdWx0c1RvU2F2ZT4wPC9hc3NlcnRpb25zUmVzdWx0c1RvU2F2ZT4KICAgICAgICAgICAgPGJ5dGVzPnRydWU8L2J5dGVzPgogICAgICAgICAgICA8c2VudEJ5dGVzPnRydWU8L3NlbnRCeXRlcz4KICAgICAgICAgICAgPHVybD50cnVlPC91cmw\u002BCiAgICAgICAgICAgIDx0aHJlYWRDb3VudHM\u002BdHJ1ZTwvdGhyZWFkQ291bnRzPgogICAgICAgICAgICA8aWRsZVRpbWU\u002BdHJ1ZTwvaWRsZVRpbWU\u002BCiAgICAgICAgICAgIDxjb25uZWN0VGltZT50cnVlPC9jb25uZWN0VGltZT4KICAgICAgICAgIDwvdmFsdWU\u002BCiAgICAgICAgPC9vYmpQcm9wPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9ImZpbGVuYW1lIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDwvUmVzdWx0Q29sbGVjdG9yPgogICAgICA8aGFzaFRyZWUvPgogICAgPC9oYXNoVHJlZT4KICA8L2hhc2hUcmVlPgo8L2ptZXRlclRlc3RQbGFuPgo=", - "StatusCode": 400, + "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "91", + "Content-Length": "170", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:48:27 GMT", - "mise-correlation-id": "9928d2a3-268b-4cc0-af28-0fdd39586c8b", + "Date": "Thu, 19 Jan 2023 08:04:09 GMT", + "Location": "https://endpoint/tests/abc/files/fileName.jmx?api-version=2022-11-01", + "mise-correlation-id": "a4a45ca8-995f-4348-bf29-0a1312dd6b0f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9ca8a85d-31c4-49e3-ad88-7621cd6dbc39" + "x-ms-correlation-request-id": "529490dd-5f82-48cf-9f94-1ebe2ddfb766" }, "ResponseBody": { - "error": { - "code": "InvalidFileName", - "message": "File name should have extension - xyz12365" - } + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T08:14:09.1326299", + "validationStatus": "VALIDATION_INITIATED" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json new file mode 100644 index 000000000000..0f33dd1360d2 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json @@ -0,0 +1,55 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "412", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "b52a5465-b419-4b0f-9a99-c330e7321dbb" + }, + "RequestBody": { + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "subscriptionId": "azure_subscription_id" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "568", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:14 GMT", + "mise-correlation-id": "d409ab09-3776-47d1-8330-1894368bc639", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e38e235a-ab01-4b15-8a89-48c01481ca96" + }, + "ResponseBody": { + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "resourceGroup": "App-Service-Sample-Demo-rg", + "subscriptionId": "{SUBSCRIPTION_ID}" + } + }, + "testRunId": "abcde", + "createdDateTime": "2023-01-19T08:04:13.531Z", + "lastModifiedDateTime": "2023-01-19T08:04:14.598Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json new file mode 100644 index 000000000000..6774ba31a20b --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json @@ -0,0 +1,61 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "113", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "28b6b41f-b4b9-461e-9ee4-08b06866e3a8" + }, + "RequestBody": { + "displayName": "sample_test", + "description": "", + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "481", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:12 GMT", + "mise-correlation-id": "78883cb1-31ad-43e6-ab4a-801510cda647", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "25a11a80-f1dd-44a9-bee6-3b0135897b6e" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "inputArtifacts": { + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T09:04:12.3817647", + "validationStatus": "VALIDATION_INITIATED" + }, + "additionalFileInfo": [] + }, + "testId": "abc", + "description": "", + "displayName": "sample_test", + "createdDateTime": "2023-01-19T07:20:48.154Z", + "lastModifiedDateTime": "2023-01-19T08:04:12.374Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json index 2d404401bd68..810c0aa585fc 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json @@ -10,31 +10,69 @@ "Connection": "keep-alive", "Content-Length": "65", "Content-Type": "application/merge-patch\u002Bjson", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "45eaf678-dba1-452a-afa1-704c50a45a4a" + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "5629b78e-93f4-4f5b-a502-64c6a59eeafe" }, "RequestBody": { "testId": "abc", "displayName": "sample_testrun", "virtualUsers": 10 }, - "StatusCode": 404, + "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "152", + "Content-Length": "1295", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:48:26 GMT", - "mise-correlation-id": "865b3696-553c-4d83-bc67-dac026d8412c", + "Date": "Thu, 19 Jan 2023 08:04:13 GMT", + "Location": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "mise-correlation-id": "6e4731da-0171-4898-b2ff-ca28cb26ce73", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7ef1cb3f-e101-447d-a1ae-e17120eecafe" + "x-ms-correlation-request-id": "1339247f-de2f-4b2a-ad3b-07f524e511be" }, "ResponseBody": { - "error": { - "code": "TestRunFileNotFound", - "message": "Test doesn\u0027t have any jmx file. Please upload a jmx file first, it\u0027s mandatory to create a TestRun." - } + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "0001-01-01T00:00:00", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T09:04:12.8406944", + "validationStatus": "VALIDATION_INITIATED" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "0001-01-01T00:00:00", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample_testrun", + "testId": "abc", + "status": "ACCEPTED", + "executedDateTime": "2023-01-19T08:04:12.84Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T08:04:13.637Z", + "lastModifiedDateTime": "2023-01-19T08:04:13.637Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json new file mode 100644 index 000000000000..c06f9f873f06 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json @@ -0,0 +1,29 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "c683d06e-9c83-4645-9ac0-35e930d1cadb" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Date": "Thu, 19 Jan 2023 08:04:16 GMT", + "mise-correlation-id": "d79bcade-776d-4e9e-96c8-51f62b28d0a9", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b9707b0c-4d4f-4aa7-9d12-c018e85c56dd" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json index 009830446f70..6506ee9eb4ba 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -8,27 +8,65 @@ "Accept-Encoding": "gzip,deflate", "Authorization": "Sanitized", "Connection": "keep-alive", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.19045)", - "x-ms-client-request-id": "00fa65d7-e768-40e4-ae77-cc0ff2e79be6" + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "4ede5c03-2e7d-4041-8a7c-27a7ca51e5e7" }, "RequestBody": null, - "StatusCode": 404, + "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "94", + "Content-Length": "1358", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 17 Nov 2022 16:48:27 GMT", - "mise-correlation-id": "7744acda-c871-47d1-9b7c-dbd62cf9736d", + "Date": "Thu, 19 Jan 2023 08:04:14 GMT", + "mise-correlation-id": "b2e69599-3992-48b7-84b4-778606cd75e6", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c7e51952-d266-49c4-8e58-38943db3b4f7" + "x-ms-correlation-request-id": "467dddf8-7873-4f58-ab41-8d517adcd57f" }, "ResponseBody": { - "error": { - "code": "TestRunNotFound", - "message": "Test run not found with given name \u0022abcde\u0022." - } + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T09:04:14.1047573", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "fileName.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T09:04:14.1046551", + "validationStatus": "VALIDATION_INITIATED" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T09:04:14.1047791", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample_testrun", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-19T08:04:13.762Z", + "executedDateTime": "2023-01-19T08:04:12.84Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T08:04:13.637Z", + "lastModifiedDateTime": "2023-01-19T08:04:13.904Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json new file mode 100644 index 000000000000..2e42cc608caa --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json @@ -0,0 +1,44 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "512471cf-c252-4883-8b0f-7c5dedb37915" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "568", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:15 GMT", + "mise-correlation-id": "2114334e-75f5-4bb2-886c-1a41a69ce764", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "7077e5cb-d3cb-4c3d-8a12-5d4921b4c76b" + }, + "ResponseBody": { + "components": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "resourceName": "App-Service-Sample-Demo", + "resourceType": "Microsoft.Web/sites", + "resourceGroup": "App-Service-Sample-Demo-rg", + "subscriptionId": "{SUBSCRIPTION_ID}" + } + }, + "testRunId": "abcde", + "createdDateTime": "2023-01-19T08:04:13.531Z", + "lastModifiedDateTime": "2023-01-19T08:04:14.598Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_file.json new file mode 100644 index 000000000000..1ac7a2cea0e6 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_file.json @@ -0,0 +1,36 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde/files/filename.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "8c9d5790-8d3c-441c-a4b4-f1cf4bc479ee" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "146", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:02:58 GMT", + "mise-correlation-id": "b712c3df-fc9e-4c72-9a68-dd9f3de6955b", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b57a289a-55f5-4851-af1e-995da7c8cccc" + }, + "ResponseBody": { + "error": { + "code": "TestRunFileNotFound", + "message": "Test run file not found with given name \u0022Test file not found with given name filename.jmx\u0022." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json new file mode 100644 index 000000000000..4ceaa885108b --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json @@ -0,0 +1,36 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde/server-metrics-config?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "63bfd60c-43f7-41e5-a522-80e87776ee39" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "129", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 08:04:15 GMT", + "mise-correlation-id": "77ac3fe2-74b1-44d4-b78c-031d09996517", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "34804ff7-66f7-4acd-acee-dda1931e5185" + }, + "ResponseBody": { + "testRunId": "abcde", + "metrics": {}, + "createdDateTime": "2023-01-19T08:04:13.539Z", + "lastModifiedDateTime": "2023-01-19T08:04:14.614Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md index 4519e1d73e73..c0d6e3948faf 100644 --- a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md +++ b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md @@ -9,10 +9,14 @@ import { Client } from '@azure-rest/core-client'; import { ClientOptions } from '@azure-rest/core-client'; import { HttpResponse } from '@azure-rest/core-client'; +import { OperationOptions } from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PathUncheckedResponse } from '@azure-rest/core-client'; import { RawHttpHeaders } from '@azure/core-rest-pipeline'; +import { ReadStream } from 'fs'; import { RequestParameters } from '@azure-rest/core-client'; +import { SimplePollerLike } from '@azure/core-lro'; import { StreamableMethod } from '@azure-rest/core-client'; import { TokenCredential } from '@azure/core-auth'; @@ -43,6 +47,12 @@ export type AzureLoadTestingClient = Client & { path: Routes; }; +// @public +export function beginCreateOrUpdateTestRun(client: AzureLoadTestingClient, testId: string, displayName: string, polledOperationOptions?: PolledOperationOptions): Promise; + +// @public +export function beginUploadTestFile(client: AzureLoadTestingClient, testId: string, fileName: string, file: ReadStream, polledOperationOptions?: PolledOperationOptions): Promise; + // @public export interface CertificateMetadata { name?: string; @@ -105,9 +115,10 @@ export interface ErrorResponseBodyOutput { // @public export interface FileInfo { expireDateTime?: Date | string; - filename?: string; + fileName?: string; fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; url?: string; + validationFailureDetails?: string; validationStatus?: "NOT_VALIDATED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED"; } @@ -120,12 +131,16 @@ export interface FileInfoListOutput { // @public export interface FileInfoOutput { expireDateTime?: string; - filename?: string; + fileName?: string; fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; url?: string; + validationFailureDetails?: string; validationStatus?: "NOT_VALIDATED" | "VALIDATION_SUCCESS" | "VALIDATION_FAILURE" | "VALIDATION_INITIATED" | "VALIDATION_NOT_REQUIRED"; } +// @public +export type FileUploadAndValidatePoller = SimplePollerLike, TestGetFile200Response>; + // @public export type GetArrayType = T extends Array ? TData : never; @@ -160,16 +175,16 @@ export function isUnexpected(response: TestDeleteFile204Response | TestDeleteFil export function isUnexpected(response: TestListFiles200Response | TestListFilesDefaultResponse): response is TestListFilesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestCreateOrUpdateAppComponent200Response | TestCreateOrUpdateAppComponent201Response | TestCreateOrUpdateAppComponentDefaultResponse): response is TestCreateOrUpdateAppComponentDefaultResponse; +export function isUnexpected(response: TestCreateOrUpdateAppComponents200Response | TestCreateOrUpdateAppComponents201Response | TestCreateOrUpdateAppComponentsDefaultResponse): response is TestCreateOrUpdateAppComponentsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestGetAppComponents200Response | TestGetAppComponentsDefaultResponse): response is TestGetAppComponentsDefaultResponse; +export function isUnexpected(response: TestListAppComponents200Response | TestListAppComponentsDefaultResponse): response is TestListAppComponentsDefaultResponse; // @public (undocumented) export function isUnexpected(response: TestCreateOrUpdateServerMetricsConfig200Response | TestCreateOrUpdateServerMetricsConfig201Response | TestCreateOrUpdateServerMetricsConfigDefaultResponse): response is TestCreateOrUpdateServerMetricsConfigDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestGetServerMetricsConfig200Response | TestGetServerMetricsConfigDefaultResponse): response is TestGetServerMetricsConfigDefaultResponse; +export function isUnexpected(response: TestListServerMetricsConfig200Response | TestListServerMetricsConfigDefaultResponse): response is TestListServerMetricsConfigDefaultResponse; // @public (undocumented) export function isUnexpected(response: TestRunDelete204Response | TestRunDeleteDefaultResponse): response is TestRunDeleteDefaultResponse; @@ -196,22 +211,22 @@ export function isUnexpected(response: TestRunListMetricNamespaces200Response | export function isUnexpected(response: TestRunListMetricDefinitions200Response | TestRunListMetricDefinitionsDefaultResponse): response is TestRunListMetricDefinitionsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGetMetrics200Response | TestRunGetMetricsDefaultResponse): response is TestRunGetMetricsDefaultResponse; +export function isUnexpected(response: TestRunListMetrics200Response | TestRunListMetricsDefaultResponse): response is TestRunListMetricsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGetMetricDimensionValues200Response | TestRunGetMetricDimensionValuesDefaultResponse): response is TestRunGetMetricDimensionValuesDefaultResponse; +export function isUnexpected(response: TestRunListMetricDimensionValues200Response | TestRunListMetricDimensionValuesDefaultResponse): response is TestRunListMetricDimensionValuesDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunCreateOrUpdateAppComponent200Response | TestRunCreateOrUpdateAppComponent201Response | TestRunCreateOrUpdateAppComponentDefaultResponse): response is TestRunCreateOrUpdateAppComponentDefaultResponse; +export function isUnexpected(response: TestRunCreateOrUpdateAppComponents200Response | TestRunCreateOrUpdateAppComponents201Response | TestRunCreateOrUpdateAppComponentsDefaultResponse): response is TestRunCreateOrUpdateAppComponentsDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGetAppComponents200Response | TestRunGetAppComponentsDefaultResponse): response is TestRunGetAppComponentsDefaultResponse; +export function isUnexpected(response: TestRunListAppComponents200Response | TestRunListAppComponentsDefaultResponse): response is TestRunListAppComponentsDefaultResponse; // @public (undocumented) export function isUnexpected(response: TestRunCreateOrUpdateServerMetricsConfig200Response | TestRunCreateOrUpdateServerMetricsConfig201Response | TestRunCreateOrUpdateServerMetricsConfigDefaultResponse): response is TestRunCreateOrUpdateServerMetricsConfigDefaultResponse; // @public (undocumented) -export function isUnexpected(response: TestRunGetServerMetricsConfig200Response | TestRunGetServerMetricsConfigDefaultResponse): response is TestRunGetServerMetricsConfigDefaultResponse; +export function isUnexpected(response: TestRunListServerMetricsConfig200Response | TestRunListServerMetricsConfigDefaultResponse): response is TestRunListServerMetricsConfigDefaultResponse; // @public export interface LoadTestConfiguration { @@ -350,6 +365,11 @@ export interface PassFailMetricOutput { value?: number; } +// @public (undocumented) +export interface PolledOperationOptions extends OperationOptions { + updateIntervalInMs?: number; +} + // @public export interface ResourceMetric { aggregation: string; @@ -380,18 +400,18 @@ export interface Routes { (path: "/tests"): TestList; (path: "/tests/{testId}/files/{fileName}", testId: string, fileName: string): TestUploadFile; (path: "/tests/{testId}/files", testId: string): TestListFiles; - (path: "/tests/{testId}/app-components", testId: string): TestCreateOrUpdateAppComponent; - (path: "/tests/{testId}/server-metric-configs", testId: string): TestCreateOrUpdateServerMetricsConfig; + (path: "/tests/{testId}/app-components", testId: string): TestCreateOrUpdateAppComponents; + (path: "/tests/{testId}/server-metrics-config", testId: string): TestCreateOrUpdateServerMetricsConfig; (path: "/test-runs/{testRunId}", testRunId: string): TestRunDelete; (path: "/test-runs/{testRunId}/files/{fileName}", testRunId: string, fileName: string): TestRunGetFile; (path: "/test-runs"): TestRunList; (path: "/test-runs/{testRunId}:stop", testRunId: string): TestRunStop; (path: "/test-runs/{testRunId}/metric-namespaces", testRunId: string): TestRunListMetricNamespaces; (path: "/test-runs/{testRunId}/metric-definitions", testRunId: string): TestRunListMetricDefinitions; - (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunGetMetrics; - (path: "/test-runs/{testRunId}/metric-dimension/{name}/values", testRunId: string, name: string): TestRunGetMetricDimensionValues; - (path: "/test-runs/{testRunId}/app-components", testRunId: string): TestRunCreateOrUpdateAppComponent; - (path: "/test-runs/{testRunId}/server-metric-configs", testRunId: string): TestRunCreateOrUpdateServerMetricsConfig; + (path: "/test-runs/{testRunId}/metrics", testRunId: string): TestRunListMetrics; + (path: "/test-runs/{testRunId}/metric-dimensions/{name}/values", testRunId: string, name: string): TestRunListMetricDimensionValues; + (path: "/test-runs/{testRunId}/app-components", testRunId: string): TestRunCreateOrUpdateAppComponents; + (path: "/test-runs/{testRunId}/server-metrics-config", testRunId: string): TestRunCreateOrUpdateServerMetricsConfig; } // @public @@ -470,13 +490,13 @@ export interface TestCreateOrUpdate201Response extends HttpResponse { } // @public (undocumented) -export interface TestCreateOrUpdateAppComponent { - get(options?: TestGetAppComponentsParameters): StreamableMethod; - patch(options: TestCreateOrUpdateAppComponentParameters): StreamableMethod; +export interface TestCreateOrUpdateAppComponents { + get(options?: TestListAppComponentsParameters): StreamableMethod; + patch(options: TestCreateOrUpdateAppComponentsParameters): StreamableMethod; } // @public -export interface TestCreateOrUpdateAppComponent200Response extends HttpResponse { +export interface TestCreateOrUpdateAppComponents200Response extends HttpResponse { // (undocumented) body: TestAppComponentsOutput; // (undocumented) @@ -484,7 +504,7 @@ export interface TestCreateOrUpdateAppComponent200Response extends HttpResponse } // @public -export interface TestCreateOrUpdateAppComponent201Response extends HttpResponse { +export interface TestCreateOrUpdateAppComponents201Response extends HttpResponse { // (undocumented) body: TestAppComponentsOutput; // (undocumented) @@ -492,32 +512,32 @@ export interface TestCreateOrUpdateAppComponent201Response extends HttpResponse } // @public (undocumented) -export interface TestCreateOrUpdateAppComponentBodyParam { +export interface TestCreateOrUpdateAppComponentsBodyParam { body: TestAppComponents; } // @public (undocumented) -export interface TestCreateOrUpdateAppComponentDefaultHeaders { +export interface TestCreateOrUpdateAppComponentsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestCreateOrUpdateAppComponentDefaultResponse extends HttpResponse { +export interface TestCreateOrUpdateAppComponentsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestCreateOrUpdateAppComponentDefaultHeaders; + headers: RawHttpHeaders & TestCreateOrUpdateAppComponentsDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export interface TestCreateOrUpdateAppComponentMediaTypesParam { +export interface TestCreateOrUpdateAppComponentsMediaTypesParam { contentType?: "application/merge-patch+json"; } // @public (undocumented) -export type TestCreateOrUpdateAppComponentParameters = TestCreateOrUpdateAppComponentMediaTypesParam & TestCreateOrUpdateAppComponentBodyParam & RequestParameters; +export type TestCreateOrUpdateAppComponentsParameters = TestCreateOrUpdateAppComponentsMediaTypesParam & TestCreateOrUpdateAppComponentsBodyParam & RequestParameters; // @public (undocumented) export interface TestCreateOrUpdateBodyParam { @@ -549,7 +569,7 @@ export type TestCreateOrUpdateParameters = TestCreateOrUpdateMediaTypesParam & T // @public (undocumented) export interface TestCreateOrUpdateServerMetricsConfig { - get(options?: TestGetServerMetricsConfigParameters): StreamableMethod; + get(options?: TestListServerMetricsConfigParameters): StreamableMethod; patch(options: TestCreateOrUpdateServerMetricsConfigParameters): StreamableMethod; } @@ -657,32 +677,6 @@ export interface TestGet200Response extends HttpResponse { status: "200"; } -// @public -export interface TestGetAppComponents200Response extends HttpResponse { - // (undocumented) - body: TestAppComponentsOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestGetAppComponentsDefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestGetAppComponentsDefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestGetAppComponentsDefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestGetAppComponentsParameters = RequestParameters; - // @public (undocumented) export interface TestGetDefaultHeaders { "x-ms-error-code"?: string; @@ -727,32 +721,6 @@ export type TestGetFileParameters = RequestParameters; // @public (undocumented) export type TestGetParameters = RequestParameters; -// @public -export interface TestGetServerMetricsConfig200Response extends HttpResponse { - // (undocumented) - body: TestServerMetricConfigOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestGetServerMetricsConfigDefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestGetServerMetricsConfigDefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestGetServerMetricsConfigDefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestGetServerMetricsConfigParameters = RequestParameters; - // @public export interface TestInputArtifacts { additionalFileInfo?: Array; @@ -784,6 +752,32 @@ export interface TestList200Response extends HttpResponse { status: "200"; } +// @public +export interface TestListAppComponents200Response extends HttpResponse { + // (undocumented) + body: TestAppComponentsOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestListAppComponentsDefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestListAppComponentsDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestListAppComponentsDefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestListAppComponentsParameters = RequestParameters; + // @public (undocumented) export interface TestListDefaultHeaders { "x-ms-error-code"?: string; @@ -860,6 +854,32 @@ export interface TestListQueryParamProperties { search?: string; } +// @public +export interface TestListServerMetricsConfig200Response extends HttpResponse { + // (undocumented) + body: TestServerMetricConfigOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestListServerMetricsConfigDefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestListServerMetricsConfigDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestListServerMetricsConfigDefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestListServerMetricsConfigParameters = RequestParameters; + // @public export interface TestOutput { certificate?: CertificateMetadataOutput; @@ -958,13 +978,13 @@ export interface TestRunCreateOrUpdate201Response extends HttpResponse { } // @public (undocumented) -export interface TestRunCreateOrUpdateAppComponent { - get(options?: TestRunGetAppComponentsParameters): StreamableMethod; - patch(options: TestRunCreateOrUpdateAppComponentParameters): StreamableMethod; +export interface TestRunCreateOrUpdateAppComponents { + get(options?: TestRunListAppComponentsParameters): StreamableMethod; + patch(options: TestRunCreateOrUpdateAppComponentsParameters): StreamableMethod; } // @public -export interface TestRunCreateOrUpdateAppComponent200Response extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponents200Response extends HttpResponse { // (undocumented) body: TestRunAppComponentsOutput; // (undocumented) @@ -972,7 +992,7 @@ export interface TestRunCreateOrUpdateAppComponent200Response extends HttpRespon } // @public -export interface TestRunCreateOrUpdateAppComponent201Response extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponents201Response extends HttpResponse { // (undocumented) body: TestRunAppComponentsOutput; // (undocumented) @@ -980,32 +1000,32 @@ export interface TestRunCreateOrUpdateAppComponent201Response extends HttpRespon } // @public (undocumented) -export interface TestRunCreateOrUpdateAppComponentBodyParam { +export interface TestRunCreateOrUpdateAppComponentsBodyParam { body: TestRunAppComponents; } // @public (undocumented) -export interface TestRunCreateOrUpdateAppComponentDefaultHeaders { +export interface TestRunCreateOrUpdateAppComponentsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunCreateOrUpdateAppComponentDefaultResponse extends HttpResponse { +export interface TestRunCreateOrUpdateAppComponentsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentDefaultHeaders; + headers: RawHttpHeaders & TestRunCreateOrUpdateAppComponentsDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export interface TestRunCreateOrUpdateAppComponentMediaTypesParam { +export interface TestRunCreateOrUpdateAppComponentsMediaTypesParam { contentType?: "application/merge-patch+json"; } // @public (undocumented) -export type TestRunCreateOrUpdateAppComponentParameters = TestRunCreateOrUpdateAppComponentMediaTypesParam & TestRunCreateOrUpdateAppComponentBodyParam & RequestParameters; +export type TestRunCreateOrUpdateAppComponentsParameters = TestRunCreateOrUpdateAppComponentsMediaTypesParam & TestRunCreateOrUpdateAppComponentsBodyParam & RequestParameters; // @public (undocumented) export interface TestRunCreateOrUpdateBodyParam { @@ -1048,7 +1068,7 @@ export interface TestRunCreateOrUpdateQueryParamProperties { // @public (undocumented) export interface TestRunCreateOrUpdateServerMetricsConfig { - get(options?: TestRunGetServerMetricsConfigParameters): StreamableMethod; + get(options?: TestRunListServerMetricsConfigParameters): StreamableMethod; patch(options: TestRunCreateOrUpdateServerMetricsConfigParameters): StreamableMethod; } @@ -1137,32 +1157,6 @@ export interface TestRunGet200Response extends HttpResponse { status: "200"; } -// @public -export interface TestRunGetAppComponents200Response extends HttpResponse { - // (undocumented) - body: TestRunAppComponentsOutput; - // (undocumented) - status: "200"; -} - -// @public (undocumented) -export interface TestRunGetAppComponentsDefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunGetAppComponentsDefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunGetAppComponentsDefaultHeaders; - // (undocumented) - status: string; -} - -// @public (undocumented) -export type TestRunGetAppComponentsParameters = RequestParameters; - // @public (undocumented) export interface TestRunGetDefaultHeaders { "x-ms-error-code"?: string; @@ -1210,254 +1204,254 @@ export interface TestRunGetFileDefaultResponse extends HttpResponse { export type TestRunGetFileParameters = RequestParameters; // @public (undocumented) -export interface TestRunGetMetricDimensionValues { - get(options: TestRunGetMetricDimensionValuesParameters): StreamableMethod; +export type TestRunGetParameters = RequestParameters; + +// @public +export interface TestRunInputArtifacts { + additionalFileInfo?: Array; + configFileInfo?: FileInfo; + inputArtifactsZipFileInfo?: FileInfo; + testScriptFileInfo?: FileInfo; + userPropFileInfo?: FileInfo; +} + +// @public +export interface TestRunInputArtifactsOutput { + additionalFileInfo?: Array; + configFileInfo?: FileInfoOutput; + inputArtifactsZipFileInfo?: FileInfoOutput; + testScriptFileInfo?: FileInfoOutput; + userPropFileInfo?: FileInfoOutput; +} + +// @public (undocumented) +export interface TestRunList { + get(options?: TestRunListParameters): StreamableMethod; } // @public -export interface TestRunGetMetricDimensionValues200Response extends HttpResponse { +export interface TestRunList200Response extends HttpResponse { // (undocumented) - body: DimensionValueListOutput; + body: TestRunsListOutput; + // (undocumented) + status: "200"; +} + +// @public +export interface TestRunListAppComponents200Response extends HttpResponse { + // (undocumented) + body: TestRunAppComponentsOutput; // (undocumented) status: "200"; } // @public (undocumented) -export interface TestRunGetMetricDimensionValuesDefaultHeaders { +export interface TestRunListAppComponentsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunGetMetricDimensionValuesDefaultResponse extends HttpResponse { +export interface TestRunListAppComponentsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunGetMetricDimensionValuesDefaultHeaders; + headers: RawHttpHeaders & TestRunListAppComponentsDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export type TestRunGetMetricDimensionValuesParameters = TestRunGetMetricDimensionValuesQueryParam & RequestParameters; +export type TestRunListAppComponentsParameters = RequestParameters; // @public (undocumented) -export interface TestRunGetMetricDimensionValuesQueryParam { - // (undocumented) - queryParameters: TestRunGetMetricDimensionValuesQueryParamProperties; +export interface TestRunListDefaultHeaders { + "x-ms-error-code"?: string; } -// @public (undocumented) -export interface TestRunGetMetricDimensionValuesQueryParamProperties { - interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; - metricname: string; - metricNamespace: string; - timespan: string; +// @public +export interface TestRunListDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunListDefaultHeaders; + // (undocumented) + status: string; } // @public (undocumented) -export interface TestRunGetMetrics { - post(options: TestRunGetMetricsParameters): StreamableMethod; +export interface TestRunListMetricDefinitions { + get(options: TestRunListMetricDefinitionsParameters): StreamableMethod; } // @public -export interface TestRunGetMetrics200Response extends HttpResponse { +export interface TestRunListMetricDefinitions200Response extends HttpResponse { // (undocumented) - body: MetricsOutput; + body: MetricDefinitionCollectionOutput; // (undocumented) status: "200"; } // @public (undocumented) -export interface TestRunGetMetricsBodyParam { - body?: MetricRequestPayload; -} - -// @public (undocumented) -export interface TestRunGetMetricsDefaultHeaders { +export interface TestRunListMetricDefinitionsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunGetMetricsDefaultResponse extends HttpResponse { +export interface TestRunListMetricDefinitionsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunGetMetricsDefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricDefinitionsDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export interface TestRunGetMetricsMediaTypesParam { - contentType?: "application/json"; -} - -// @public (undocumented) -export type TestRunGetMetricsParameters = TestRunGetMetricsQueryParam & TestRunGetMetricsMediaTypesParam & TestRunGetMetricsBodyParam & RequestParameters; +export type TestRunListMetricDefinitionsParameters = TestRunListMetricDefinitionsQueryParam & RequestParameters; // @public (undocumented) -export interface TestRunGetMetricsQueryParam { +export interface TestRunListMetricDefinitionsQueryParam { // (undocumented) - queryParameters: TestRunGetMetricsQueryParamProperties; + queryParameters: TestRunListMetricDefinitionsQueryParamProperties; } // @public (undocumented) -export interface TestRunGetMetricsQueryParamProperties { - aggregation?: string; - interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; - metricname: string; +export interface TestRunListMetricDefinitionsQueryParamProperties { metricNamespace: string; - timespan: string; } // @public (undocumented) -export type TestRunGetParameters = RequestParameters; +export interface TestRunListMetricDimensionValues { + get(options: TestRunListMetricDimensionValuesParameters): StreamableMethod; +} // @public -export interface TestRunGetServerMetricsConfig200Response extends HttpResponse { +export interface TestRunListMetricDimensionValues200Response extends HttpResponse { // (undocumented) - body: TestRunServerMetricConfigOutput; + body: DimensionValueListOutput; // (undocumented) status: "200"; } // @public (undocumented) -export interface TestRunGetServerMetricsConfigDefaultHeaders { +export interface TestRunListMetricDimensionValuesDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunGetServerMetricsConfigDefaultResponse extends HttpResponse { +export interface TestRunListMetricDimensionValuesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunGetServerMetricsConfigDefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricDimensionValuesDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export type TestRunGetServerMetricsConfigParameters = RequestParameters; +export type TestRunListMetricDimensionValuesParameters = TestRunListMetricDimensionValuesQueryParam & RequestParameters; -// @public -export interface TestRunInputArtifacts { - additionalFileInfo?: Array; - configFileInfo?: FileInfo; - inputArtifactsZipFileInfo?: FileInfo; - testScriptFileInfo?: FileInfo; - userPropFileInfo?: FileInfo; +// @public (undocumented) +export interface TestRunListMetricDimensionValuesQueryParam { + // (undocumented) + queryParameters: TestRunListMetricDimensionValuesQueryParamProperties; } -// @public -export interface TestRunInputArtifactsOutput { - additionalFileInfo?: Array; - configFileInfo?: FileInfoOutput; - inputArtifactsZipFileInfo?: FileInfoOutput; - testScriptFileInfo?: FileInfoOutput; - userPropFileInfo?: FileInfoOutput; +// @public (undocumented) +export interface TestRunListMetricDimensionValuesQueryParamProperties { + interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; + metricname: string; + metricNamespace: string; + timespan: string; } // @public (undocumented) -export interface TestRunList { - get(options?: TestRunListParameters): StreamableMethod; +export interface TestRunListMetricNamespaces { + get(options?: TestRunListMetricNamespacesParameters): StreamableMethod; } // @public -export interface TestRunList200Response extends HttpResponse { +export interface TestRunListMetricNamespaces200Response extends HttpResponse { // (undocumented) - body: TestRunsListOutput; + body: MetricNamespaceCollectionOutput; // (undocumented) status: "200"; } // @public (undocumented) -export interface TestRunListDefaultHeaders { +export interface TestRunListMetricNamespacesDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunListDefaultResponse extends HttpResponse { +export interface TestRunListMetricNamespacesDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunListDefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricNamespacesDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export interface TestRunListMetricDefinitions { - get(options: TestRunListMetricDefinitionsParameters): StreamableMethod; +export type TestRunListMetricNamespacesParameters = RequestParameters; + +// @public (undocumented) +export interface TestRunListMetrics { + post(options: TestRunListMetricsParameters): StreamableMethod; } // @public -export interface TestRunListMetricDefinitions200Response extends HttpResponse { +export interface TestRunListMetrics200Response extends HttpResponse { // (undocumented) - body: MetricDefinitionCollectionOutput; + body: MetricsOutput; // (undocumented) status: "200"; } // @public (undocumented) -export interface TestRunListMetricDefinitionsDefaultHeaders { +export interface TestRunListMetricsBodyParam { + body?: MetricRequestPayload; +} + +// @public (undocumented) +export interface TestRunListMetricsDefaultHeaders { "x-ms-error-code"?: string; } // @public -export interface TestRunListMetricDefinitionsDefaultResponse extends HttpResponse { +export interface TestRunListMetricsDefaultResponse extends HttpResponse { // (undocumented) body: ErrorResponseBodyOutput; // (undocumented) - headers: RawHttpHeaders & TestRunListMetricDefinitionsDefaultHeaders; + headers: RawHttpHeaders & TestRunListMetricsDefaultHeaders; // (undocumented) status: string; } // @public (undocumented) -export type TestRunListMetricDefinitionsParameters = TestRunListMetricDefinitionsQueryParam & RequestParameters; - -// @public (undocumented) -export interface TestRunListMetricDefinitionsQueryParam { - // (undocumented) - queryParameters: TestRunListMetricDefinitionsQueryParamProperties; +export interface TestRunListMetricsMediaTypesParam { + contentType?: "application/json"; } // @public (undocumented) -export interface TestRunListMetricDefinitionsQueryParamProperties { - metricNamespace: string; -} +export type TestRunListMetricsParameters = TestRunListMetricsQueryParam & TestRunListMetricsMediaTypesParam & TestRunListMetricsBodyParam & RequestParameters; // @public (undocumented) -export interface TestRunListMetricNamespaces { - get(options?: TestRunListMetricNamespacesParameters): StreamableMethod; -} - -// @public -export interface TestRunListMetricNamespaces200Response extends HttpResponse { +export interface TestRunListMetricsQueryParam { // (undocumented) - body: MetricNamespaceCollectionOutput; - // (undocumented) - status: "200"; + queryParameters: TestRunListMetricsQueryParamProperties; } // @public (undocumented) -export interface TestRunListMetricNamespacesDefaultHeaders { - "x-ms-error-code"?: string; -} - -// @public -export interface TestRunListMetricNamespacesDefaultResponse extends HttpResponse { - // (undocumented) - body: ErrorResponseBodyOutput; - // (undocumented) - headers: RawHttpHeaders & TestRunListMetricNamespacesDefaultHeaders; - // (undocumented) - status: string; +export interface TestRunListMetricsQueryParamProperties { + aggregation?: string; + interval?: "PT5S" | "PT10S" | "PT1M" | "PT5M" | "PT1H"; + metricname: string; + metricNamespace: string; + timespan: string; } -// @public (undocumented) -export type TestRunListMetricNamespacesParameters = RequestParameters; - // @public (undocumented) export type TestRunListParameters = TestRunListQueryParam & RequestParameters; @@ -1479,6 +1473,32 @@ export interface TestRunListQueryParamProperties { testId?: string; } +// @public +export interface TestRunListServerMetricsConfig200Response extends HttpResponse { + // (undocumented) + body: TestRunServerMetricConfigOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface TestRunListServerMetricsConfigDefaultHeaders { + "x-ms-error-code"?: string; +} + +// @public +export interface TestRunListServerMetricsConfigDefaultResponse extends HttpResponse { + // (undocumented) + body: ErrorResponseBodyOutput; + // (undocumented) + headers: RawHttpHeaders & TestRunListServerMetricsConfigDefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type TestRunListServerMetricsConfigParameters = RequestParameters; + // @public export interface TestRunOutput { certificate?: CertificateMetadataOutput; @@ -1510,14 +1530,14 @@ export interface TestRunOutput { // @public export interface TestRunOutputArtifacts { - logsUrl?: FileInfo; - resultUrl?: FileInfo; + logsFileInfo?: FileInfo; + resultFileInfo?: FileInfo; } // @public export interface TestRunOutputArtifactsOutput { - logsUrl?: FileInfoOutput; - resultUrl?: FileInfoOutput; + logsFileInfo?: FileInfoOutput; + resultFileInfo?: FileInfoOutput; } // @public @@ -1582,6 +1602,9 @@ export interface TestRunStatisticsOutput { transaction?: string; } +// @public (undocumented) +export type TestRunStatusPoller = SimplePollerLike, TestRunGet200Response>; + // @public (undocumented) export interface TestRunStop { post(options?: TestRunStopParameters): StreamableMethod; diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 51289bb3719c..07846d982b02 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -8,7 +8,12 @@ * @azsdk-weight 10 */ -import AzureLoadTesting, { isUnexpected, beginCreateOrUpdateTestRun, beginUploadTestFile } from "@azure-rest/load-testing"; +import AzureLoadTesting, { + isUnexpected, + beginCreateOrUpdateTestRun, + beginUploadTestFile, +} from "@azure-rest/load-testing"; +import { AbortController } from "@azure/abort-controller"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; @@ -20,7 +25,6 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test - const testRunId = uuidv4(); // ID to be assigned to a testRun // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); @@ -45,10 +49,18 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample", readStream); - const fileUploadResult = await fileUploadPoller.pollUntilDone(); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", readStream); + const fileUploadResult = await fileUploadPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + + if (fileUploadPoller.getOperationState().status != "succeeded") + throw new Error( + "There is some issue in validation, please make sure uploaded file is a valid JMX." + + fileUploadResult + ); - if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX." + fileUploadResult); + console.log(fileUploadResult); // Creating/Updating app component const appComponentCreationResult = await client @@ -75,71 +87,76 @@ async function main() { // Creating/Updating the test run const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); - const testRunResult = await testRunPoller.pollUntilDone(); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); - if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + if (fileUploadPoller.getOperationState().status != "succeeded" && testRunResult) + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); let testRunStarttime = testRunResult.body.startDateTime; let testRunEndTime = testRunResult.body.endDateTime; + let testRunId = testRunResult.body.testRunId; + if (testRunId) { + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); - // get list of all metric namespaces and pick the first one - let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunResult.body.testRunId) - .get(); - - if (isUnexpected(metricNamespaces)) { - throw metricNamespaces.body.error; - } + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } - let metricNamespace = metricNamespaces.body.value[0]; + let metricDefinition = metricDefinitions.body.value[0]; - if (metricNamespace.name === undefined) { - throw "No Metric Namespace name is defined."; - } + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } - // get list of all metric definitions and pick the first one - let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunResult.body.testRunId) - .get({ + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ queryParameters: { + metricname: metricDefinition.name, metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, }, }); - if (isUnexpected(metricDefinitions)) { - throw metricDefinitions.body.error; - } - - let metricDefinition = metricDefinitions.body.value[0]; - - if (metricDefinition.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ - queryParameters: { - metricname: metricDefinition.name, - metricNamespace: metricNamespace.name, - timespan: testRunStarttime + "/" + testRunEndTime, - }, - }); + console.log(metricsResult); + console.log(testRunResult); - console.log(metricsResult); - console.log(getTestRunResult); + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - - if (isUnexpected(deleteTestRunResult)) { - throw deleteTestRunResult.body.error; - } + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } - // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); - if (isUnexpected(deleteTestResult)) { - throw deleteTestResult.body.error; + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } } } diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts index e159d83efa19..6323ddcd15be 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts @@ -1,7 +1,7 @@ /** - * This sample demonstrates how to run a test and get test status + * This sample demonstrates how to run a test and stop execution * - * @summary creates and run a loadtest + * @summary creates, run and stop a loadtest * @azsdk-weight 10 */ @@ -55,35 +55,14 @@ async function main() { throw new Error("Test Run ID returned as undefined."); // Checking the test run status - var testStatus = null; - var getTestRunResult; const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); - //wait for terminal state - while ( - testStatus == null || - (testStatus != "EXECUTING" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; + sleep(30000); - //Check test status after every 5 seconds - sleep(5000); - } - - if (testStatus == "EXECUTING") { - let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); - - if (isUnexpected(stopTestRunResult)) { - throw stopTestRunResult.body.error; - } + let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); - console.log("Test run is stopped."); + if (isUnexpected(stopTestRunResult)) { + throw stopTestRunResult.body.error; } } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md index 2f76ccbe09a9..9ac0b70542de 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md @@ -11,10 +11,10 @@ urlFragment: load-testing-javascript-beta These sample programs show how to use the JavaScript client libraries for Azure Load Testing rest in some common scenarios. -| **File Name** | **Description** | -| ----------------------- | -------------------------- | -| [sample.js][sample] | creates and run a loadtest | -| [stopTest.js][stoptest] | creates and run a loadtest | +| **File Name** | **Description** | +| ----------------------- | -------------------------------- | +| [sample.js][sample] | creates and run a loadtest | +| [stopTest.js][stoptest] | creates, run and stop a loadtest | ## Prerequisites diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index 25eaddc06e0c..733769e7d40c 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -89,16 +89,8 @@ async function main() { if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - //Getting the test run - var getTestRunResult = await client - .path("/test-runs/{testRunId}", testRunResult.body.testRunId) - .get(); - - if (isUnexpected(getTestRunResult)) - throw new Error("There is some issue in getting the test run."); - - let testRunStarttime = getTestRunResult.body.startDateTime; - let testRunEndTime = getTestRunResult.body.endDateTime; + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; // get list of all metric namespaces and pick the first one let metricNamespaces = await client @@ -144,7 +136,7 @@ async function main() { }); console.log(metricsResult); - console.log(getTestRunResult); + console.log(testRunResult); // Deleting test run let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js index b7aebde176d1..a85e77eca76e 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js @@ -1,7 +1,7 @@ /** - * This sample demonstrates how to run a test and get test status + * This sample demonstrates how to run a test and stop execution * - * @summary creates and run a loadtest + * @summary creates, run and stop a loadtest */ const AzureLoadTesting = require("@azure-rest/load-testing").default, @@ -55,35 +55,14 @@ async function main() { throw new Error("Test Run ID returned as undefined."); // Checking the test run status - var testStatus = null; - var getTestRunResult; const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); - //wait for terminal state - while ( - testStatus == null || - (testStatus != "EXECUTING" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; + sleep(30000); - //Check test status after every 5 seconds - sleep(5000); - } - - if (testStatus == "EXECUTING") { - let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); - - if (isUnexpected(stopTestRunResult)) { - throw stopTestRunResult.body.error; - } + let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); - console.log("Test run is stopped."); + if (isUnexpected(stopTestRunResult)) { + throw stopTestRunResult.body.error; } } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md index 00a876ba1a1d..688974679c5e 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md @@ -11,10 +11,10 @@ urlFragment: load-testing-typescript-beta These sample programs show how to use the TypeScript client libraries for Azure Load Testing rest in some common scenarios. -| **File Name** | **Description** | -| ----------------------- | -------------------------- | -| [sample.ts][sample] | creates and run a loadtest | -| [stopTest.ts][stoptest] | creates and run a loadtest | +| **File Name** | **Description** | +| ----------------------- | -------------------------------- | +| [sample.ts][sample] | creates and run a loadtest | +| [stopTest.ts][stoptest] | creates, run and stop a loadtest | ## Prerequisites diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index fd762c9e682b..561d6433d3e4 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -7,7 +7,11 @@ * @summary creates and run a loadtest */ -import AzureLoadTesting, { isUnexpected, beginCreateOrUpdateTestRun, beginUploadTestFile } from "@azure-rest/load-testing"; +import AzureLoadTesting, { + isUnexpected, + beginCreateOrUpdateTestRun, + beginUploadTestFile, +} from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; @@ -44,10 +48,14 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample", readStream); - const fileUploadResult = await fileUploadPoller.pollUntilDone(); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample", readStream); + const fileUploadResult = await fileUploadPoller.pollUntilDone(); - if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in validation, please make sure uploaded file is a valid JMX." + fileUploadResult); + if (fileUploadPoller.getOperationState().status != "succeeded") + throw new Error( + "There is some issue in validation, please make sure uploaded file is a valid JMX." + + fileUploadResult + ); // Creating/Updating app component const appComponentCreationResult = await client @@ -76,15 +84,11 @@ async function main() { const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); const testRunResult = await testRunPoller.pollUntilDone(); - if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + if (fileUploadPoller.getOperationState().status != "succeeded") + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - //Getting the test run - var getTestRunResult = await client.path("/test-runs/{testRunId}", testRunResult.body.testRunId).get(); - - if (isUnexpected(getTestRunResult)) throw new Error("There is some issue in getting the test run."); - - let testRunStarttime = getTestRunResult.body.startDateTime; - let testRunEndTime = getTestRunResult.body.endDateTime; + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; // get list of all metric namespaces and pick the first one let metricNamespaces = await client @@ -130,7 +134,7 @@ async function main() { }); console.log(metricsResult); - console.log(getTestRunResult); + console.log(testRunResult); // Deleting test run let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts index 0f6c5ee1e685..a683dec5e999 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts @@ -1,7 +1,7 @@ /** - * This sample demonstrates how to run a test and get test status + * This sample demonstrates how to run a test and stop execution * - * @summary creates and run a loadtest + * @summary creates, run and stop a loadtest */ import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; @@ -54,35 +54,14 @@ async function main() { throw new Error("Test Run ID returned as undefined."); // Checking the test run status - var testStatus = null; - var getTestRunResult; const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms)); - //wait for terminal state - while ( - testStatus == null || - (testStatus != "EXECUTING" && testStatus != "CANCELLED" && testStatus != "FAILED") - ) { - getTestRunResult = await client - .path("/test-runs/{testRunId}", testRunCreationResult.body.testRunId) - .get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - testStatus = getTestRunResult.body.status; + sleep(30000); - //Check test status after every 5 seconds - sleep(5000); - } - - if (testStatus == "EXECUTING") { - let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); - - if (isUnexpected(stopTestRunResult)) { - throw stopTestRunResult.body.error; - } + let stopTestRunResult = await client.path("/test-runs/{testRunId}:stop", testRunId).post(); - console.log("Test run is stopped."); + if (isUnexpected(stopTestRunResult)) { + throw stopTestRunResult.body.error; } } main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index a6d7b3ec7e50..9cede719bb2a 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -22,7 +22,7 @@ export async function beginCreateOrUpdateTestRun( polledOperationOptions: PolledOperationOptions = {} ): Promise { const testRunId = uuidv4(); // ID to be assigned to a testRun - // Creating the test run + // Creating the test run const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ contentType: "application/merge-patch+json", body: { diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts index c2bc0f6a9cfd..3afd29d1fe8b 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts @@ -5,9 +5,7 @@ import { AbortController, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./index.js"; -import { - TestGetFile200Response, -} from "./responses"; +import { TestGetFile200Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; import { ReadStream } from "fs"; diff --git a/sdk/loadtestservice/load-testing-rest/src/index.ts b/sdk/loadtestservice/load-testing-rest/src/index.ts index 55de0dede5ba..13cd53dedb9a 100644 --- a/sdk/loadtestservice/load-testing-rest/src/index.ts +++ b/sdk/loadtestservice/load-testing-rest/src/index.ts @@ -11,6 +11,6 @@ export * from "./isUnexpected"; export * from "./models"; export * from "./outputModels"; export * from "./paginateHelper"; -export {beginCreateOrUpdateTestRun} from "./beginCreateOrUpdateTestRun"; -export {beginUploadTestFile} from "./beginUploadTestFile"; +export { beginCreateOrUpdateTestRun } from "./beginCreateOrUpdateTestRun"; +export { beginUploadTestFile } from "./beginUploadTestFile"; export default AzureLoadTesting; diff --git a/sdk/loadtestservice/load-testing-rest/test/public/createAppComponent.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/createAppComponent.spec.ts deleted file mode 100644 index 485cefa305db..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/createAppComponent.spec.ts +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, env } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createRecorder, createClient } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; - -describe("Create app component", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create the app components", async () => { - const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; - const result = await client.path("/tests/{testId}/app-components", "appcomp123").patch({ - contentType: "application/merge-patch+json", - body: { - testId: "abc", - components: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - assert.include(["200", "201"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/createLoadTest.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/createLoadTest.spec.ts deleted file mode 100644 index e5952521c5b9..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/createLoadTest.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { assert } from "chai"; -import { createClient, createRecorder } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; -import { Recorder } from "@azure-tools/test-recorder"; - -describe("Test Creation", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create a loadtest", async () => { - const result = await client.path("/tests/{testId}", "abc").patch({ - contentType: "application/merge-patch+json", - body: { - displayName: "sample_test", - description: "", - loadTestConfiguration: { - engineInstances: 1, - splitAllCSVs: false, - }, - }, - }); - - assert.include(["200", "201"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts deleted file mode 100644 index 1993e52276b9..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/createTestRun.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createRecorder, createClient } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; - -describe("Test Run Creation", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - client = createClient(recorder); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should create a test run", async () => { - const result = await client.path("/test-runs/{testRunId}", "abcde").patch({ - contentType: "application/merge-patch+json", - body: { - testId: "abc", - displayName: "sample_testrun", - virtualUsers: 10, - }, - }); - - assert.include(["200"], result.status); - }); - - it("should get a test run", async () => { - const result = await client.path("/test-runs/{testRunId}", "abcde").get(); - - assert.include(["200"], result.status); - }); -}); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts index 545bcaf89218..4c3dc3f02791 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts @@ -27,6 +27,7 @@ describe("Test Creation", () => { await recorder.stop(); }); + //patch/put it("should create a loadtest", async () => { const result = await client.path("/tests/{testId}", "abc").patch({ contentType: "application/merge-patch+json", @@ -44,17 +45,19 @@ describe("Test Creation", () => { }); it("should upload the test file", async () => { - const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "fileName").put({ - contentType: "application/octet-stream", - body: readStream, - }); + const result = await client + .path("/tests/{testId}/files/{fileName}", "abc", "fileName.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); assert.include(["201"], result.status); }); it("should create the app components", async () => { const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; - const result = await client.path("/tests/{testId}/app-components", "appcomp123").patch({ + const result = await client.path("/tests/{testId}/app-components", "abc").patch({ contentType: "application/merge-patch+json", body: { testId: "abc", @@ -73,9 +76,11 @@ describe("Test Creation", () => { assert.include(["200", "201"], result.status); }); - //get + //get it("should get the test file", async () => { - const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "fileName").get(); + const result = await client + .path("/tests/{testId}/files/{fileName}", "abc", "fileName.jmx") + .get(); assert.include(["200"], result.status); }); @@ -94,7 +99,9 @@ describe("Test Creation", () => { //delete it("should delete the test file", async () => { - const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "fileName").delete(); + const result = await client + .path("/tests/{testId}/files/{fileName}", "abc", "fileName.jmx") + .delete(); assert.include(["204"], result.status); }); @@ -104,6 +111,4 @@ describe("Test Creation", () => { assert.include(["204"], result.status); }); - - }); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts index 9ff4f5695ace..433b78f2f4f9 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts @@ -21,6 +21,22 @@ describe("Test Run Creation", () => { await recorder.stop(); }); + it("should create a loadtest", async () => { + const result = await client.path("/tests/{testId}", "abc").patch({ + contentType: "application/merge-patch+json", + body: { + displayName: "sample_test", + description: "", + loadTestConfiguration: { + engineInstances: 1, + splitAllCSVs: false, + }, + }, + }); + + assert.include(["200", "201"], result.status); + }); + it("should create a test run", async () => { const result = await client.path("/test-runs/{testRunId}", "abcde").patch({ contentType: "application/merge-patch+json", @@ -31,7 +47,7 @@ describe("Test Run Creation", () => { }, }); - assert.include(["200"], result.status); + assert.include(["200", "201"], result.status); }); it("should get a test run", async () => { @@ -59,12 +75,6 @@ describe("Test Run Creation", () => { assert.include(["200"], result.status); }); - it("should get a test run file", async () => { - const result = await client.path("/test-runs/{testRunId}/files/{fileName}", "abcde", "filename").get(); - - assert.include(["200"], result.status); - }); - it("should get a test run app components", async () => { const result = await client.path("/test-runs/{testRunId}/app-components", "abcde").get(); @@ -82,5 +92,4 @@ describe("Test Run Creation", () => { assert.include(["204"], result.status); }); - }); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts deleted file mode 100644 index 59e779486650..000000000000 --- a/sdk/loadtestservice/load-testing-rest/test/public/uploadTestFile.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; -import { assert } from "chai"; -import { createClient, createRecorder } from "./utils/recordedClient"; -import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; -import * as fs from "fs"; -import { isNode } from "@azure/core-util"; - -describe("File Upload", () => { - let recorder: Recorder; - let client: AzureLoadTestingClient; - let readStream: fs.ReadStream; - - beforeEach(async function (this: Context) { - recorder = await createRecorder(this); - if (!isNode || isPlaybackMode()) { - this.skip(); - } - client = createClient(recorder); - readStream = fs.createReadStream("./test/public/sample.jmx"); - }); - - afterEach(async function () { - await recorder.stop(); - }); - - it("should upload the test file", async () => { - const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "xyz12365").put({ - contentType: "application/octet-stream", - body: readStream, - }); - - assert.include(["201"], result.status); - }); -}); From 2622ddf7a0a5c9c46241737d56a15f0560d51405 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 14:07:09 +0530 Subject: [PATCH 29/60] New Samples generated and corrected broken link --- .../samples/v1-beta/javascript/README.md | 2 +- .../samples/v1-beta/javascript/package.json | 1 + .../samples/v1-beta/javascript/sample.js | 110 ++++++++++-------- .../samples/v1-beta/typescript/README.md | 2 +- .../samples/v1-beta/typescript/package.json | 1 + .../samples/v1-beta/typescript/src/sample.ts | 110 ++++++++++-------- 6 files changed, 122 insertions(+), 104 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md index 9ac0b70542de..d64f2764a500 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md @@ -58,7 +58,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json index 29a6ea7e4985..9e4f2280e452 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json @@ -28,6 +28,7 @@ "dependencies": { "@azure-rest/load-testing": "next", "dotenv": "latest", + "@azure/abort-controller": "~1.1.1", "@azure/identity": "^2.0.1", "uuid": "^9.0.0" } diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index 733769e7d40c..86b1e08e783a 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -13,6 +13,7 @@ const AzureLoadTesting = require("@azure-rest/load-testing").default, beginCreateOrUpdateTestRun, beginUploadTestFile, } = require("@azure-rest/load-testing"); +const { AbortController } = require("@azure/abort-controller"); const { DefaultAzureCredential } = require("@azure/identity"); const { createReadStream } = require("fs"); const { v4: uuidv4 } = require("uuid"); @@ -24,7 +25,6 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test - const testRunId = uuidv4(); // ID to be assigned to a testRun // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); @@ -49,8 +49,10 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample", readStream); - const fileUploadResult = await fileUploadPoller.pollUntilDone(); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", readStream); + const fileUploadResult = await fileUploadPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error( @@ -58,6 +60,8 @@ async function main() { fileUploadResult ); + console.log(fileUploadResult); + // Creating/Updating app component const appComponentCreationResult = await client .path("/tests/{testId}/app-components", testId) @@ -84,72 +88,76 @@ async function main() { // Creating/Updating the test run const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); - const testRunResult = await testRunPoller.pollUntilDone(); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); - if (fileUploadPoller.getOperationState().status != "succeeded") + if (fileUploadPoller.getOperationState().status != "succeeded" && testRunResult) throw new Error("There is some issue in running the test, Error Response : " + testRunResult); let testRunStarttime = testRunResult.body.startDateTime; let testRunEndTime = testRunResult.body.endDateTime; + let testRunId = testRunResult.body.testRunId; + if (testRunId) { + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); - // get list of all metric namespaces and pick the first one - let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunResult.body.testRunId) - .get(); - - if (isUnexpected(metricNamespaces)) { - throw metricNamespaces.body.error; - } + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } - let metricNamespace = metricNamespaces.body.value[0]; + let metricDefinition = metricDefinitions.body.value[0]; - if (metricNamespace.name === undefined) { - throw "No Metric Namespace name is defined."; - } + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } - // get list of all metric definitions and pick the first one - let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunResult.body.testRunId) - .get({ + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ queryParameters: { + metricname: metricDefinition.name, metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, }, }); - if (isUnexpected(metricDefinitions)) { - throw metricDefinitions.body.error; - } + console.log(metricsResult); + console.log(testRunResult); - let metricDefinition = metricDefinitions.body.value[0]; + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - if (metricDefinition.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ - queryParameters: { - metricname: metricDefinition.name, - metricNamespace: metricNamespace.name, - timespan: testRunStarttime + "/" + testRunEndTime, - }, - }); - - console.log(metricsResult); - console.log(testRunResult); - - // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - - if (isUnexpected(deleteTestRunResult)) { - throw deleteTestRunResult.body.error; - } + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } - // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); - if (isUnexpected(deleteTestResult)) { - throw deleteTestResult.body.error; + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } } } diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md index 688974679c5e..5bbf0b6fecda 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md @@ -70,7 +70,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json index d68e2da1914a..d689d27f31df 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json @@ -32,6 +32,7 @@ "dependencies": { "@azure-rest/load-testing": "next", "dotenv": "latest", + "@azure/abort-controller": "~1.1.1", "@azure/identity": "^2.0.1", "uuid": "^9.0.0" }, diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index 561d6433d3e4..2aafc9dc537d 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -12,6 +12,7 @@ import AzureLoadTesting, { beginCreateOrUpdateTestRun, beginUploadTestFile, } from "@azure-rest/load-testing"; +import { AbortController } from "@azure/abort-controller"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; @@ -23,7 +24,6 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test - const testRunId = uuidv4(); // ID to be assigned to a testRun // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); @@ -48,8 +48,10 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample", readStream); - const fileUploadResult = await fileUploadPoller.pollUntilDone(); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", readStream); + const fileUploadResult = await fileUploadPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error( @@ -57,6 +59,8 @@ async function main() { fileUploadResult ); + console.log(fileUploadResult); + // Creating/Updating app component const appComponentCreationResult = await client .path("/tests/{testId}/app-components", testId) @@ -82,72 +86,76 @@ async function main() { // Creating/Updating the test run const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); - const testRunResult = await testRunPoller.pollUntilDone(); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); - if (fileUploadPoller.getOperationState().status != "succeeded") + if (fileUploadPoller.getOperationState().status != "succeeded" && testRunResult) throw new Error("There is some issue in running the test, Error Response : " + testRunResult); let testRunStarttime = testRunResult.body.startDateTime; let testRunEndTime = testRunResult.body.endDateTime; + let testRunId = testRunResult.body.testRunId; + if (testRunId) { + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); - // get list of all metric namespaces and pick the first one - let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunResult.body.testRunId) - .get(); - - if (isUnexpected(metricNamespaces)) { - throw metricNamespaces.body.error; - } + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } - let metricNamespace = metricNamespaces.body.value[0]; + let metricDefinition = metricDefinitions.body.value[0]; - if (metricNamespace.name === undefined) { - throw "No Metric Namespace name is defined."; - } + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } - // get list of all metric definitions and pick the first one - let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunResult.body.testRunId) - .get({ + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ queryParameters: { + metricname: metricDefinition.name, metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, }, }); - if (isUnexpected(metricDefinitions)) { - throw metricDefinitions.body.error; - } + console.log(metricsResult); + console.log(testRunResult); - let metricDefinition = metricDefinitions.body.value[0]; + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - if (metricDefinition.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ - queryParameters: { - metricname: metricDefinition.name, - metricNamespace: metricNamespace.name, - timespan: testRunStarttime + "/" + testRunEndTime, - }, - }); - - console.log(metricsResult); - console.log(testRunResult); - - // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - - if (isUnexpected(deleteTestRunResult)) { - throw deleteTestRunResult.body.error; - } + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } - // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); - if (isUnexpected(deleteTestResult)) { - throw deleteTestResult.body.error; + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } } } From fc9b6671bfd762d29cd3d7154df94286e8857b07 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 14:24:31 +0530 Subject: [PATCH 30/60] Update sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts Co-authored-by: Deyaaeldeen Almahallawi --- sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts index 6323ddcd15be..96c70a2ee1b9 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts @@ -18,7 +18,7 @@ async function main() { // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - // Creating a load test + // Patching a load test const testCreationResult = await client.path("/tests/{testId}", testId).patch({ contentType: "application/merge-patch+json", body: { From d11b9d359073cfc9d9a7d7901c1a6baf06d50099 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 16:49:25 +0530 Subject: [PATCH 31/60] Update sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts Co-authored-by: Deyaaeldeen Almahallawi --- sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts index 96c70a2ee1b9..daa145545c5b 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/stopTest.ts @@ -37,7 +37,7 @@ async function main() { if (testCreationResult.body.testId === undefined) throw new Error("Test ID returned as undefined."); - // Creating the test run + // Patching the test run const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ contentType: "application/merge-patch+json", body: { From baa818ce11b05bf6392e3266a03ef55ba941256f Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 16:51:09 +0530 Subject: [PATCH 32/60] Update sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts Co-authored-by: Deyaaeldeen Almahallawi --- .../load-testing-rest/src/beginUploadTestFile.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts index 3afd29d1fe8b..8bef67f98c22 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts @@ -77,9 +77,6 @@ export async function beginUploadTestFile( await processProgressCallbacks(); - if (state.status === "failed") { - throw state.error; - } }, pollUntilDone(pollOptions?: { From 834affb4fde75d7a42cf7b1c982071c9b68ccfa4 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 17:01:43 +0530 Subject: [PATCH 33/60] Added Sleep Utility --- .../src/beginCreateOrUpdateTestRun.ts | 30 +---------------- .../src/beginUploadTestFile.ts | 30 +---------------- .../src/util/sleepLROUtility.ts | 32 +++++++++++++++++++ 3 files changed, 34 insertions(+), 58 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/src/util/sleepLROUtility.ts diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index 9cede719bb2a..921ffa1b2ef7 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -8,6 +8,7 @@ import { TestRunStatusPoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./index.js"; import { TestRunGet200Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; +import { sleep } from "./util/sleepLROUtility"; /** * Creates a poller to poll for test run status. @@ -154,32 +155,3 @@ export async function beginCreateOrUpdateTestRun( return poller; } - -const REJECTED_ERR = new Error("The operation has been aborted"); - -function sleep(ms: number, signal: AbortSignalLike): Promise { - return new Promise((resolve, reject) => { - if (signal.aborted) { - reject(REJECTED_ERR); - return; - } - - const id = setTimeout(() => { - signal.removeEventListener("abort", onAbort); - - if (signal.aborted) { - reject(REJECTED_ERR); - return; - } - - resolve(); - }, ms); - - signal.addEventListener("abort", onAbort, { once: true }); - - function onAbort(): void { - clearTimeout(id); - reject(REJECTED_ERR); - } - }); -} diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts index 3afd29d1fe8b..1718cbc1452d 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts @@ -8,6 +8,7 @@ import { AzureLoadTestingClient } from "./index.js"; import { TestGetFile200Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; import { ReadStream } from "fs"; +import { sleep } from "./util/sleepLROUtility"; /** * Uploads a file and creates a poller to poll for validation. @@ -153,32 +154,3 @@ export async function beginUploadTestFile( return poller; } - -const REJECTED_ERR = new Error("The operation has been aborted"); - -function sleep(ms: number, signal: AbortSignalLike): Promise { - return new Promise((resolve, reject) => { - if (signal.aborted) { - reject(REJECTED_ERR); - return; - } - - const id = setTimeout(() => { - signal.removeEventListener("abort", onAbort); - - if (signal.aborted) { - reject(REJECTED_ERR); - return; - } - - resolve(); - }, ms); - - signal.addEventListener("abort", onAbort, { once: true }); - - function onAbort(): void { - clearTimeout(id); - reject(REJECTED_ERR); - } - }); -} diff --git a/sdk/loadtestservice/load-testing-rest/src/util/sleepLROUtility.ts b/sdk/loadtestservice/load-testing-rest/src/util/sleepLROUtility.ts new file mode 100644 index 000000000000..767279434f9c --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/src/util/sleepLROUtility.ts @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. +import { AbortSignalLike } from "@azure/abort-controller"; + +const REJECTED_ERR = new Error("The operation has been aborted"); + +export function sleep(ms: number, signal: AbortSignalLike): Promise { + return new Promise((resolve, reject) => { + if (signal.aborted) { + reject(REJECTED_ERR); + return; + } + + const id = setTimeout(() => { + signal.removeEventListener("abort", onAbort); + + if (signal.aborted) { + reject(REJECTED_ERR); + return; + } + + resolve(); + }, ms); + + signal.addEventListener("abort", onAbort, { once: true }); + + function onAbort(): void { + clearTimeout(id); + reject(REJECTED_ERR); + } + }); +} From f0eb5ff26b9ecbd24e789482753cf000c37513a9 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 22:03:02 +0530 Subject: [PATCH 34/60] Updated Readme --- .../load-testing-rest/README.md | 118 +++++++++++++----- .../load-testing-rest/samples-dev/sample.ts | 2 +- 2 files changed, 89 insertions(+), 31 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/README.md b/sdk/loadtestservice/load-testing-rest/README.md index 36845d37ac7c..ad85353fdbec 100644 --- a/sdk/loadtestservice/load-testing-rest/README.md +++ b/sdk/loadtestservice/load-testing-rest/README.md @@ -8,8 +8,7 @@ Azure Load Testing provides client library in JavaScript to the user by which th Various documentation is available to help you get started - - +- [Source code][source_code] - [API reference documentation][api_reference_doc] - [Product Documentation][product_documentation] @@ -46,6 +45,13 @@ can be used to authenticate the client. Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET +```javascript +import AzureLoadTesting, { AzureLoadTestingClient } from "@azure-rest/load-testing"; +import { DefaultAzureCredential } from "@azure/identity"; + +const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); +``` + ## Key concepts The following components make up the Azure Load Testing Service. The Azure Load Test client library for JavaScript allows you to interact with each of these components through the use of a dedicated client object. @@ -93,15 +99,15 @@ In the above example, `eus` represents the Azure region `East US`. ### Creating a load test ```javascript -import AzureLoadTesting, { AzureLoadTestingClient } from "@azure-rest/load-testing"; +import { AzureLoadTestingClient } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; var TEST_ID = "some-test-id"; var DISPLAY_NAME = "my-load-test"; -const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); +const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); -await Client.path("/tests/{testId}", TEST_ID).patch({ +await client.path("/tests/{testId}", TEST_ID).patch({ contentType: "application/merge-patch+json", body: { displayName: DISPLAY_NAME, @@ -120,46 +126,98 @@ await Client.path("/tests/{testId}", TEST_ID).patch({ ### Uploading .jmx file to a Test ```javascript -import { AzureLoadTestingClient } from "@azure-rest/load-testing"; +import { AzureLoadTestingClient, beginUploadTestFile } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; +const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); + var TEST_ID = "some-test-id"; -var FILE_ID = "some-file-id"; const readStream = createReadStream("./sample.jmx"); -const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); - -await Client.path("/tests/{testId}/files/{fileId}", TEST_ID, FILE_ID).put({ - contentType: "multipart/form-data", - body: { - file: readStream, - }, +const fileUploadPoller = await beginUploadTestFile(client, TEST_ID, "sample.jmx", readStream); +const fileUploadResult = await fileUploadPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); + +if (fileUploadPoller.getOperationState().status != "succeeded") + throw new Error( + "There is some issue in validation, please make sure uploaded file is a valid JMX." + + fileUploadResult + ); + +console.log(fileUploadResult); ``` ### Running a Test ```javascript -import { AzureLoadTestingClient } from "@azure-rest/load-testing"; +import { AzureLoadTestingClient, beginCreateOrUpdateTestRun } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; -var TEST_ID = "some-test-id"; -var TEST_RUN_ID = "some-testrun-id"; -var DISPLAY_NAME = "my-load-test-run"; +const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); -const Client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); +var TEST_ID = "some-test-id"; +var DISPLAY_NAME = "my-load-test"; -await Client.path("/test-runs/{testRunId}", TEST_RUN_ID).patch({ - contentType: "application/merge-patch+json", - body: { - testId: TEST_ID, - displayName: DISPLAY_NAME, - }, +// Creating/Updating the test run +const testRunPoller = await beginCreateOrUpdateTestRun(client, TEST_ID, DISPLAY_NAME); +const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); -var result = await client.path("/test-runs/{testRunId}", TEST_RUN_ID).get(); -console.log(result); +if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + +let testRunStarttime = testRunResult.body.startDateTime; +let testRunEndTime = testRunResult.body.endDateTime; +let testRunId = testRunResult.body.testRunId; +if (testRunId) { + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + let metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + queryParameters: { + metricname: metricDefinition.name, + metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, + }, + }); + + console.log(metricsResult); + console.log(testRunResult); ``` ## Troubleshooting @@ -180,7 +238,7 @@ For more detailed instructions on how to enable logs, you can look at the [@azur Azure Loading Testing JavaScript SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered. - +See [Azure Load Testing samples][sample_code]. ## Contributing @@ -193,9 +251,9 @@ For details on contributing to this repository, see the [contributing guide](htt 5. Create new Pull Request - - +[source_code]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/src +[sample_code]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta [api_reference_doc]: https://docs.microsoft.com/rest/api/loadtesting/ [product_documentation]: https://azure.microsoft.com/services/load-testing/ [azure_subscription]: https://azure.microsoft.com/free/ diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 07846d982b02..ea239feac9cf 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -91,7 +91,7 @@ async function main() { abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - if (fileUploadPoller.getOperationState().status != "succeeded" && testRunResult) + if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) throw new Error("There is some issue in running the test, Error Response : " + testRunResult); let testRunStarttime = testRunResult.body.startDateTime; From f515b0647f7eafc58bd6696baf68371dacbb4dbe Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 22:13:58 +0530 Subject: [PATCH 35/60] Updated Changelog --- sdk/loadtestservice/load-testing-rest/CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sdk/loadtestservice/load-testing-rest/CHANGELOG.md b/sdk/loadtestservice/load-testing-rest/CHANGELOG.md index 582d84c54c3a..d2b22211dbe8 100644 --- a/sdk/loadtestservice/load-testing-rest/CHANGELOG.md +++ b/sdk/loadtestservice/load-testing-rest/CHANGELOG.md @@ -1,5 +1,19 @@ # Release History +## 1.0.0-beta.2 (Unreleased) + +Second preview release of Azure Load Testing client library for Javascript. + +### Features Added + +- Added `LoadTestClient.beginUploadTestFile` and `LoadTestClient.beginCreateOrUpdateTestRun` Long-Running operation + +### Breaking Changes + +- Added metric namespaces and metric dimensions +- File upload now uses `application/octet-stream` instead of `multipart/form-data` +- File upload now uses file name as primary identifier instead of `fileId` + ## 1.0.0-beta.1 (2022-10-19) ### Features Added From 69e83156a7e031cdea61cfc08bef487bad462228 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 19 Jan 2023 23:08:30 +0530 Subject: [PATCH 36/60] Updated LRO to take queryparams --- .../load-testing-rest/README.md | 17 +++++++++++++++-- .../load-testing-rest/samples-dev/sample.ts | 19 ++++++++++++++++--- .../src/beginCreateOrUpdateTestRun.ts | 19 ++++++------------- .../src/beginUploadTestFile.ts | 11 +++-------- 4 files changed, 40 insertions(+), 26 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/README.md b/sdk/loadtestservice/load-testing-rest/README.md index ad85353fdbec..5f162cc2b906 100644 --- a/sdk/loadtestservice/load-testing-rest/README.md +++ b/sdk/loadtestservice/load-testing-rest/README.md @@ -135,7 +135,13 @@ const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzu var TEST_ID = "some-test-id"; const readStream = createReadStream("./sample.jmx"); -const fileUploadPoller = await beginUploadTestFile(client, TEST_ID, "sample.jmx", readStream); +const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", { + queryParameters: { + fileType: "JMX_FILE", + }, + contentType: "application/octet-stream", + body: readStream, +}); const fileUploadResult = await fileUploadPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -161,7 +167,14 @@ var TEST_ID = "some-test-id"; var DISPLAY_NAME = "my-load-test"; // Creating/Updating the test run -const testRunPoller = await beginCreateOrUpdateTestRun(client, TEST_ID, DISPLAY_NAME); +const testRunPoller = await beginCreateOrUpdateTestRun(client, testRunId, { + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index ea239feac9cf..f7dd6d5d2107 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -25,6 +25,7 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); @@ -49,7 +50,13 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", readStream); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", { + queryParameters: { + fileType: "JMX_FILE", + }, + contentType: "application/octet-stream", + body: readStream, + }); const fileUploadResult = await fileUploadPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -86,7 +93,14 @@ async function main() { } // Creating/Updating the test run - const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); + const testRunPoller = await beginCreateOrUpdateTestRun(client, testRunId, { + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -96,7 +110,6 @@ async function main() { let testRunStarttime = testRunResult.body.startDateTime; let testRunEndTime = testRunResult.body.endDateTime; - let testRunId = testRunResult.body.testRunId; if (testRunId) { // get list of all metric namespaces and pick the first one let metricNamespaces = await client diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index 921ffa1b2ef7..b53b516de4c5 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -3,9 +3,8 @@ import { AbortController, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; -import { v4 as uuidv4 } from "uuid"; import { TestRunStatusPoller, PolledOperationOptions } from "./models"; -import { AzureLoadTestingClient } from "./index.js"; +import { AzureLoadTestingClient, TestRunCreateOrUpdateParameters } from "./index.js"; import { TestRunGet200Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; import { sleep } from "./util/sleepLROUtility"; @@ -18,20 +17,14 @@ import { sleep } from "./util/sleepLROUtility"; */ export async function beginCreateOrUpdateTestRun( client: AzureLoadTestingClient, - testId: string, - displayName: string, + testRunId: string, + testRunParams: TestRunCreateOrUpdateParameters, polledOperationOptions: PolledOperationOptions = {} ): Promise { - const testRunId = uuidv4(); // ID to be assigned to a testRun // Creating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testId, - displayName: displayName, - virtualUsers: 10, - }, - }); + const testRunCreationResult = await client + .path("/test-runs/{testRunId}", testRunId) + .patch(testRunParams); if (isUnexpected(testRunCreationResult)) { throw testRunCreationResult.body.error; diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts index 8dc0a2727b3a..dc0d352d0dd4 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts @@ -4,10 +4,9 @@ import { AbortController, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; -import { AzureLoadTestingClient } from "./index.js"; +import { AzureLoadTestingClient, TestUploadFileParameters } from "./index.js"; import { TestGetFile200Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; -import { ReadStream } from "fs"; import { sleep } from "./util/sleepLROUtility"; /** @@ -20,15 +19,12 @@ export async function beginUploadTestFile( client: AzureLoadTestingClient, testId: string, fileName: string, - file: ReadStream, + uploadParams: TestUploadFileParameters, polledOperationOptions: PolledOperationOptions = {} ): Promise { const fileUploadResult = await client .path("/tests/{testId}/files/{fileName}", testId, fileName) - .put({ - contentType: "application/octet-stream", - body: file, - }); + .put(uploadParams); if (isUnexpected(fileUploadResult)) { throw fileUploadResult.body.error; @@ -77,7 +73,6 @@ export async function beginUploadTestFile( } await processProgressCallbacks(); - }, pollUntilDone(pollOptions?: { From f05ade8f34f3083d43dc583cd5aecd72cef848c5 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 20 Jan 2023 00:09:54 +0530 Subject: [PATCH 37/60] Added Tests for LRO impl --- .../recording_should_delete_the_test.json | 4 + ...recording_should_delete_the_test_file.json | 4 + ...pload_the_additional_file_without_lro.json | 4 + ..._should_upload_the_test_file_with_lro.json | 4 + ...d_create_a_app_component_for_test_run.json | 62 +- .../recording_should_create_a_loadtest.json | 68 +- .../recording_should_create_a_test_run.json | 87 +- .../recording_should_delete_a_test_run.json | 36 +- .../recording_should_get_a_test_run.json | 81 +- ..._should_get_a_test_run_app_components.json | 51 +- ..._get_a_test_run_server_metrics_config.json | 43 +- ..._should_upload_the_test_file_with_lro.json | 4 + .../recording_should_create_a_loadtest.json | 16 +- ...ding_should_create_the_app_components.json | 17 +- .../recording_should_delete_the_test.json | 8 +- ...recording_should_delete_the_test_file.json | 10 +- .../recording_should_get_the_test.json | 30 +- ...ng_should_get_the_test_app_components.json | 14 +- .../recording_should_get_the_test_file.json | 18 +- ...pload_the_additional_file_without_lro.json | 40 + ..._should_upload_the_test_file_with_lro.json | 168 +++ ...d_create_a_app_component_for_test_run.json | 15 +- .../recording_should_create_a_loadtest.json | 24 +- .../recording_should_create_a_test_run.json | 1211 ++++++++++++++++- .../recording_should_delete_a_test_run.json | 8 +- .../recording_should_get_a_test_run.json | 43 +- ..._should_get_a_test_run_app_components.json | 12 +- ..._get_a_test_run_server_metrics_config.json | 41 +- ..._should_upload_the_test_file_with_lro.json | 168 +++ .../test/public/additional-data.csv | 2 + .../load-testing-rest/test/public/sample.jmx | 4 +- .../test/public/testAdministration.spec.ts | 37 +- .../test/public/testRun.spec.ts | 47 +- 33 files changed, 1815 insertions(+), 566 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_delete_the_test.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_delete_the_test_file.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_additional_file_without_lro.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file_with_lro.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_upload_the_test_file_with_lro.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json create mode 100644 sdk/loadtestservice/load-testing-rest/test/public/additional-data.csv diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_delete_the_test.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_delete_the_test.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_delete_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_delete_the_test_file.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_delete_the_test_file.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_additional_file_without_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_additional_file_without_lro.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_additional_file_without_lro.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file_with_lro.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file_with_lro.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_app_component_for_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_app_component_for_test_run.json index 75c8793d863b..f721723386d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_app_component_for_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_app_component_for_test_run.json @@ -1,64 +1,4 @@ { - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "412", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "2dec865c-f592-46d2-a01b-aa0e5e6dc0d5", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": { - "components": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "subscriptionId": "azure_subscription_id" - } - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "568", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:33 GMT", - "mise-correlation-id": "2a293179-3ceb-4634-a18e-dc025da6aee8", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "8c2224b3-1dca-46a1-8727-9f65eea049f2" - }, - "ResponseBody": { - "components": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "resourceGroup": "App-Service-Sample-Demo-rg", - "subscriptionId": "{SUBSCRIPTION_ID}" - } - }, - "testRunId": "abcde", - "createdDateTime": "2023-01-19T08:04:31.385Z", - "lastModifiedDateTime": "2023-01-19T08:04:33.065Z" - } - } - ], + "Entries": [], "Variables": {} } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_loadtest.json index ddf76a548da3..f721723386d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_loadtest.json @@ -1,70 +1,4 @@ { - "Entries": [ - { - "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "113", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "28b35050-e242-40f3-ac0c-c5cce72516d0", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": { - "displayName": "sample_test", - "description": "", - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false - } - }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "478", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:29 GMT", - "mise-correlation-id": "8cfcaae6-73de-4844-8178-32e07b66aa91", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "3284f816-e0ec-4794-91ce-b7421621d557" - }, - "ResponseBody": { - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false, - "quickStartTest": false - }, - "inputArtifacts": { - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "fileName.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T09:04:29.770143", - "validationStatus": "VALIDATION_SUCCESS" - }, - "additionalFileInfo": [] - }, - "testId": "abc", - "description": "", - "displayName": "sample_test", - "createdDateTime": "2023-01-19T07:20:48.154Z", - "lastModifiedDateTime": "2023-01-19T08:04:29.754Z" - } - } - ], + "Entries": [], "Variables": {} } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json index 57d3ad7e86ae..f721723386d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_create_a_test_run.json @@ -1,89 +1,4 @@ { - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "PATCH", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Content-Length": "65", - "Content-Type": "application/merge-patch\u002Bjson", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "d7d792d9-9c73-4388-8ba2-66bb8539a56f", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": { - "testId": "abc", - "displayName": "sample_testrun", - "virtualUsers": 10 - }, - "StatusCode": 201, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "1294", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:31 GMT", - "Location": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "mise-correlation-id": "ce11ede6-2917-4b19-8e74-4d8db5f39b44", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7071222a-9c5a-4daf-89fa-0e15d5f28c70" - }, - "ResponseBody": { - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false, - "quickStartTest": false - }, - "testArtifacts": { - "inputArtifacts": { - "configFileInfo": { - "url": "https://storageurl.com/", - "fileName": "config.yaml", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "0001-01-01T00:00:00", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "fileName.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T09:04:30.7719687", - "validationStatus": "VALIDATION_SUCCESS" - }, - "inputArtifactsZipFileInfo": { - "url": "https://storageurl.com/", - "fileName": "inputartifacts.zip", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "0001-01-01T00:00:00", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "additionalFileInfo": [] - }, - "outputArtifacts": {} - }, - "testResult": "NOT_APPLICABLE", - "testRunId": "abcde", - "displayName": "sample_testrun", - "testId": "abc", - "status": "ACCEPTED", - "executedDateTime": "2023-01-19T08:04:30.772Z", - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T08:04:31.521Z", - "lastModifiedDateTime": "2023-01-19T08:04:31.521Z" - } - } - ], + "Entries": [], "Variables": {} } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_a_test_run.json index bebb31f54980..f721723386d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_a_test_run.json @@ -1,38 +1,4 @@ { - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "DELETE", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "fe737fdf-e80a-42ae-90ee-b150d13c8b30", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": null, - "StatusCode": 204, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Date": "Thu, 19 Jan 2023 08:04:35 GMT", - "mise-correlation-id": "bdc16ddb-8fda-4bdd-b108-b95ba77f791c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b87cc52e-ef3d-4fe0-9909-d30bf7b5b335" - }, - "ResponseBody": null - } - ], + "Entries": [], "Variables": {} } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json index d591a6788d5a..f721723386d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run.json @@ -1,83 +1,4 @@ { - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "8b9e8ccc-1350-490e-a61e-675de7e1a9c0", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "1356", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:32 GMT", - "mise-correlation-id": "c5da46eb-df0b-4936-a3df-32c1071ab579", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ea9c2089-8677-40ad-93ad-1fd93cdf0c3a" - }, - "ResponseBody": { - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false, - "quickStartTest": false - }, - "testArtifacts": { - "inputArtifacts": { - "configFileInfo": { - "url": "https://storageurl.com/", - "fileName": "config.yaml", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T09:04:32.2684296", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "fileName.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T09:04:32.2683276", - "validationStatus": "VALIDATION_SUCCESS" - }, - "inputArtifactsZipFileInfo": { - "url": "https://storageurl.com/", - "fileName": "inputartifacts.zip", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T09:04:32.2684517", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "additionalFileInfo": [] - }, - "outputArtifacts": {} - }, - "testResult": "NOT_APPLICABLE", - "testRunId": "abcde", - "displayName": "sample_testrun", - "testId": "abc", - "status": "PROVISIONING", - "startDateTime": "2023-01-19T08:04:31.735Z", - "executedDateTime": "2023-01-19T08:04:30.772Z", - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T08:04:31.521Z", - "lastModifiedDateTime": "2023-01-19T08:04:31.97Z" - } - } - ], + "Entries": [], "Variables": {} } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_app_components.json index 02e91bbe01f1..f721723386d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_app_components.json @@ -1,53 +1,4 @@ { - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "92707126-2b7b-4900-9c56-03f0cd38d95b", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "568", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:33 GMT", - "mise-correlation-id": "173fcd5d-46a3-4095-be2f-13b72bf39f2c", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b8b773ae-22d1-48d9-83c0-b90140f70565" - }, - "ResponseBody": { - "components": { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - "resourceName": "App-Service-Sample-Demo", - "resourceType": "Microsoft.Web/sites", - "resourceGroup": "App-Service-Sample-Demo-rg", - "subscriptionId": "{SUBSCRIPTION_ID}" - } - }, - "testRunId": "abcde", - "createdDateTime": "2023-01-19T08:04:31.385Z", - "lastModifiedDateTime": "2023-01-19T08:04:33.065Z" - } - } - ], + "Entries": [], "Variables": {} } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json index 16134d3e141a..f721723386d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json @@ -1,45 +1,4 @@ { - "Entries": [ - { - "RequestUri": "https://endpoint/test-runs/abcde/server-metrics-config?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip, deflate, br", - "Accept-Language": "en-US", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "Referer": "http://localhost:9876/", - "sec-ch-ua": "", - "sec-ch-ua-mobile": "?0", - "sec-ch-ua-platform": "", - "Sec-Fetch-Dest": "empty", - "Sec-Fetch-Mode": "cors", - "Sec-Fetch-Site": "same-site", - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/103.0.5058.0 Safari/537.36", - "x-ms-client-request-id": "f30549ea-c61e-4770-a8b4-93425c75d583", - "x-ms-useragent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 OS/Win32" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "129", - "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:34 GMT", - "mise-correlation-id": "f2a4cc19-7c59-4268-a933-2c3e0eda53e0", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d5578e69-d841-4b92-be2a-644d5d023d61" - }, - "ResponseBody": { - "testRunId": "abcde", - "metrics": {}, - "createdDateTime": "2023-01-19T08:04:31.393Z", - "lastModifiedDateTime": "2023-01-19T08:04:33.092Z" - } - } - ], + "Entries": [], "Variables": {} } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_upload_the_test_file_with_lro.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_upload_the_test_file_with_lro.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json index f526514d9568..04d519781e9e 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "99ff5799-04cb-411a-9156-9fe078cc70e8" + "x-ms-client-request-id": "54c77772-05b2-46e7-b845-21042990e0e1" }, "RequestBody": { "displayName": "sample_test", @@ -27,11 +27,11 @@ "Connection": "keep-alive", "Content-Length": "477", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:08 GMT", - "mise-correlation-id": "907dc9f1-3e62-47c3-aef3-13f13825cb1a", + "Date": "Thu, 19 Jan 2023 18:37:02 GMT", + "mise-correlation-id": "c250f1fa-10f5-479e-87b4-f2a4dcc49282", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "41324286-b9b4-4b95-8d7c-5e2a14003674" + "x-ms-correlation-request-id": "dc32f31a-c238-4602-b723-5e9e00efbff7" }, "ResponseBody": { "loadTestConfiguration": { @@ -42,9 +42,9 @@ "inputArtifacts": { "testScriptFileInfo": { "url": "https://storageurl.com/", - "fileName": "fileName.jmx", + "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T09:04:08.552821", + "expireDateTime": "2023-01-19T19:37:02.2589509", "validationStatus": "VALIDATION_SUCCESS" }, "additionalFileInfo": [] @@ -52,8 +52,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-19T07:20:48.154Z", - "lastModifiedDateTime": "2023-01-19T08:04:08.54Z" + "createdDateTime": "2023-01-19T18:31:17.981Z", + "lastModifiedDateTime": "2023-01-19T18:37:02.251Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json index db848f5cebd8..9cf626513ca2 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json @@ -11,7 +11,7 @@ "Content-Length": "427", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c6b74897-5876-426d-ad20-02f5300791ed" + "x-ms-client-request-id": "efff09bd-076b-49a4-b724-f88c574e60ff" }, "RequestBody": { "testId": "abc", @@ -24,17 +24,18 @@ } } }, - "StatusCode": 200, + "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "562", + "Content-Length": "561", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:09 GMT", - "mise-correlation-id": "02be02e3-0575-4b5e-99be-9e5393e183c8", + "Date": "Thu, 19 Jan 2023 18:37:12 GMT", + "Location": "https://endpoint/tests/abc/app-components?api-version=2022-11-01", + "mise-correlation-id": "c4b588b4-3aa5-4468-a644-f1158c0c9f51", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "3256017c-9d3e-4897-8470-fcda0cc1d6c9" + "x-ms-correlation-request-id": "b0ef5548-9c72-4399-905c-43fd576fd4e9" }, "ResponseBody": { "components": { @@ -47,8 +48,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-19T07:21:57.696Z", - "lastModifiedDateTime": "2023-01-19T08:04:09.61Z" + "createdDateTime": "2023-01-19T18:37:11.88Z", + "lastModifiedDateTime": "2023-01-19T18:37:11.88Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json index 5c8348724ad7..d98f92145b27 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "bcd8ad12-461f-4a1b-885b-c3e73a94562f" + "x-ms-client-request-id": "2bba6c64-d17a-496f-8e1c-49ca4d6b370c" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Thu, 19 Jan 2023 07:20:47 GMT", - "mise-correlation-id": "a7a0d020-ad4d-4661-9124-0fcabcef1c89", + "Date": "Thu, 19 Jan 2023 18:37:14 GMT", + "mise-correlation-id": "029479c9-6400-4bfb-ad21-16e1d103092a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "69174684-1faa-41c2-83a0-b67ca10198e0" + "x-ms-correlation-request-id": "6dc3c651-b872-4075-bce3-a696cd857d0a" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json index 6950c738aa7f..fb0b6573ff79 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://endpoint/tests/abc/files/fileName.jmx?api-version=2022-11-01", + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", "RequestMethod": "DELETE", "RequestHeaders": { "Accept": "application/json", @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "852ba0da-266b-45b7-93ec-73ff15d63a82" + "x-ms-client-request-id": "be9dfd24-e33f-4ad8-9c98-93dd4fa90208" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Thu, 19 Jan 2023 07:20:46 GMT", - "mise-correlation-id": "9cc7dad6-33e0-4050-ba2d-eceef3680001", + "Date": "Thu, 19 Jan 2023 18:37:14 GMT", + "mise-correlation-id": "7b38acb4-23ef-447f-a173-d865d1329d64", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d74f9bb1-7362-4962-8771-e8a5caab9dec" + "x-ms-correlation-request-id": "5757e7bb-2559-403a-8fac-69795b7aaf84" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json index 3f6565f3b8e8..3d4e3f037d81 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "eec5976a-47a6-4383-8aee-d0a8dbf60b13" + "x-ms-client-request-id": "7b73f044-e7c3-4b27-9f74-66822e77bc06" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "481", + "Content-Length": "669", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:10 GMT", - "mise-correlation-id": "564f363d-99f2-4f47-94f3-d906301038c7", + "Date": "Thu, 19 Jan 2023 18:37:13 GMT", + "mise-correlation-id": "bb016455-b104-45aa-ba3d-6727661a8541", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2c2497c7-0887-4ded-be2d-f812968e4b40" + "x-ms-correlation-request-id": "e6113283-7431-4b27-8b27-8baac2e8fd58" }, "ResponseBody": { "loadTestConfiguration": { @@ -33,18 +33,26 @@ "inputArtifacts": { "testScriptFileInfo": { "url": "https://storageurl.com/", - "fileName": "fileName.jmx", + "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T09:04:10.9476034", - "validationStatus": "VALIDATION_INITIATED" + "expireDateTime": "2023-01-19T19:37:13.0658008", + "validationStatus": "VALIDATION_SUCCESS" }, - "additionalFileInfo": [] + "additionalFileInfo": [ + { + "url": "https://storageurl.com/", + "fileName": "additional-data.csv", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:13.0659031", + "validationStatus": "VALIDATION_NOT_REQUIRED" + } + ] }, "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-19T07:20:48.154Z", - "lastModifiedDateTime": "2023-01-19T08:04:09.638Z" + "createdDateTime": "2023-01-19T18:31:17.981Z", + "lastModifiedDateTime": "2023-01-19T18:37:12.088Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json index b92720e85432..b8e0059c564f 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "d0a69b29-ec28-4f3e-bceb-78069c1c9372" + "x-ms-client-request-id": "6a31ec06-5ae7-450f-9207-5d25e911e2bf" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "562", + "Content-Length": "561", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:11 GMT", - "mise-correlation-id": "1afcfba0-378f-43b2-bd08-d8d608993428", + "Date": "Thu, 19 Jan 2023 18:37:13 GMT", + "mise-correlation-id": "a51db85f-4af9-4608-94ea-e7b3d1a59d24", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "58ecf0bc-35e7-42dc-b3d9-e80e287ac4c3" + "x-ms-correlation-request-id": "7c322389-47bd-4650-beb3-ff9462c3504a" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-19T07:21:57.696Z", - "lastModifiedDateTime": "2023-01-19T08:04:09.61Z" + "createdDateTime": "2023-01-19T18:37:11.88Z", + "lastModifiedDateTime": "2023-01-19T18:37:11.88Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json index c27bffe8cecb..91f9221ec55b 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://endpoint/tests/abc/files/fileName.jmx?api-version=2022-11-01", + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -9,27 +9,27 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "bc87f84c-841e-4fb8-b4de-334a32dadea0" + "x-ms-client-request-id": "cf175769-58bf-4b87-a277-7cd315a7b2d3" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "170", + "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:10 GMT", - "mise-correlation-id": "dedcf1ba-3e44-4dcf-9521-390a02878491", + "Date": "Thu, 19 Jan 2023 18:37:12 GMT", + "mise-correlation-id": "7daaa781-6d83-4f39-9981-a5f5468f3522", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "79b9d10f-0570-4cc6-b059-1ae7aa841634" + "x-ms-correlation-request-id": "f97fe409-ff5d-48eb-acda-29ede332a91e" }, "ResponseBody": { "url": "https://storageurl.com/", - "fileName": "fileName.jmx", + "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T08:14:10.5049762", - "validationStatus": "VALIDATION_INITIATED" + "expireDateTime": "2023-01-19T18:47:12.5536978", + "validationStatus": "VALIDATION_SUCCESS" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json new file mode 100644 index 000000000000..d46078a9abda --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json @@ -0,0 +1,40 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/additional-data.csv?fileType=ADDITIONAL_ARTIFACTS\u0026api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "application/octet-stream", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "f8f14d9d-adaf-4571-b594-42d9ed94c938" + }, + "RequestBody": "YSxiLGMsZA0KMSwyLDMsNA0K", + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "192", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:03 GMT", + "Location": "https://endpoint/tests/abc/files/additional-data.csv?api-version=2022-11-01", + "mise-correlation-id": "e8ea4f9d-3421-4cdf-b7cb-22ab5787e137", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4335ac14-5156-4157-bcd9-2a40dd5f23eb" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "additional-data.csv", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T18:47:03.0271566", + "validationStatus": "VALIDATION_NOT_REQUIRED" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json new file mode 100644 index 000000000000..59807cd444c6 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json @@ -0,0 +1,168 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?fileType=JMX_FILE\u0026api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "application/octet-stream", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "2f0728ad-df3c-42ff-93a2-deb42ca9616c" + }, + "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:03 GMT", + "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "mise-correlation-id": "0570c01f-319a-457d-9d30-47fbe75a8831", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c2989411-69b9-405d-b97e-cb26f813fa8f" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:03.7391007", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "5eaea780-f306-476d-8bd6-4e563aec5fd1" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:04 GMT", + "mise-correlation-id": "e0ba5cb1-6e1a-4835-9846-f0d5c13af66a", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "37a8cd90-4981-4428-979c-53dbf4763f70" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:04.1015804", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "228dba81-3d8b-4791-8a30-4a6c324b4c23" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:06 GMT", + "mise-correlation-id": "2295b8df-656a-4e28-92e2-ddd10595ccd0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "107d2ead-4f9c-4296-afb8-3a963dd3aa98" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:06.5018553", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "082dab54-dbb1-4e86-aa0a-2cc8579e4064" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:08 GMT", + "mise-correlation-id": "6a43a8a8-2182-4173-b6f8-12d69f910172", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a30fd709-7cb8-4338-81c8-20d34eb29acf" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:08.8968905", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "4803869a-12ba-47f0-8b3d-44f7cdc98ca4" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "166", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:11 GMT", + "mise-correlation-id": "acdb6423-02ec-4005-994a-32274ee31e61", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0e87e299-5c64-478a-956d-5652cf3d5c14" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:11.3364467", + "validationStatus": "VALIDATION_SUCCESS" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json index 0f33dd1360d2..351340009314 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "412", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "b52a5465-b419-4b0f-9a99-c330e7321dbb" + "x-ms-client-request-id": "6f11071f-6a73-4dd7-812d-91f3d5852e39" }, "RequestBody": { "components": { @@ -23,17 +23,18 @@ } } }, - "StatusCode": 200, + "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:14 GMT", - "mise-correlation-id": "d409ab09-3776-47d1-8330-1894368bc639", + "Date": "Thu, 19 Jan 2023 18:38:06 GMT", + "Location": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", + "mise-correlation-id": "b6d9bf6b-58ec-42ab-ba59-e5a0b294a5d4", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e38e235a-ab01-4b15-8a89-48c01481ca96" + "x-ms-correlation-request-id": "9ade5b13-7983-460c-a146-d83eefca9a36" }, "ResponseBody": { "components": { @@ -46,8 +47,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-19T08:04:13.531Z", - "lastModifiedDateTime": "2023-01-19T08:04:14.598Z" + "createdDateTime": "2023-01-19T18:38:06.097Z", + "lastModifiedDateTime": "2023-01-19T18:38:06.097Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json index 6774ba31a20b..7d9854a15438 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "28b6b41f-b4b9-461e-9ee4-08b06866e3a8" + "x-ms-client-request-id": "24b5aa89-69f2-4c80-bd96-adc81d0fef82" }, "RequestBody": { "displayName": "sample_test", @@ -21,17 +21,18 @@ "splitAllCSVs": false } }, - "StatusCode": 200, + "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "481", + "Content-Length": "289", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:12 GMT", - "mise-correlation-id": "78883cb1-31ad-43e6-ab4a-801510cda647", + "Date": "Thu, 19 Jan 2023 18:37:15 GMT", + "Location": "https://endpoint/tests/abc?api-version=2022-11-01", + "mise-correlation-id": "3c293977-88a8-4a2a-beab-f5d67f21f9b1", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "25a11a80-f1dd-44a9-bee6-3b0135897b6e" + "x-ms-correlation-request-id": "211e0b9b-a20c-48b2-ad96-c8b60852e937" }, "ResponseBody": { "loadTestConfiguration": { @@ -40,20 +41,13 @@ "quickStartTest": false }, "inputArtifacts": { - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "fileName.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T09:04:12.3817647", - "validationStatus": "VALIDATION_INITIATED" - }, "additionalFileInfo": [] }, "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-19T07:20:48.154Z", - "lastModifiedDateTime": "2023-01-19T08:04:12.374Z" + "createdDateTime": "2023-01-19T18:37:15.586Z", + "lastModifiedDateTime": "2023-01-19T18:37:15.586Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json index 810c0aa585fc..944a1f338bb9 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json @@ -8,28 +8,27 @@ "Accept-Encoding": "gzip,deflate", "Authorization": "Sanitized", "Connection": "keep-alive", - "Content-Length": "65", + "Content-Length": "41", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5629b78e-93f4-4f5b-a502-64c6a59eeafe" + "x-ms-client-request-id": "9fe4d7fc-8a17-4a54-b364-a2d5ac218a27" }, "RequestBody": { "testId": "abc", - "displayName": "sample_testrun", - "virtualUsers": 10 + "displayName": "sampletr" }, "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1295", + "Content-Length": "1286", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:13 GMT", + "Date": "Thu, 19 Jan 2023 18:37:26 GMT", "Location": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "mise-correlation-id": "6e4731da-0171-4898-b2ff-ca28cb26ce73", + "mise-correlation-id": "ddcdb378-28ab-44b1-ba3c-cc22c0ae795f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1339247f-de2f-4b2a-ad3b-07f524e511be" + "x-ms-correlation-request-id": "9855c1cd-64e7-4c53-a254-56177c1987d9" }, "ResponseBody": { "loadTestConfiguration": { @@ -48,10 +47,10 @@ }, "testScriptFileInfo": { "url": "https://storageurl.com/", - "fileName": "fileName.jmx", + "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T09:04:12.8406944", - "validationStatus": "VALIDATION_INITIATED" + "expireDateTime": "2023-01-19T19:37:24.8662308", + "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", @@ -66,13 +65,1195 @@ }, "testResult": "NOT_APPLICABLE", "testRunId": "abcde", - "displayName": "sample_testrun", + "displayName": "sampletr", "testId": "abc", "status": "ACCEPTED", - "executedDateTime": "2023-01-19T08:04:12.84Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T08:04:13.637Z", - "lastModifiedDateTime": "2023-01-19T08:04:13.637Z" + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:26.109Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "0df8009a-5106-4f65-bdca-fff2c0dcfc56" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:26 GMT", + "mise-correlation-id": "3fdf96c7-1848-414b-949d-2cc8d2ac4044", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "31c427e3-d7a9-4593-a51c-eba69a4eb8eb" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:26.4898282", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:26.4897145", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:26.48985", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:26.464Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "f908279a-f497-4d50-9081-0132856a080c" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1349", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:28 GMT", + "mise-correlation-id": "3fce277b-bbd6-4043-8f12-90b3d7459178", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "21c5789b-b0fc-409f-8f5f-80e0c1d5cf47" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:28.8706394", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:28.8705362", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:28.8706612", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:26.464Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "c8c1b45c-666c-4ed2-ae38-5172e0b61870" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:31 GMT", + "mise-correlation-id": "fce5283f-60ef-447f-93db-70e5a8b08678", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "190d2ecc-affe-434e-9c74-240dbd1bb928" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:31.2454875", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:31.245385", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:31.245511", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:26.464Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "08ea8768-2082-4ed3-b8c3-a77d040bd21e" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1349", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:33 GMT", + "mise-correlation-id": "768ead89-8f17-46b1-be77-e740d58a43a1", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "264efaea-dba8-4d1d-9e7d-b8a25bb34184" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:33.6408848", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:33.6407854", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:33.6409067", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:26.464Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "80a9f2e0-95af-483c-bd69-9941cd6bea94" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:36 GMT", + "mise-correlation-id": "3f518006-cf36-4c58-8a52-2a01d93f6b48", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f3a4e2a1-e428-4ec0-a2bd-27bc21070562" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:36.020995", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:36.0208555", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:36.0210279", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "CONFIGURING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:33.905Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "1b001921-e62d-4199-bb16-818eee362d62" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1348", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:38 GMT", + "mise-correlation-id": "fd273c04-2b54-456c-96f2-7a60996e450e", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "226e1307-adbc-4157-b9c8-de0397c81d8d" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:38.3805846", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:38.3804926", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:38.3806071", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "CONFIGURING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:33.905Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "052b7fa1-a35c-4727-a11b-0efc5a19b6b8" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1348", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:40 GMT", + "mise-correlation-id": "ba8ec3a6-cc80-4938-9ccc-a0ebd15c6105", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "be6190a3-154a-4888-843a-d2bb99df4cba" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:40.7621929", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:40.7620457", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:40.7622212", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "CONFIGURING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:33.905Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "a3cb8699-8531-4a22-8414-ed6839552103" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:43 GMT", + "mise-correlation-id": "86387556-4afe-4a6c-85fc-83c6abed7532", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0bb88150-f9e0-43ff-ae8d-a940a2de6005" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:43.1403606", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:43.1402558", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:43.1403833", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "78053f64-f84b-49b8-8ca6-9e58b7bd26ca" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:45 GMT", + "mise-correlation-id": "68eef307-5e28-410c-886e-808d43d07b5d", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "bdcb5d8d-0be8-4778-b315-fd1903a4765c" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:45.5269088", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:45.5267616", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:45.5269325", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "e532ab6e-0be5-4c0c-8e1d-0202e21201be" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1345", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:48 GMT", + "mise-correlation-id": "4c0647a0-6913-4b81-b009-d7dcf0e4f176", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d8a51781-0022-4beb-9388-bfd1f03ab5cc" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:47.999138", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:47.9989979", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:47.9991814", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "c249507d-1386-4494-a7a5-136ae5885cce" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:50 GMT", + "mise-correlation-id": "68db9a1c-e5e5-49d9-ab55-10fee4ff8de0", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "40ace56a-f65a-4285-a9a2-ba8175cb60ac" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:50.3542753", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:50.3541748", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:50.3542986", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "a2751b2b-0535-49f1-9ccd-3ea991d09db4" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:52 GMT", + "mise-correlation-id": "b82e96bf-2306-44e4-a81f-01bc2a5ed50d", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "258a7eff-79e3-4b06-bb95-59221cc7a83a" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:52.7279669", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:52.7278583", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:52.7279911", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "5a6dd785-f7d0-4f16-ac19-dbdda1896cac" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:55 GMT", + "mise-correlation-id": "429875c0-f3a2-4be5-86e4-ceb7cdc67b95", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a63c42a4-e9c0-4a0b-8c1c-5879f35c23e9" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:55.1109086", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:55.1108073", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:55.1109315", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "a80bf6a0-7728-41b4-ab77-53e32bc6a341" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:57 GMT", + "mise-correlation-id": "20c41427-ec25-44b4-a70e-a5ba774ea742", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1f02a847-ae42-4aa6-8128-27845ba31c20" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:57.5138638", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:57.5137507", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:57.5138863", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "c0a6cc6a-17db-481c-85ef-f51c2c4a5eb8" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:59 GMT", + "mise-correlation-id": "3668af7a-8669-4711-8033-030a0e310dc2", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d595b249-ac8a-4cea-83fe-7613d76f51d2" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:59.9456672", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:37:59.9455627", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:37:59.9456894", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "85009f1e-0c79-4fc4-b97d-ab0eebb36d11" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:38:02 GMT", + "mise-correlation-id": "7d87ef66-dc24-4474-abc5-3e4a78bed848", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ef4db0fe-69db-4fca-8b8f-bdf9539a7dec" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:38:02.3869054", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:38:02.3867678", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:38:02.3869275", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-19T18:37:26.239Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "3c6c75c1-a8ad-4be7-9b28-4781b2532042" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1576", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:38:05 GMT", + "mise-correlation-id": "dc1d4a9d-6870-4ed7-a238-bbeedea47fb2", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f2786844-eacf-4400-a26f-003cc10a2d8b" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:38:05.0735663", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T19:38:05.0734665", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:38:05.073589", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": { + "logsFileInfo": { + "url": "https://storageurl.com/", + "fileName": "logs.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:38:05.073611", + "validationStatus": "VALIDATION_NOT_REQUIRED" + } + } + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sampletr", + "testId": "abc", + "status": "DONE", + "startDateTime": "2023-01-19T18:37:26.239Z", + "endDateTime": "2023-01-19T18:38:02.658Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:38:04.987Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json index c06f9f873f06..70b46c57954c 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c683d06e-9c83-4645-9ac0-35e930d1cadb" + "x-ms-client-request-id": "ce6828d5-e289-4b71-bca4-32cf18072c43" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Thu, 19 Jan 2023 08:04:16 GMT", - "mise-correlation-id": "d79bcade-776d-4e9e-96c8-51f62b28d0a9", + "Date": "Thu, 19 Jan 2023 18:38:07 GMT", + "mise-correlation-id": "73fb850e-d7a1-481d-8720-0801d0d28ab5", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b9707b0c-4d4f-4aa7-9d12-c018e85c56dd" + "x-ms-correlation-request-id": "4372a612-92f1-4909-b144-8d7665814c2d" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json index 6506ee9eb4ba..4174492c1549 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "4ede5c03-2e7d-4041-8a7c-27a7ca51e5e7" + "x-ms-client-request-id": "d32d1c3c-308f-4b0a-8730-3f28d90bb8ed" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1358", + "Content-Length": "1577", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:14 GMT", - "mise-correlation-id": "b2e69599-3992-48b7-84b4-778606cd75e6", + "Date": "Thu, 19 Jan 2023 18:38:05 GMT", + "mise-correlation-id": "bac7361f-1f70-4b3c-aa53-c5af16f4172a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "467dddf8-7873-4f58-ab41-8d517adcd57f" + "x-ms-correlation-request-id": "0f6f8e0f-5c1e-43ca-9f71-d247b736a0af" }, "ResponseBody": { "loadTestConfiguration": { @@ -36,37 +36,46 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T09:04:14.1047573", + "expireDateTime": "2023-01-19T19:38:05.6419337", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", - "fileName": "fileName.jmx", + "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T09:04:14.1046551", - "validationStatus": "VALIDATION_INITIATED" + "expireDateTime": "2023-01-19T19:38:05.6418176", + "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T09:04:14.1047791", + "expireDateTime": "2023-01-19T19:38:05.6419575", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] }, - "outputArtifacts": {} + "outputArtifacts": { + "logsFileInfo": { + "url": "https://storageurl.com/", + "fileName": "logs.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-19T19:38:05.641981", + "validationStatus": "VALIDATION_NOT_REQUIRED" + } + } }, "testResult": "NOT_APPLICABLE", "testRunId": "abcde", - "displayName": "sample_testrun", + "displayName": "sampletr", "testId": "abc", - "status": "PROVISIONING", - "startDateTime": "2023-01-19T08:04:13.762Z", - "executedDateTime": "2023-01-19T08:04:12.84Z", + "status": "DONE", + "startDateTime": "2023-01-19T18:37:26.239Z", + "endDateTime": "2023-01-19T18:38:02.658Z", + "executedDateTime": "2023-01-19T18:37:24.866Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T08:04:13.637Z", - "lastModifiedDateTime": "2023-01-19T08:04:13.904Z" + "createdDateTime": "2023-01-19T18:37:26.109Z", + "lastModifiedDateTime": "2023-01-19T18:38:04.987Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json index 2e42cc608caa..ea4fac1c99a5 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "512471cf-c252-4883-8b0f-7c5dedb37915" + "x-ms-client-request-id": "ec47fe41-7952-4a12-8212-bfe9b380f7dc" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:15 GMT", - "mise-correlation-id": "2114334e-75f5-4bb2-886c-1a41a69ce764", + "Date": "Thu, 19 Jan 2023 18:38:06 GMT", + "mise-correlation-id": "5b77084b-58c9-42bc-811a-38a3ad03cc3c", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7077e5cb-d3cb-4c3d-8a12-5d4921b4c76b" + "x-ms-correlation-request-id": "eccac18b-1d42-412c-a521-e22e76816fd2" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-19T08:04:13.531Z", - "lastModifiedDateTime": "2023-01-19T08:04:14.598Z" + "createdDateTime": "2023-01-19T18:38:06.097Z", + "lastModifiedDateTime": "2023-01-19T18:38:06.097Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json index 4ceaa885108b..68e60d20190c 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json @@ -9,26 +9,51 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "63bfd60c-43f7-41e5-a522-80e87776ee39" + "x-ms-client-request-id": "286601e0-ec34-4c88-b66f-596751d013ab" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "129", + "Content-Length": "2077", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 08:04:15 GMT", - "mise-correlation-id": "77ac3fe2-74b1-44d4-b78c-031d09996517", + "Date": "Thu, 19 Jan 2023 18:38:07 GMT", + "mise-correlation-id": "f717ae9c-17e4-4d7f-bc13-7574383409d9", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "34804ff7-66f7-4acd-acee-dda1931e5185" + "x-ms-correlation-request-id": "ff4f9fb1-2134-45d1-8eb3-aeb8bf726fd8" }, "ResponseBody": { "testRunId": "abcde", - "metrics": {}, - "createdDateTime": "2023-01-19T08:04:13.539Z", - "lastModifiedDateTime": "2023-01-19T08:04:14.614Z" + "metrics": { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo/providers/microsoft.insights/metricdefinitions/Http5xx": { + "id": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo/providers/microsoft.insights/metricdefinitions/Http5xx", + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "metricNamespace": "microsoft.web/sites", + "name": "Http5xx", + "aggregation": "Total", + "resourceType": "microsoft.web/sites" + }, + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo/providers/microsoft.insights/metricdefinitions/Requests": { + "id": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo/providers/microsoft.insights/metricdefinitions/Requests", + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "metricNamespace": "microsoft.web/sites", + "name": "Requests", + "aggregation": "Total", + "resourceType": "microsoft.web/sites" + }, + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo/providers/microsoft.insights/metricdefinitions/HttpResponseTime": { + "id": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo/providers/microsoft.insights/metricdefinitions/HttpResponseTime", + "resourceId": "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + "metricNamespace": "microsoft.web/sites", + "name": "HttpResponseTime", + "aggregation": "Average", + "resourceType": "microsoft.web/sites" + } + }, + "createdDateTime": "2023-01-19T18:38:06.114Z", + "lastModifiedDateTime": "2023-01-19T18:38:06.114Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json new file mode 100644 index 000000000000..7bdcd2fe88c8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json @@ -0,0 +1,168 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?fileType=JMX_FILE\u0026api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "application/octet-stream", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "54fd4e27-3c1c-4363-87c6-8826eab6e109" + }, + "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:16 GMT", + "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "mise-correlation-id": "e0f81b29-446d-4bc2-9515-510a26a42660", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "729733e7-76d0-4ab0-92c4-8b1ae5574191" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:16.2307507", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "bb2cd85e-f669-44ab-9733-30a823e4e007" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:16 GMT", + "mise-correlation-id": "edf9ae4c-c9e4-4b16-b17b-e93e9f2657e1", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4d2aa6a7-17c1-40ec-aa46-50e4604e2b1e" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:16.6207888", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "f83af542-d500-4bca-8bc1-58bb3212b700" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:18 GMT", + "mise-correlation-id": "adde2724-7fbf-44f6-b8cc-ce9ed42aa7c5", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e64a8499-85d0-4a08-bf24-83c0df2d7fd6" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:18.9612267", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "40a3aa03-9998-47b6-8a3b-5218039a14ab" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:21 GMT", + "mise-correlation-id": "ca904261-0ce5-403b-b9af-8992fbb835f5", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f3ccc602-181d-4945-b994-fc7e0dac22ca" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:21.5032919", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "47826ef7-e5c8-465b-983d-801dfc54eb04" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "166", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 19 Jan 2023 18:37:23 GMT", + "mise-correlation-id": "0c2b0dbe-fcb4-46d8-9cf2-c0fcffb48752", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4a8d9c51-69c0-4e34-bf4c-4115a29c3dd4" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-19T18:47:23.8819088", + "validationStatus": "VALIDATION_SUCCESS" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/test/public/additional-data.csv b/sdk/loadtestservice/load-testing-rest/test/public/additional-data.csv new file mode 100644 index 000000000000..96dbf5b98a39 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/test/public/additional-data.csv @@ -0,0 +1,2 @@ +a,b,c,d +1,2,3,4 diff --git a/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx b/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx index a8d909ef60fa..66cb722cab9c 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx +++ b/sdk/loadtestservice/load-testing-rest/test/public/sample.jmx @@ -17,12 +17,12 @@ false 10 - 50 + 1 2 1515063650000 1515063650000 false - 60 + 10 true diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts index 4c3dc3f02791..65effce91481 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts @@ -4,7 +4,8 @@ import { assert } from "chai"; import { createClient, createRecorder } from "./utils/recordedClient"; import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; +import { AbortController } from "@azure/abort-controller"; +import { AzureLoadTestingClient, beginUploadTestFile } from "../../src"; import { env, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; import * as fs from "fs"; import { isNode } from "@azure/core-util"; @@ -12,7 +13,8 @@ import { isNode } from "@azure/core-util"; describe("Test Creation", () => { let recorder: Recorder; let client: AzureLoadTestingClient; - let readStream: fs.ReadStream; + let readStreamTestFile: fs.ReadStream; + let readStreamAdditionalFile: fs.ReadStream; beforeEach(async function (this: Context) { recorder = await createRecorder(this); @@ -20,7 +22,8 @@ describe("Test Creation", () => { this.skip(); } client = createClient(recorder); - readStream = fs.createReadStream("./test/public/sample.jmx"); + readStreamTestFile = fs.createReadStream("./test/public/sample.jmx"); + readStreamAdditionalFile = fs.createReadStream("./test/public/additional-data.csv"); }); afterEach(async function () { @@ -44,17 +47,35 @@ describe("Test Creation", () => { assert.include(["200", "201"], result.status); }); - it("should upload the test file", async () => { + it("should upload the additional file without LRO", async () => { const result = await client - .path("/tests/{testId}/files/{fileName}", "abc", "fileName.jmx") + .path("/tests/{testId}/files/{fileName}", "abc", "additional-data.csv") .put({ contentType: "application/octet-stream", - body: readStream, + body: readStreamAdditionalFile, + queryParameters: { + fileType: "ADDITIONAL_ARTIFACTS", + }, }); assert.include(["201"], result.status); }); + it("should upload the test file with LRO", async () => { + const fileUploadPoller = await beginUploadTestFile(client, "abc", "sample.jmx", { + queryParameters: { + fileType: "JMX_FILE", + }, + contentType: "application/octet-stream", + body: readStreamTestFile, + }); + const fileUploadResult = await fileUploadPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + + assert.equal("VALIDATION_SUCCESS", fileUploadResult.body.validationStatus); + }); + it("should create the app components", async () => { const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; const result = await client.path("/tests/{testId}/app-components", "abc").patch({ @@ -79,7 +100,7 @@ describe("Test Creation", () => { //get it("should get the test file", async () => { const result = await client - .path("/tests/{testId}/files/{fileName}", "abc", "fileName.jmx") + .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") .get(); assert.include(["200"], result.status); @@ -100,7 +121,7 @@ describe("Test Creation", () => { //delete it("should delete the test file", async () => { const result = await client - .path("/tests/{testId}/files/{fileName}", "abc", "fileName.jmx") + .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") .delete(); assert.include(["204"], result.status); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts index 433b78f2f4f9..70a300547733 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts @@ -1,20 +1,28 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { env, Recorder } from "@azure-tools/test-recorder"; +import { env, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; import { assert } from "chai"; import { createRecorder, createClient } from "./utils/recordedClient"; +import { AbortController } from "@azure/abort-controller"; import { Context } from "mocha"; -import { AzureLoadTestingClient } from "../../src"; +import * as fs from "fs"; +import { AzureLoadTestingClient, beginCreateOrUpdateTestRun, beginUploadTestFile } from "../../src"; +import { isNode } from "@azure/core-util"; describe("Test Run Creation", () => { let recorder: Recorder; let client: AzureLoadTestingClient; const SUBSCRIPTION_ID = env["SUBSCRIPTION_ID"] || ""; + let readStreamTestFile: fs.ReadStream; beforeEach(async function (this: Context) { recorder = await createRecorder(this); + if (!isNode || isPlaybackMode()) { + this.skip(); + } client = createClient(recorder); + readStreamTestFile = fs.createReadStream("./test/public/sample.jmx"); }); afterEach(async function () { @@ -37,17 +45,34 @@ describe("Test Run Creation", () => { assert.include(["200", "201"], result.status); }); - it("should create a test run", async () => { - const result = await client.path("/test-runs/{testRunId}", "abcde").patch({ - contentType: "application/merge-patch+json", - body: { - testId: "abc", - displayName: "sample_testrun", - virtualUsers: 10, + it("should upload the test file with LRO", async () => { + const fileUploadPoller = await beginUploadTestFile(client, "abc", "sample.jmx", { + queryParameters: { + fileType: "JMX_FILE", }, + contentType: "application/octet-stream", + body: readStreamTestFile, + }); + const fileUploadResult = await fileUploadPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - assert.include(["200", "201"], result.status); + assert.equal("VALIDATION_SUCCESS", fileUploadResult.body.validationStatus); + }); + + it("should create a test run", async () => { + const testRunPoller = await beginCreateOrUpdateTestRun(client, "abcde", { + contentType: "application/merge-patch+json", + body: { + testId: "abc", + displayName: "sampletr", + }, + }); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(300*1000), // timeout of 60 seconds + }); + + assert.equal("DONE", testRunResult.body.status); }); it("should get a test run", async () => { @@ -72,7 +97,7 @@ describe("Test Run Creation", () => { }, }); - assert.include(["200"], result.status); + assert.include(["200", "201"], result.status); }); it("should get a test run app components", async () => { From f4608435d008e448471d07c59141bc6ccf13cd2e Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 20 Jan 2023 00:18:21 +0530 Subject: [PATCH 38/60] Generated latest Samples --- .../samples/v1-beta/javascript/sample.js | 21 +++++++++++++++---- .../samples/v1-beta/javascript/stopTest.js | 4 ++-- .../samples/v1-beta/typescript/src/sample.ts | 21 +++++++++++++++---- .../v1-beta/typescript/src/stopTest.ts | 4 ++-- 4 files changed, 38 insertions(+), 12 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index 86b1e08e783a..6b8f3a25b61a 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -25,6 +25,7 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); @@ -49,7 +50,13 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", readStream); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", { + queryParameters: { + fileType: "JMX_FILE", + }, + contentType: "application/octet-stream", + body: readStream, + }); const fileUploadResult = await fileUploadPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -87,17 +94,23 @@ async function main() { } // Creating/Updating the test run - const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); + const testRunPoller = await beginCreateOrUpdateTestRun(client, testRunId, { + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - if (fileUploadPoller.getOperationState().status != "succeeded" && testRunResult) + if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) throw new Error("There is some issue in running the test, Error Response : " + testRunResult); let testRunStarttime = testRunResult.body.startDateTime; let testRunEndTime = testRunResult.body.endDateTime; - let testRunId = testRunResult.body.testRunId; if (testRunId) { // get list of all metric namespaces and pick the first one let metricNamespaces = await client diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js index a85e77eca76e..cfed7ceb0ed5 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js @@ -18,7 +18,7 @@ async function main() { // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - // Creating a load test + // Patching a load test const testCreationResult = await client.path("/tests/{testId}", testId).patch({ contentType: "application/merge-patch+json", body: { @@ -37,7 +37,7 @@ async function main() { if (testCreationResult.body.testId === undefined) throw new Error("Test ID returned as undefined."); - // Creating the test run + // Patching the test run const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ contentType: "application/merge-patch+json", body: { diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index 2aafc9dc537d..39c2c5a39132 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -24,6 +24,7 @@ async function main() { const displayName = "some-load-test"; const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); @@ -48,7 +49,13 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", readStream); + const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", { + queryParameters: { + fileType: "JMX_FILE", + }, + contentType: "application/octet-stream", + body: readStream, + }); const fileUploadResult = await fileUploadPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -85,17 +92,23 @@ async function main() { } // Creating/Updating the test run - const testRunPoller = await beginCreateOrUpdateTestRun(client, testId, displayName); + const testRunPoller = await beginCreateOrUpdateTestRun(client, testRunId, { + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - if (fileUploadPoller.getOperationState().status != "succeeded" && testRunResult) + if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) throw new Error("There is some issue in running the test, Error Response : " + testRunResult); let testRunStarttime = testRunResult.body.startDateTime; let testRunEndTime = testRunResult.body.endDateTime; - let testRunId = testRunResult.body.testRunId; if (testRunId) { // get list of all metric namespaces and pick the first one let metricNamespaces = await client diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts index a683dec5e999..4ad09a35d6c8 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts @@ -17,7 +17,7 @@ async function main() { // Build a client through AAD const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - // Creating a load test + // Patching a load test const testCreationResult = await client.path("/tests/{testId}", testId).patch({ contentType: "application/merge-patch+json", body: { @@ -36,7 +36,7 @@ async function main() { if (testCreationResult.body.testId === undefined) throw new Error("Test ID returned as undefined."); - // Creating the test run + // Patching the test run const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ contentType: "application/merge-patch+json", body: { From 502e8bfc102796da346ee4e9bf2ef8a6806b95fb Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 20 Jan 2023 12:12:31 +0530 Subject: [PATCH 39/60] GetLROHelper Similar impl --- .../load-testing-rest/samples-dev/sample1.ts | 187 ++++++++++++++++++ .../src/beginCreateOrUpdateTestRun.ts | 125 +----------- .../src/beginUploadTestFile.ts | 129 +----------- .../src/getFileValidatePoller.ts | 142 +++++++++++++ .../load-testing-rest/src/getTestRunPoller.ts | 144 ++++++++++++++ .../test/public/testAdministration.spec.ts | 6 +- .../test/public/testRun.spec.ts | 20 +- 7 files changed, 495 insertions(+), 258 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts create mode 100644 sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts create mode 100644 sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts new file mode 100644 index 000000000000..e972b182fbea --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { + isUnexpected, + beginCreateOrUpdateTestRun, +} from "@azure-rest/load-testing"; +import { AbortController } from "@azure/abort-controller"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; +import { v4 as uuidv4 } from "uuid"; +import { getFileValidatePoller } from "../src/getFileValidatePoller"; +import { getTestRunPoller } from "../src/getTestRunPoller"; + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating/Updating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getFileValidatePoller(client, fileUploadResult, testId); + const fileValidateResult = await fileValidatePoller.pollUntilDone(); + + if (fileValidatePoller.getOperationState().status != "succeeded") + throw new Error( + "There is some issue in validation, please make sure uploaded file is a valid JMX." + + fileValidateResult.body.validationFailureDetails + ); + + console.log(fileUploadResult); + + // Creating/Updating app component + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } + + // Creating/Updating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + const testRunPoller = await getTestRunPoller(client, testRunCreationResult); + const testRunResult = await testRunPoller.pollUntilDone(); + + if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; + if (testRunId) { + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + let metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + queryParameters: { + metricname: metricDefinition.name, + metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, + }, + }); + + console.log(metricsResult); + console.log(testRunResult); + + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } + + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index b53b516de4c5..0f932ae4176e 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -1,13 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AbortController, AbortSignalLike } from "@azure/abort-controller"; -import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; -import { TestRunStatusPoller, PolledOperationOptions } from "./models"; +import { TestRunStatusPoller } from "./models"; import { AzureLoadTestingClient, TestRunCreateOrUpdateParameters } from "./index.js"; -import { TestRunGet200Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; -import { sleep } from "./util/sleepLROUtility"; +import { getTestRunPoller } from "./getTestRunPoller"; /** * Creates a poller to poll for test run status. @@ -18,8 +15,7 @@ import { sleep } from "./util/sleepLROUtility"; export async function beginCreateOrUpdateTestRun( client: AzureLoadTestingClient, testRunId: string, - testRunParams: TestRunCreateOrUpdateParameters, - polledOperationOptions: PolledOperationOptions = {} + testRunParams: TestRunCreateOrUpdateParameters ): Promise { // Creating the test run const testRunCreationResult = await client @@ -33,118 +29,5 @@ export async function beginCreateOrUpdateTestRun( if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - type Handler = (state: OperationState) => void; - - const state: OperationState = { - status: "notStarted", - }; - - const progressCallbacks = new Map(); - const processProgressCallbacks = async (): Promise => - progressCallbacks.forEach((h) => h(state)); - let resultPromise: Promise | undefined; - let cancelJob: (() => void) | undefined; - const abortController = new AbortController(); - const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; - - const poller: SimplePollerLike, TestRunGet200Response> = { - async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { - let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); - if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; - } - - if (getTestRunResult.body.status === "FAILED") { - state.status = "failed"; - state.error = new Error(getTestRunResult.body.status); - } - - if ( - getTestRunResult.body.status === "CANCELLING" || - getTestRunResult.body.status === "CANCELLED" - ) { - state.status === "canceled"; - } - - if (getTestRunResult.body.status === "DONE") { - state.status = "succeeded"; - state.result = getTestRunResult; - } - - await processProgressCallbacks(); - - if (state.status === "canceled") { - throw new Error("Operation was canceled"); - } - if (state.status === "failed") { - throw state.error; - } - }, - - pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise { - return (resultPromise ??= (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal - ? new AbortController([inputAbortSignal, abortController.signal]) - : abortController; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - const delay = sleep(currentPollIntervalInMs, abortSignal); - cancelJob = () => abortController.abort(); - await delay; - await poller.poll({ abortSignal }); - } - } - switch (state.status) { - case "succeeded": - case "failed": - case "canceled": { - return poller.getResult() as TestRunGet200Response; - } - case "notStarted": - case "running": { - // Unreachable - throw new Error(`polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = undefined; - })); - }, - - onProgress(callback: (state: OperationState) => void): CancelOnProgress { - const s = Symbol(); - progressCallbacks.set(s, callback); - - return () => progressCallbacks.delete(s); - }, - - isDone(): boolean { - return ["succeeded", "failed", "canceled"].includes(state.status); - }, - - stopPolling(): void { - abortController.abort(); - cancelJob?.(); - }, - - isStopped(): boolean { - return resultPromise === undefined; - }, - - getOperationState(): OperationState { - return state; - }, - - getResult(): TestRunGet200Response | undefined { - return state.result; - }, - - toString() { - return JSON.stringify({ state }); - }, - }; - - return poller; + return getTestRunPoller(client, testRunCreationResult); } diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts index dc0d352d0dd4..39bc81e35703 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts @@ -1,13 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AbortController, AbortSignalLike } from "@azure/abort-controller"; -import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; -import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; -import { AzureLoadTestingClient, TestUploadFileParameters } from "./index.js"; -import { TestGetFile200Response } from "./responses"; +import { FileUploadAndValidatePoller } from "./models"; +import { AzureLoadTestingClient } from "./clientDefinitions"; import { isUnexpected } from "./isUnexpected"; -import { sleep } from "./util/sleepLROUtility"; +import { getFileValidatePoller } from "./getFileValidatePoller"; +import { TestUploadFileParameters } from "./parameters"; /** * Uploads a file and creates a poller to poll for validation. @@ -19,8 +17,7 @@ export async function beginUploadTestFile( client: AzureLoadTestingClient, testId: string, fileName: string, - uploadParams: TestUploadFileParameters, - polledOperationOptions: PolledOperationOptions = {} + uploadParams: TestUploadFileParameters ): Promise { const fileUploadResult = await client .path("/tests/{testId}/files/{fileName}", testId, fileName) @@ -30,119 +27,5 @@ export async function beginUploadTestFile( throw fileUploadResult.body.error; } - type Handler = (state: OperationState) => void; - - const state: OperationState = { - status: "notStarted", - }; - - const progressCallbacks = new Map(); - const processProgressCallbacks = async (): Promise => - progressCallbacks.forEach((h) => h(state)); - let resultPromise: Promise | undefined; - let cancelJob: (() => void) | undefined; - const abortController = new AbortController(); - const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; - - const poller: SimplePollerLike, TestGetFile200Response> = { - async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { - let fileValidationResponse = await client - .path("/tests/{testId}/files/{fileName}", testId, fileName) - .get(); - if (isUnexpected(fileValidationResponse)) { - throw fileValidationResponse.body.error; - } - if ( - fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED" || - fileValidationResponse.body.validationStatus === "NOT_VALIDATED" - ) { - state.status = "running"; - } - - if ( - fileValidationResponse.body.validationStatus === "VALIDATION_SUCCESS" || - fileValidationResponse.body.validationStatus === "VALIDATION_NOT_REQUIRED" - ) { - state.status = "succeeded"; - state.result = fileValidationResponse; - } - - if (fileValidationResponse.body.validationStatus === "VALIDATION_FAILURE") { - state.status = "failed"; - state.error = new Error(fileValidationResponse.body.validationStatus); - } - - await processProgressCallbacks(); - }, - - pollUntilDone(pollOptions?: { - abortSignal?: AbortSignalLike; - }): Promise { - return (resultPromise ??= (async () => { - const { abortSignal: inputAbortSignal } = pollOptions || {}; - const { signal: abortSignal } = inputAbortSignal - ? new AbortController([inputAbortSignal, abortController.signal]) - : abortController; - if (!poller.isDone()) { - await poller.poll({ abortSignal }); - while (!poller.isDone()) { - const delay = sleep(currentPollIntervalInMs, abortSignal); - cancelJob = () => abortController.abort(); - await delay; - await poller.poll({ abortSignal }); - } - } - switch (state.status) { - case "succeeded": - case "failed": - case "canceled": { - return poller.getResult() as TestGetFile200Response; - } - case "notStarted": - case "running": { - // Unreachable - throw new Error(`polling completed without succeeding or failing`); - } - } - })().finally(() => { - resultPromise = undefined; - })); - }, - - onProgress( - callback: (state: OperationState) => void - ): CancelOnProgress { - const s = Symbol(); - progressCallbacks.set(s, callback); - - return () => progressCallbacks.delete(s); - }, - - isDone(): boolean { - return ["succeeded", "failed", "canceled"].includes(state.status); - }, - - stopPolling(): void { - abortController.abort(); - cancelJob?.(); - }, - - isStopped(): boolean { - return resultPromise === undefined; - }, - - getOperationState(): OperationState { - return state; - }, - - getResult(): TestGetFile200Response | undefined { - return state.result; - }, - - toString() { - return JSON.stringify({ state }); - }, - }; - - return poller; + return getFileValidatePoller(client, fileUploadResult, testId); } diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts new file mode 100644 index 000000000000..2c3fd1dc27d3 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; +import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; +import { AzureLoadTestingClient } from "./index.js"; +import { TestGetFile200Response, TestUploadFile201Response } from "./responses"; +import { isUnexpected } from "./isUnexpected"; +import { sleep } from "./util/sleepLROUtility"; + +/** + * Uploads a file and creates a poller to poll for validation. + * @param client - The Load Testing client. + * @param options - The operation options. + * @returns A poller which can be called to poll until completion of the job. + */ +export async function getFileValidatePoller( + client: AzureLoadTestingClient, + fileUploadResult: TestUploadFile201Response, + testId: string, + polledOperationOptions: PolledOperationOptions = {} +): Promise { + const fileName = fileUploadResult.body.fileName; + type Handler = (state: OperationState) => void; + + const state: OperationState = { + status: "notStarted", + }; + + const progressCallbacks = new Map(); + const processProgressCallbacks = async (): Promise => + progressCallbacks.forEach((h) => h(state)); + let resultPromise: Promise | undefined; + let cancelJob: (() => void) | undefined; + const abortController = new AbortController(); + const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; + + const poller: SimplePollerLike, TestGetFile200Response> = { + async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { + if (fileName) { + let fileValidationResponse = await client + .path("/tests/{testId}/files/{fileName}", testId, fileName) + .get(); + if (isUnexpected(fileValidationResponse)) { + throw fileValidationResponse.body.error; + } + if ( + fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED" || + fileValidationResponse.body.validationStatus === "NOT_VALIDATED" + ) { + state.status = "running"; + } + + if ( + fileValidationResponse.body.validationStatus === "VALIDATION_SUCCESS" || + fileValidationResponse.body.validationStatus === "VALIDATION_NOT_REQUIRED" + ) { + state.status = "succeeded"; + state.result = fileValidationResponse; + } + + if (fileValidationResponse.body.validationStatus === "VALIDATION_FAILURE") { + state.status = "failed"; + state.error = new Error(fileValidationResponse.body.validationStatus); + } + + await processProgressCallbacks(); + } + }, + + pollUntilDone(pollOptions?: { + abortSignal?: AbortSignalLike; + }): Promise { + return (resultPromise ??= (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + const { signal: abortSignal } = inputAbortSignal + ? new AbortController([inputAbortSignal, abortController.signal]) + : abortController; + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + const delay = sleep(currentPollIntervalInMs, abortSignal); + cancelJob = () => abortController.abort(); + await delay; + await poller.poll({ abortSignal }); + } + } + switch (state.status) { + case "succeeded": + case "failed": + case "canceled": { + return poller.getResult() as TestGetFile200Response; + } + case "notStarted": + case "running": { + // Unreachable + throw new Error(`polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = undefined; + })); + }, + + onProgress( + callback: (state: OperationState) => void + ): CancelOnProgress { + const s = Symbol(); + progressCallbacks.set(s, callback); + + return () => progressCallbacks.delete(s); + }, + + isDone(): boolean { + return ["succeeded", "failed", "canceled"].includes(state.status); + }, + + stopPolling(): void { + abortController.abort(); + cancelJob?.(); + }, + + isStopped(): boolean { + return resultPromise === undefined; + }, + + getOperationState(): OperationState { + return state; + }, + + getResult(): TestGetFile200Response | undefined { + return state.result; + }, + + toString() { + return JSON.stringify({ state }); + }, + }; + + return poller; +} diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts new file mode 100644 index 000000000000..2923680a0384 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; +import { TestRunStatusPoller, PolledOperationOptions } from "./models"; +import { AzureLoadTestingClient } from "./clientDefinitions"; +import { + TestRunCreateOrUpdate200Response, + TestRunCreateOrUpdate201Response, + TestRunGet200Response, +} from "./responses"; +import { isUnexpected } from "./isUnexpected"; +import { sleep } from "./util/sleepLROUtility"; + +/** + * Creates a poller to poll for test run status. + * @param client - The Load Testing client. + * @param options - The operation options. + * @returns A poller which can be called to poll until completion of the job. + */ +export async function getTestRunPoller( + client: AzureLoadTestingClient, + createTestRunResponse: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response, + polledOperationOptions: PolledOperationOptions = {} +): Promise { + type Handler = (state: OperationState) => void; + + const state: OperationState = { + status: "notStarted", + }; + + const progressCallbacks = new Map(); + const processProgressCallbacks = async (): Promise => + progressCallbacks.forEach((h) => h(state)); + let resultPromise: Promise | undefined; + let cancelJob: (() => void) | undefined; + const abortController = new AbortController(); + const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; + const testRunId = createTestRunResponse.body.testRunId; + + const poller: SimplePollerLike, TestRunGet200Response> = { + async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { + if (testRunId) { + let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); + if (isUnexpected(getTestRunResult)) { + throw getTestRunResult.body.error; + } + + if (getTestRunResult.body.status === "FAILED") { + state.status = "failed"; + state.error = new Error(getTestRunResult.body.status); + } + + if ( + getTestRunResult.body.status === "CANCELLING" || + getTestRunResult.body.status === "CANCELLED" + ) { + state.status === "canceled"; + } + + if (getTestRunResult.body.status === "DONE") { + state.status = "succeeded"; + state.result = getTestRunResult; + } + + await processProgressCallbacks(); + + if (state.status === "canceled") { + throw new Error("Operation was canceled"); + } + if (state.status === "failed") { + throw state.error; + } + } + }, + + pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise { + return (resultPromise ??= (async () => { + const { abortSignal: inputAbortSignal } = pollOptions || {}; + const { signal: abortSignal } = inputAbortSignal + ? new AbortController([inputAbortSignal, abortController.signal]) + : abortController; + if (!poller.isDone()) { + await poller.poll({ abortSignal }); + while (!poller.isDone()) { + const delay = sleep(currentPollIntervalInMs, abortSignal); + cancelJob = () => abortController.abort(); + await delay; + await poller.poll({ abortSignal }); + } + } + switch (state.status) { + case "succeeded": + case "failed": + case "canceled": { + return poller.getResult() as TestRunGet200Response; + } + case "notStarted": + case "running": { + // Unreachable + throw new Error(`polling completed without succeeding or failing`); + } + } + })().finally(() => { + resultPromise = undefined; + })); + }, + + onProgress(callback: (state: OperationState) => void): CancelOnProgress { + const s = Symbol(); + progressCallbacks.set(s, callback); + + return () => progressCallbacks.delete(s); + }, + + isDone(): boolean { + return ["succeeded", "failed", "canceled"].includes(state.status); + }, + + stopPolling(): void { + abortController.abort(); + cancelJob?.(); + }, + + isStopped(): boolean { + return resultPromise === undefined; + }, + + getOperationState(): OperationState { + return state; + }, + + getResult(): TestRunGet200Response | undefined { + return state.result; + }, + + toString() { + return JSON.stringify({ state }); + }, + }; + + return poller; +} diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts index 65effce91481..f2872cd01ccf 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts @@ -23,7 +23,7 @@ describe("Test Creation", () => { } client = createClient(recorder); readStreamTestFile = fs.createReadStream("./test/public/sample.jmx"); - readStreamAdditionalFile = fs.createReadStream("./test/public/additional-data.csv"); + readStreamAdditionalFile = fs.createReadStream("./test/public/additional-data.csv"); }); afterEach(async function () { @@ -99,9 +99,7 @@ describe("Test Creation", () => { //get it("should get the test file", async () => { - const result = await client - .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") - .get(); + const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx").get(); assert.include(["200"], result.status); }); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts index 70a300547733..b2d8be069f0c 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts @@ -59,18 +59,18 @@ describe("Test Run Creation", () => { assert.equal("VALIDATION_SUCCESS", fileUploadResult.body.validationStatus); }); - + it("should create a test run", async () => { const testRunPoller = await beginCreateOrUpdateTestRun(client, "abcde", { - contentType: "application/merge-patch+json", - body: { - testId: "abc", - displayName: "sampletr", - }, - }); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(300*1000), // timeout of 60 seconds - }); + contentType: "application/merge-patch+json", + body: { + testId: "abc", + displayName: "sampletr", + }, + }); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(300 * 1000), // timeout of 60 seconds + }); assert.equal("DONE", testRunResult.body.status); }); From 74adf4a5dda2037bf9374c409f7c651c9139e32e Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 20 Jan 2023 13:24:39 +0530 Subject: [PATCH 40/60] Review Comment Changes --- .../load-testing-rest/package.json | 1 - .../load-testing-rest/samples-dev/sample.ts | 29 ++++++++++--------- .../load-testing-rest/src/getTestRunPoller.ts | 7 ----- .../load-testing-rest/src/models.ts | 3 +- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index 8648daecc2aa..beeb5a5bc8d3 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -77,7 +77,6 @@ "@azure/logger": "^1.0.0", "tslib": "^2.2.0", "@azure/core-lro": "~2.4.1", - "@azure/core-client": "~1.6.2", "@azure/core-util": "~1.1.2", "@azure/abort-controller": "~1.1.1" }, diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index f7dd6d5d2107..1f1834a0ae07 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -57,18 +57,16 @@ async function main() { contentType: "application/octet-stream", body: readStream, }); - const fileUploadResult = await fileUploadPoller.pollUntilDone({ + await fileUploadPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileUploadResult + fileUploadPoller.getOperationState().error ); - console.log(fileUploadResult); - // Creating/Updating app component const appComponentCreationResult = await client .path("/tests/{testId}/app-components", testId) @@ -106,13 +104,16 @@ async function main() { }); if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + throw new Error( + "There is some issue in running the test, Error Response : " + + testRunPoller.getOperationState().error + ); - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; + const testRunStarttime = testRunResult.body.startDateTime; + const testRunEndTime = testRunResult.body.endDateTime; if (testRunId) { // get list of all metric namespaces and pick the first one - let metricNamespaces = await client + const metricNamespaces = await client .path("/test-runs/{testRunId}/metric-namespaces", testRunId) .get(); @@ -120,14 +121,14 @@ async function main() { throw metricNamespaces.body.error; } - let metricNamespace = metricNamespaces.body.value[0]; + const metricNamespace = metricNamespaces.body.value[0]; if (metricNamespace.name === undefined) { throw "No Metric Namespace name is defined."; } // get list of all metric definitions and pick the first one - let metricDefinitions = await client + const metricDefinitions = await client .path("/test-runs/{testRunId}/metric-definitions", testRunId) .get({ queryParameters: { @@ -139,14 +140,14 @@ async function main() { throw metricDefinitions.body.error; } - let metricDefinition = metricDefinitions.body.value[0]; + const metricDefinition = metricDefinitions.body.value[0]; if (metricDefinition.name === undefined) { throw "No Metric Namespace name is defined."; } // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + const metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ queryParameters: { metricname: metricDefinition.name, metricNamespace: metricNamespace.name, @@ -158,14 +159,14 @@ async function main() { console.log(testRunResult); // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + const deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); if (isUnexpected(deleteTestRunResult)) { throw deleteTestRunResult.body.error; } // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + const deleteTestResult = await client.path("/tests/{testId}", testId).delete(); if (isUnexpected(deleteTestResult)) { throw deleteTestResult.body.error; diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts index 2923680a0384..0eb44286c8d4 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts @@ -65,13 +65,6 @@ export async function getTestRunPoller( } await processProgressCallbacks(); - - if (state.status === "canceled") { - throw new Error("Operation was canceled"); - } - if (state.status === "failed") { - throw state.error; - } } }, diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 4b9a49bb4aae..8b0df6d7e52c 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -2,7 +2,6 @@ // Licensed under the MIT license. import { OperationState, SimplePollerLike } from "@azure/core-lro"; -import { OperationOptions } from "@azure/core-client"; import { TestGetFile200Response, TestRunGet200Response } from "./responses"; /** Load test model */ @@ -411,7 +410,7 @@ export type TestRunStatusPoller = SimplePollerLike< TestRunGet200Response >; -export interface PolledOperationOptions extends OperationOptions { +export interface PolledOperationOptions { /** * Time delay between poll requests, in milliseconds. */ From 0a659407bdf8d447d83616b9f77e575b4a09afc9 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 20 Jan 2023 13:37:00 +0530 Subject: [PATCH 41/60] Updated imports --- .../load-testing-rest/src/beginCreateOrUpdateTestRun.ts | 3 ++- .../load-testing-rest/src/getFileValidatePoller.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index 0f932ae4176e..dee8e390db85 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -2,9 +2,10 @@ // Licensed under the MIT license. import { TestRunStatusPoller } from "./models"; -import { AzureLoadTestingClient, TestRunCreateOrUpdateParameters } from "./index.js"; +import { AzureLoadTestingClient } from "./clientDefinitions"; import { isUnexpected } from "./isUnexpected"; import { getTestRunPoller } from "./getTestRunPoller"; +import { TestRunCreateOrUpdateParameters } from "./parameters"; /** * Creates a poller to poll for test run status. diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts index 2c3fd1dc27d3..8a42ef65efee 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts @@ -4,7 +4,7 @@ import { AbortController, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; -import { AzureLoadTestingClient } from "./index.js"; +import { AzureLoadTestingClient } from "./clientDefinitions"; import { TestGetFile200Response, TestUploadFile201Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; import { sleep } from "./util/sleepLROUtility"; From b33d33b4bf6041fd67ecd146c868c96d478cae5b Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 20 Jan 2023 16:01:50 +0530 Subject: [PATCH 42/60] LRO error condtions corrected --- .../load-testing-rest/samples-dev/sample1.ts | 8 +++++-- .../src/getFileValidatePoller.ts | 21 ++++++++++++------- .../load-testing-rest/src/getTestRunPoller.ts | 16 +++++++------- .../load-testing-rest/src/index.ts | 2 ++ .../util/{sleepLROUtility.ts => LROUtil.ts} | 20 ++++++++++++++++++ 5 files changed, 50 insertions(+), 17 deletions(-) rename sdk/loadtestservice/load-testing-rest/src/util/{sleepLROUtility.ts => LROUtil.ts} (61%) diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts index e972b182fbea..9460c167e83a 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts @@ -63,7 +63,9 @@ async function main() { } const fileValidatePoller = await getFileValidatePoller(client, fileUploadResult, testId); - const fileValidateResult = await fileValidatePoller.pollUntilDone(); + const fileValidateResult = await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); if (fileValidatePoller.getOperationState().status != "succeeded") throw new Error( @@ -114,7 +116,9 @@ async function main() { throw new Error("Test Run ID returned as undefined."); const testRunPoller = await getTestRunPoller(client, testRunCreationResult); - const testRunResult = await testRunPoller.pollUntilDone(); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) throw new Error("There is some issue in running the test, Error Response : " + testRunResult); diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts index 8a42ef65efee..61115764d217 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts @@ -7,7 +7,7 @@ import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./clientDefinitions"; import { TestGetFile200Response, TestUploadFile201Response } from "./responses"; import { isUnexpected } from "./isUnexpected"; -import { sleep } from "./util/sleepLROUtility"; +import { sleep } from "./util/LROUtil"; /** * Uploads a file and creates a poller to poll for validation. @@ -43,27 +43,32 @@ export async function getFileValidatePoller( .path("/tests/{testId}/files/{fileName}", testId, fileName) .get(); if (isUnexpected(fileValidationResponse)) { - throw fileValidationResponse.body.error; + state.status = "failed"; + state.error = new Error(fileValidationResponse.body.error.message); + return; } - if ( - fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED" || - fileValidationResponse.body.validationStatus === "NOT_VALIDATED" - ) { + if (fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED") { state.status = "running"; } - + if (fileValidationResponse.body.validationStatus === "NOT_VALIDATED") { + if (fileValidationResponse.body.fileType == "JMX_FILE") { + state.status = "running"; + } else { + state.status = "succeeded"; + } + } if ( fileValidationResponse.body.validationStatus === "VALIDATION_SUCCESS" || fileValidationResponse.body.validationStatus === "VALIDATION_NOT_REQUIRED" ) { state.status = "succeeded"; - state.result = fileValidationResponse; } if (fileValidationResponse.body.validationStatus === "VALIDATION_FAILURE") { state.status = "failed"; state.error = new Error(fileValidationResponse.body.validationStatus); } + state.result = fileValidationResponse; await processProgressCallbacks(); } diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts index 0eb44286c8d4..c1419c8ed854 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts @@ -11,7 +11,7 @@ import { TestRunGet200Response, } from "./responses"; import { isUnexpected } from "./isUnexpected"; -import { sleep } from "./util/sleepLROUtility"; +import { sleep, isTestRunInProgress } from "./util/LROUtil"; /** * Creates a poller to poll for test run status. @@ -44,7 +44,9 @@ export async function getTestRunPoller( if (testRunId) { let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); if (isUnexpected(getTestRunResult)) { - throw getTestRunResult.body.error; + state.status = "failed"; + state.error = new Error(getTestRunResult.body.error.message); + return; } if (getTestRunResult.body.status === "FAILED") { @@ -52,18 +54,18 @@ export async function getTestRunPoller( state.error = new Error(getTestRunResult.body.status); } - if ( - getTestRunResult.body.status === "CANCELLING" || - getTestRunResult.body.status === "CANCELLED" - ) { + if (getTestRunResult.body.status === "CANCELLED") { state.status === "canceled"; } if (getTestRunResult.body.status === "DONE") { state.status = "succeeded"; - state.result = getTestRunResult; } + if (isTestRunInProgress(getTestRunResult.body)) { + state.status = "running"; + } + state.result = getTestRunResult; await processProgressCallbacks(); } }, diff --git a/sdk/loadtestservice/load-testing-rest/src/index.ts b/sdk/loadtestservice/load-testing-rest/src/index.ts index 13cd53dedb9a..4c1a98597013 100644 --- a/sdk/loadtestservice/load-testing-rest/src/index.ts +++ b/sdk/loadtestservice/load-testing-rest/src/index.ts @@ -13,4 +13,6 @@ export * from "./outputModels"; export * from "./paginateHelper"; export { beginCreateOrUpdateTestRun } from "./beginCreateOrUpdateTestRun"; export { beginUploadTestFile } from "./beginUploadTestFile"; +export { getFileValidatePoller } from "./getFileValidatePoller"; +export { getTestRunPoller } from "./getTestRunPoller"; export default AzureLoadTesting; diff --git a/sdk/loadtestservice/load-testing-rest/src/util/sleepLROUtility.ts b/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts similarity index 61% rename from sdk/loadtestservice/load-testing-rest/src/util/sleepLROUtility.ts rename to sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts index 767279434f9c..c03d70125d3b 100644 --- a/sdk/loadtestservice/load-testing-rest/src/util/sleepLROUtility.ts +++ b/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. import { AbortSignalLike } from "@azure/abort-controller"; +import { TestRunOutput } from "../outputModels"; const REJECTED_ERR = new Error("The operation has been aborted"); @@ -30,3 +31,22 @@ export function sleep(ms: number, signal: AbortSignalLike): Promise { } }); } + +export function isTestRunInProgress(testRunOutput: TestRunOutput): boolean { + switch (testRunOutput.status) { + case "ACCEPTED": + case "NOTSTARTED": + case "PROVISIONING": + case "PROVISIONED": + case "CONFIGURING": + case "CONFIGURED": + case "EXECUTING": + case "EXECUTED": + case "DEPROVISIONING": + case "DEPROVISIONED": + case "CANCELLING": + return true; + default: + return false; + } +} From 1e54eda11576d258a4eb02f5f8997c9a129b9830 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 20 Jan 2023 17:33:39 +0530 Subject: [PATCH 43/60] Added AbortSignal Changes --- .../load-testing-rest/samples-dev/sample1.ts | 9 ++++----- .../load-testing-rest/src/beginCreateOrUpdateTestRun.ts | 4 ++-- .../load-testing-rest/src/beginUploadTestFile.ts | 4 ++-- ...tFileValidatePoller.ts => getFileValidationPoller.ts} | 8 +++++++- ...getTestRunPoller.ts => getTestRunCompletionPoller.ts} | 9 ++++++++- sdk/loadtestservice/load-testing-rest/src/index.ts | 4 ++-- 6 files changed, 25 insertions(+), 13 deletions(-) rename sdk/loadtestservice/load-testing-rest/src/{getFileValidatePoller.ts => getFileValidationPoller.ts} (95%) rename sdk/loadtestservice/load-testing-rest/src/{getTestRunPoller.ts => getTestRunCompletionPoller.ts} (95%) diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts index 9460c167e83a..48a99dc5f218 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts @@ -10,14 +10,13 @@ import AzureLoadTesting, { isUnexpected, - beginCreateOrUpdateTestRun, } from "@azure-rest/load-testing"; import { AbortController } from "@azure/abort-controller"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; -import { getFileValidatePoller } from "../src/getFileValidatePoller"; -import { getTestRunPoller } from "../src/getTestRunPoller"; +import { getFileValidationPoller } from "../src/getFileValidationPoller"; +import { getTestRunCompletionPoller } from "../src/getTestRunCompletionPoller"; const readStream = createReadStream("./sample.jmx"); @@ -62,7 +61,7 @@ async function main() { throw fileUploadResult.body.error; } - const fileValidatePoller = await getFileValidatePoller(client, fileUploadResult, testId); + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult, testId); const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -115,7 +114,7 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - const testRunPoller = await getTestRunPoller(client, testRunCreationResult); + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts index dee8e390db85..507274b87013 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts @@ -4,7 +4,7 @@ import { TestRunStatusPoller } from "./models"; import { AzureLoadTestingClient } from "./clientDefinitions"; import { isUnexpected } from "./isUnexpected"; -import { getTestRunPoller } from "./getTestRunPoller"; +import { getTestRunCompletionPoller } from "./getTestRunCompletionPoller"; import { TestRunCreateOrUpdateParameters } from "./parameters"; /** @@ -30,5 +30,5 @@ export async function beginCreateOrUpdateTestRun( if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - return getTestRunPoller(client, testRunCreationResult); + return getTestRunCompletionPoller(client, testRunCreationResult); } diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts index 39bc81e35703..b6b612d7917a 100644 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts @@ -4,7 +4,7 @@ import { FileUploadAndValidatePoller } from "./models"; import { AzureLoadTestingClient } from "./clientDefinitions"; import { isUnexpected } from "./isUnexpected"; -import { getFileValidatePoller } from "./getFileValidatePoller"; +import { getFileValidationPoller } from "./getFileValidationPoller"; import { TestUploadFileParameters } from "./parameters"; /** @@ -27,5 +27,5 @@ export async function beginUploadTestFile( throw fileUploadResult.body.error; } - return getFileValidatePoller(client, fileUploadResult, testId); + return getFileValidationPoller(client, fileUploadResult, testId); } diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts similarity index 95% rename from sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts rename to sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts index 61115764d217..5a7f123391e7 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidatePoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts @@ -15,7 +15,7 @@ import { sleep } from "./util/LROUtil"; * @param options - The operation options. * @returns A poller which can be called to poll until completion of the job. */ -export async function getFileValidatePoller( +export async function getFileValidationPoller( client: AzureLoadTestingClient, fileUploadResult: TestUploadFile201Response, testId: string, @@ -38,6 +38,12 @@ export async function getFileValidatePoller( const poller: SimplePollerLike, TestGetFile200Response> = { async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { + if (_options?.abortSignal?.aborted) { + state.status = "failed"; + state.error = new Error("The operation was aborted."); + return; + } + if (fileName) { let fileValidationResponse = await client .path("/tests/{testId}/files/{fileName}", testId, fileName) diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts similarity index 95% rename from sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts rename to sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts index c1419c8ed854..ba34f698c90b 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getTestRunPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts @@ -19,7 +19,7 @@ import { sleep, isTestRunInProgress } from "./util/LROUtil"; * @param options - The operation options. * @returns A poller which can be called to poll until completion of the job. */ -export async function getTestRunPoller( +export async function getTestRunCompletionPoller( client: AzureLoadTestingClient, createTestRunResponse: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response, polledOperationOptions: PolledOperationOptions = {} @@ -41,6 +41,13 @@ export async function getTestRunPoller( const poller: SimplePollerLike, TestRunGet200Response> = { async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { + + if (_options?.abortSignal?.aborted) { + state.status = "failed"; + state.error = new Error("The operation was aborted."); + return; + } + if (testRunId) { let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); if (isUnexpected(getTestRunResult)) { diff --git a/sdk/loadtestservice/load-testing-rest/src/index.ts b/sdk/loadtestservice/load-testing-rest/src/index.ts index 4c1a98597013..a10d5a1b03f5 100644 --- a/sdk/loadtestservice/load-testing-rest/src/index.ts +++ b/sdk/loadtestservice/load-testing-rest/src/index.ts @@ -13,6 +13,6 @@ export * from "./outputModels"; export * from "./paginateHelper"; export { beginCreateOrUpdateTestRun } from "./beginCreateOrUpdateTestRun"; export { beginUploadTestFile } from "./beginUploadTestFile"; -export { getFileValidatePoller } from "./getFileValidatePoller"; -export { getTestRunPoller } from "./getTestRunPoller"; +export { getFileValidationPoller } from "./getFileValidationPoller"; +export { getTestRunCompletionPoller } from "./getTestRunCompletionPoller"; export default AzureLoadTesting; From 49eeaf10cc8b22db23da9e0652f4c3f890c905ed Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Fri, 20 Jan 2023 20:32:25 +0530 Subject: [PATCH 44/60] Added LRO Tests --- ...l_to_upload_the_test_file_with_lro404.json | 4 + ...d_not_be_able_to_create_a_test_run404.json | 4 + ...recording_should_timeout_the_test_run.json | 4 + .../recording_should_create_a_loadtest.json | 16 +- ...ding_should_create_the_app_components.json | 14 +- .../recording_should_delete_the_test.json | 8 +- ...recording_should_delete_the_test_file.json | 8 +- ...l_to_upload_the_test_file_with_lro404.json | 71 +++ .../recording_should_get_the_test.json | 20 +- ...ng_should_get_the_test_app_components.json | 14 +- .../recording_should_get_the_test_file.json | 14 +- ...pload_the_additional_file_without_lro.json | 10 +- ..._should_upload_the_test_file_with_lro.json | 50 +-- ...d_create_a_app_component_for_test_run.json | 12 +- .../recording_should_create_a_loadtest.json | 12 +- .../recording_should_create_a_test_run.json | 410 +++++++++--------- .../recording_should_delete_a_test_run.json | 8 +- .../recording_should_get_a_test_run.json | 35 +- ..._should_get_a_test_run_app_components.json | 12 +- ..._get_a_test_run_server_metrics_config.json | 12 +- ...d_not_be_able_to_create_a_test_run404.json | 111 +++++ ...recording_should_timeout_the_test_run.json | 287 ++++++++++++ ..._should_upload_the_test_file_with_lro.json | 50 +-- .../samples-dev/sampleWithInitialLROCall.ts | 188 ++++++++ .../samples/v1-beta/javascript/README.md | 10 +- .../samples/v1-beta/javascript/sample.js | 29 +- .../javascript/sampleWithInitialLROCall.js | 189 ++++++++ .../samples/v1-beta/typescript/README.md | 10 +- .../samples/v1-beta/typescript/src/sample.ts | 29 +- .../src/sampleWithInitialLROCall.ts} | 1 - .../src/getFileValidationPoller.ts | 14 +- .../src/getTestRunCompletionPoller.ts | 15 +- .../load-testing-rest/src/util/LROUtil.ts | 2 +- .../test/public/testAdministration.spec.ts | 28 +- .../test/public/testRun.spec.ts | 53 ++- 35 files changed, 1353 insertions(+), 401 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_timeout_the_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sampleWithInitialLROCall.ts create mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js rename sdk/loadtestservice/load-testing-rest/{samples-dev/sample1.ts => samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts} (99%) diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_timeout_the_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_timeout_the_test_run.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_timeout_the_test_run.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json index 04d519781e9e..277b426f9e3c 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "54c77772-05b2-46e7-b845-21042990e0e1" + "x-ms-client-request-id": "cc05ae2f-dfa8-47b8-acd2-05ff29af966c" }, "RequestBody": { "displayName": "sample_test", @@ -25,13 +25,13 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "477", + "Content-Length": "476", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:02 GMT", - "mise-correlation-id": "c250f1fa-10f5-479e-87b4-f2a4dcc49282", + "Date": "Fri, 20 Jan 2023 14:59:49 GMT", + "mise-correlation-id": "7d5ae247-1ff4-4460-ae95-b5dbe2e9ea22", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "dc32f31a-c238-4602-b723-5e9e00efbff7" + "x-ms-correlation-request-id": "20fa6fb4-7de7-4de5-8400-959ec8b260ce" }, "ResponseBody": { "loadTestConfiguration": { @@ -44,7 +44,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:02.2589509", + "expireDateTime": "2023-01-20T15:59:49.6222984", "validationStatus": "VALIDATION_SUCCESS" }, "additionalFileInfo": [] @@ -52,8 +52,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-19T18:31:17.981Z", - "lastModifiedDateTime": "2023-01-19T18:37:02.251Z" + "createdDateTime": "2023-01-20T14:56:50.37Z", + "lastModifiedDateTime": "2023-01-20T14:59:49.616Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json index 9cf626513ca2..8efcf7a5e445 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json @@ -11,7 +11,7 @@ "Content-Length": "427", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "efff09bd-076b-49a4-b724-f88c574e60ff" + "x-ms-client-request-id": "fddded41-12d9-44c3-bf5d-1bed5dbd034e" }, "RequestBody": { "testId": "abc", @@ -28,14 +28,14 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "561", + "Content-Length": "563", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:12 GMT", + "Date": "Fri, 20 Jan 2023 15:00:00 GMT", "Location": "https://endpoint/tests/abc/app-components?api-version=2022-11-01", - "mise-correlation-id": "c4b588b4-3aa5-4468-a644-f1158c0c9f51", + "mise-correlation-id": "0f3068a3-b0bb-45f8-a53c-b873c672119f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b0ef5548-9c72-4399-905c-43fd576fd4e9" + "x-ms-correlation-request-id": "b494ef35-a484-4a95-a909-931a0d8d0c1e" }, "ResponseBody": { "components": { @@ -48,8 +48,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-19T18:37:11.88Z", - "lastModifiedDateTime": "2023-01-19T18:37:11.88Z" + "createdDateTime": "2023-01-20T15:00:00.663Z", + "lastModifiedDateTime": "2023-01-20T15:00:00.663Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json index d98f92145b27..4df129268919 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "2bba6c64-d17a-496f-8e1c-49ca4d6b370c" + "x-ms-client-request-id": "062219b2-d544-49dc-b2e9-38348630105a" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Thu, 19 Jan 2023 18:37:14 GMT", - "mise-correlation-id": "029479c9-6400-4bfb-ad21-16e1d103092a", + "Date": "Fri, 20 Jan 2023 15:00:04 GMT", + "mise-correlation-id": "cb3e5980-9c13-4ada-9226-6501267a2012", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "6dc3c651-b872-4075-bce3-a696cd857d0a" + "x-ms-correlation-request-id": "f5380b7c-494f-4abc-bf05-b58e60980838" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json index fb0b6573ff79..9f76079742ec 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "be9dfd24-e33f-4ad8-9c98-93dd4fa90208" + "x-ms-client-request-id": "788b8c66-14ab-44c4-9725-5b46c1a7a905" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Thu, 19 Jan 2023 18:37:14 GMT", - "mise-correlation-id": "7b38acb4-23ef-447f-a173-d865d1329d64", + "Date": "Fri, 20 Jan 2023 15:00:04 GMT", + "mise-correlation-id": "c54e7757-559d-4db2-a706-a3ae05035d15", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5757e7bb-2559-403a-8fac-69795b7aaf84" + "x-ms-correlation-request-id": "e4992a03-5005-461b-98e6-a202df748350" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json new file mode 100644 index 000000000000..981e31b5b8ec --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json @@ -0,0 +1,71 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "application/octet-stream", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "c037a2e1-5ef4-410d-878a-010223f51337" + }, + "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "167", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 20 Jan 2023 14:59:59 GMT", + "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "mise-correlation-id": "1ebce1a9-e7ba-4fe3-869b-e736494ef9dc", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6cac6b2e-00d9-4024-bcfe-4d59d4885ad6" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-20T15:09:59.791812", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abcd/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "033d0595-0152-40d4-a3fa-02c7ee5eee9f" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "86", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 20 Jan 2023 15:00:00 GMT", + "mise-correlation-id": "0d851165-2e84-4327-932d-a4aef133c211", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "078996da-d7b0-4156-91c2-7635fb368f6c" + }, + "ResponseBody": { + "error": { + "code": "TestNotFound", + "message": "Test not found with given name \u0022abcd\u0022." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json index 3d4e3f037d81..cd32fa291cc0 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7b73f044-e7c3-4b27-9f74-66822e77bc06" + "x-ms-client-request-id": "425f9981-6963-434f-ba7d-2cbbf7192986" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "669", + "Content-Length": "670", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:13 GMT", - "mise-correlation-id": "bb016455-b104-45aa-ba3d-6727661a8541", + "Date": "Fri, 20 Jan 2023 15:00:01 GMT", + "mise-correlation-id": "32e58b56-cc0e-484d-aebb-89e2f6740550", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e6113283-7431-4b27-8b27-8baac2e8fd58" + "x-ms-correlation-request-id": "f9b06bec-2707-440f-9557-7c6b40a2f8b8" }, "ResponseBody": { "loadTestConfiguration": { @@ -35,15 +35,15 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:13.0658008", - "validationStatus": "VALIDATION_SUCCESS" + "expireDateTime": "2023-01-20T16:00:01.8364671", + "validationStatus": "VALIDATION_INITIATED" }, "additionalFileInfo": [ { "url": "https://storageurl.com/", "fileName": "additional-data.csv", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:13.0659031", + "expireDateTime": "2023-01-20T16:00:01.8366073", "validationStatus": "VALIDATION_NOT_REQUIRED" } ] @@ -51,8 +51,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-19T18:31:17.981Z", - "lastModifiedDateTime": "2023-01-19T18:37:12.088Z" + "createdDateTime": "2023-01-20T14:56:50.37Z", + "lastModifiedDateTime": "2023-01-20T15:00:00.712Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json index b8e0059c564f..ae496e7bc988 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "6a31ec06-5ae7-450f-9207-5d25e911e2bf" + "x-ms-client-request-id": "567e83ec-5956-4a5c-a624-4a1b220d66e6" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "561", + "Content-Length": "563", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:13 GMT", - "mise-correlation-id": "a51db85f-4af9-4608-94ea-e7b3d1a59d24", + "Date": "Fri, 20 Jan 2023 15:00:02 GMT", + "mise-correlation-id": "4216a39b-83cf-45bf-8bdb-5df9f0b22278", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7c322389-47bd-4650-beb3-ff9462c3504a" + "x-ms-correlation-request-id": "09e25e61-c232-4c33-abf8-4a40fd05e07a" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-19T18:37:11.88Z", - "lastModifiedDateTime": "2023-01-19T18:37:11.88Z" + "createdDateTime": "2023-01-20T15:00:00.663Z", + "lastModifiedDateTime": "2023-01-20T15:00:00.663Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json index 91f9221ec55b..4f7ed4d04cf7 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json @@ -9,27 +9,27 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cf175769-58bf-4b87-a277-7cd315a7b2d3" + "x-ms-client-request-id": "a2726c60-1c96-465a-9c78-2340d5ea9dc6" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "166", + "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:12 GMT", - "mise-correlation-id": "7daaa781-6d83-4f39-9981-a5f5468f3522", + "Date": "Fri, 20 Jan 2023 15:00:01 GMT", + "mise-correlation-id": "e768fc9d-1392-46c5-9cfc-237d39ee528c", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f97fe409-ff5d-48eb-acda-29ede332a91e" + "x-ms-correlation-request-id": "05570931-ad0a-427e-ba9c-5365fb5a88ff" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:12.5536978", - "validationStatus": "VALIDATION_SUCCESS" + "expireDateTime": "2023-01-20T15:10:01.2144175", + "validationStatus": "VALIDATION_INITIATED" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json index d46078a9abda..3e128a60b3f5 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "f8f14d9d-adaf-4571-b594-42d9ed94c938" + "x-ms-client-request-id": "812580b7-8645-432b-b3ff-d19c7aaab8d5" }, "RequestBody": "YSxiLGMsZA0KMSwyLDMsNA0K", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "192", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:03 GMT", + "Date": "Fri, 20 Jan 2023 14:59:50 GMT", "Location": "https://endpoint/tests/abc/files/additional-data.csv?api-version=2022-11-01", - "mise-correlation-id": "e8ea4f9d-3421-4cdf-b7cb-22ab5787e137", + "mise-correlation-id": "32cd65f2-1d30-4e80-a7ec-a0e583903d07", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4335ac14-5156-4157-bcd9-2a40dd5f23eb" + "x-ms-correlation-request-id": "4dddb0c1-6341-49e0-9d25-b1a2a0a587d1" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "additional-data.csv", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T18:47:03.0271566", + "expireDateTime": "2023-01-20T15:09:50.2677029", "validationStatus": "VALIDATION_NOT_REQUIRED" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json index 59807cd444c6..58db1168128e 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "2f0728ad-df3c-42ff-93a2-deb42ca9616c" + "x-ms-client-request-id": "ab996edb-24d3-47e2-afd0-9bdc3a12f174" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:03 GMT", + "Date": "Fri, 20 Jan 2023 14:59:50 GMT", "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", - "mise-correlation-id": "0570c01f-319a-457d-9d30-47fbe75a8831", + "mise-correlation-id": "69f8869d-98e1-4ecd-9814-956053fb3636", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c2989411-69b9-405d-b97e-cb26f813fa8f" + "x-ms-correlation-request-id": "72b75a4c-190b-451e-b82f-1e8471ecf678" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:03.7391007", + "expireDateTime": "2023-01-20T15:09:50.8399486", "validationStatus": "VALIDATION_INITIATED" } }, @@ -44,7 +44,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5eaea780-f306-476d-8bd6-4e563aec5fd1" + "x-ms-client-request-id": "35ecab85-59a9-4a03-b52b-fed7d19809ae" }, "RequestBody": null, "StatusCode": 200, @@ -53,17 +53,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:04 GMT", - "mise-correlation-id": "e0ba5cb1-6e1a-4835-9846-f0d5c13af66a", + "Date": "Fri, 20 Jan 2023 14:59:51 GMT", + "mise-correlation-id": "286a10c8-d2ba-471d-98c3-96fa364e067b", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "37a8cd90-4981-4428-979c-53dbf4763f70" + "x-ms-correlation-request-id": "6ecc7bce-2431-410c-93c5-a62a3eefed07" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:04.1015804", + "expireDateTime": "2023-01-20T15:09:51.3068987", "validationStatus": "VALIDATION_INITIATED" } }, @@ -76,7 +76,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "228dba81-3d8b-4791-8a30-4a6c324b4c23" + "x-ms-client-request-id": "7485404c-e334-4070-aa3b-d6e07bc7b4cb" }, "RequestBody": null, "StatusCode": 200, @@ -85,17 +85,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:06 GMT", - "mise-correlation-id": "2295b8df-656a-4e28-92e2-ddd10595ccd0", + "Date": "Fri, 20 Jan 2023 14:59:53 GMT", + "mise-correlation-id": "cb03d348-f29b-4478-83ec-1197b76389df", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "107d2ead-4f9c-4296-afb8-3a963dd3aa98" + "x-ms-correlation-request-id": "f0b4a654-2ccc-473b-b8ff-265b617ade13" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:06.5018553", + "expireDateTime": "2023-01-20T15:09:53.7098782", "validationStatus": "VALIDATION_INITIATED" } }, @@ -108,7 +108,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "082dab54-dbb1-4e86-aa0a-2cc8579e4064" + "x-ms-client-request-id": "49f4b497-9ecc-4d82-ada2-3d6c029a0f2b" }, "RequestBody": null, "StatusCode": 200, @@ -117,17 +117,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:08 GMT", - "mise-correlation-id": "6a43a8a8-2182-4173-b6f8-12d69f910172", + "Date": "Fri, 20 Jan 2023 14:59:56 GMT", + "mise-correlation-id": "df405e0f-746c-4577-8c8b-73fa3320abfc", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a30fd709-7cb8-4338-81c8-20d34eb29acf" + "x-ms-correlation-request-id": "7c461241-2602-47c8-b567-bc514e753845" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:08.8968905", + "expireDateTime": "2023-01-20T15:09:56.0920764", "validationStatus": "VALIDATION_INITIATED" } }, @@ -140,7 +140,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "4803869a-12ba-47f0-8b3d-44f7cdc98ca4" + "x-ms-client-request-id": "5f390065-470d-409d-83e2-ede137e767c9" }, "RequestBody": null, "StatusCode": 200, @@ -149,17 +149,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:11 GMT", - "mise-correlation-id": "acdb6423-02ec-4005-994a-32274ee31e61", + "Date": "Fri, 20 Jan 2023 14:59:58 GMT", + "mise-correlation-id": "3df2a330-98e9-433d-9815-a6dcb8aadf91", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "0e87e299-5c64-478a-956d-5652cf3d5c14" + "x-ms-correlation-request-id": "b859c435-a2a5-4715-90a6-dce27e0a8306" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:11.3364467", + "expireDateTime": "2023-01-20T15:09:58.5041289", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json index 351340009314..19ca645896f9 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "412", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "6f11071f-6a73-4dd7-812d-91f3d5852e39" + "x-ms-client-request-id": "90cad167-466d-4bdf-bda6-e5f24b37622e" }, "RequestBody": { "components": { @@ -29,12 +29,12 @@ "Connection": "keep-alive", "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:38:06 GMT", + "Date": "Fri, 20 Jan 2023 15:01:04 GMT", "Location": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", - "mise-correlation-id": "b6d9bf6b-58ec-42ab-ba59-e5a0b294a5d4", + "mise-correlation-id": "a9e98021-9a0c-482c-bb66-19fee2327280", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9ade5b13-7983-460c-a146-d83eefca9a36" + "x-ms-correlation-request-id": "69c671ad-9c64-474e-bbe6-8d34b1f191f0" }, "ResponseBody": { "components": { @@ -47,8 +47,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-19T18:38:06.097Z", - "lastModifiedDateTime": "2023-01-19T18:38:06.097Z" + "createdDateTime": "2023-01-20T15:01:04.733Z", + "lastModifiedDateTime": "2023-01-20T15:01:04.733Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json index 7d9854a15438..11b44a2c9466 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "24b5aa89-69f2-4c80-bd96-adc81d0fef82" + "x-ms-client-request-id": "de2b9733-5822-496d-b0b5-8591a63ddcc6" }, "RequestBody": { "displayName": "sample_test", @@ -27,12 +27,12 @@ "Connection": "keep-alive", "Content-Length": "289", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:15 GMT", + "Date": "Fri, 20 Jan 2023 15:00:05 GMT", "Location": "https://endpoint/tests/abc?api-version=2022-11-01", - "mise-correlation-id": "3c293977-88a8-4a2a-beab-f5d67f21f9b1", + "mise-correlation-id": "5a553cf6-7ee6-4701-94eb-61442036a76e", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "211e0b9b-a20c-48b2-ad96-c8b60852e937" + "x-ms-correlation-request-id": "a3a05a6f-9ac5-42be-bf8f-94c87b49f6f2" }, "ResponseBody": { "loadTestConfiguration": { @@ -46,8 +46,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-19T18:37:15.586Z", - "lastModifiedDateTime": "2023-01-19T18:37:15.586Z" + "createdDateTime": "2023-01-20T15:00:05.811Z", + "lastModifiedDateTime": "2023-01-20T15:00:05.811Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json index 944a1f338bb9..159a9d39df05 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "41", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "9fe4d7fc-8a17-4a54-b364-a2d5ac218a27" + "x-ms-client-request-id": "3c867f23-489d-4687-b35f-fb5696c8e686" }, "RequestBody": { "testId": "abc", @@ -23,12 +23,12 @@ "Connection": "keep-alive", "Content-Length": "1286", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:26 GMT", + "Date": "Fri, 20 Jan 2023 15:00:16 GMT", "Location": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "mise-correlation-id": "ddcdb378-28ab-44b1-ba3c-cc22c0ae795f", + "mise-correlation-id": "babd14e9-5260-497a-8dc0-e2e6b7d7741a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9855c1cd-64e7-4c53-a254-56177c1987d9" + "x-ms-correlation-request-id": "b75dcc9a-ee67-4ddd-9747-849cf5d54134" }, "ResponseBody": { "loadTestConfiguration": { @@ -49,7 +49,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:24.8662308", + "expireDateTime": "2023-01-20T16:00:15.4598318", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { @@ -68,10 +68,10 @@ "displayName": "sampletr", "testId": "abc", "status": "ACCEPTED", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:26.109Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:16.644Z" } }, { @@ -83,20 +83,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "0df8009a-5106-4f65-bdca-fff2c0dcfc56" + "x-ms-client-request-id": "c8de7aa2-e7c3-4fb4-9c15-639356fe141f" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1349", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:26 GMT", - "mise-correlation-id": "3fdf96c7-1848-414b-949d-2cc8d2ac4044", + "Date": "Fri, 20 Jan 2023 15:00:17 GMT", + "mise-correlation-id": "93c45516-91d1-4615-9067-0c920f4bf147", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "31c427e3-d7a9-4593-a51c-eba69a4eb8eb" + "x-ms-correlation-request-id": "150e4ea5-a4a9-4d6b-9c58-a1680cb1f2ee" }, "ResponseBody": { "loadTestConfiguration": { @@ -110,21 +110,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:26.4898282", + "expireDateTime": "2023-01-20T16:00:17.1000041", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:26.4897145", + "expireDateTime": "2023-01-20T16:00:17.0998976", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:26.48985", + "expireDateTime": "2023-01-20T16:00:17.1000267", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -136,11 +136,11 @@ "displayName": "sampletr", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:26.464Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:16.974Z" } }, { @@ -152,7 +152,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "f908279a-f497-4d50-9081-0132856a080c" + "x-ms-client-request-id": "dec98239-da5b-4aa1-b3f4-69a0221846f4" }, "RequestBody": null, "StatusCode": 200, @@ -161,11 +161,11 @@ "Connection": "keep-alive", "Content-Length": "1349", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:28 GMT", - "mise-correlation-id": "3fce277b-bbd6-4043-8f12-90b3d7459178", + "Date": "Fri, 20 Jan 2023 15:00:19 GMT", + "mise-correlation-id": "decd1859-d862-4565-99ad-9eab3d9b1500", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "21c5789b-b0fc-409f-8f5f-80e0c1d5cf47" + "x-ms-correlation-request-id": "cda42736-f632-48ec-baac-9d81a089c899" }, "ResponseBody": { "loadTestConfiguration": { @@ -179,21 +179,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:28.8706394", + "expireDateTime": "2023-01-20T16:00:19.5029653", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:28.8705362", + "expireDateTime": "2023-01-20T16:00:19.5028219", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:28.8706612", + "expireDateTime": "2023-01-20T16:00:19.5029951", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -205,11 +205,11 @@ "displayName": "sampletr", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:26.464Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:16.974Z" } }, { @@ -221,20 +221,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c8c1b45c-666c-4ed2-ae38-5172e0b61870" + "x-ms-client-request-id": "ace41f9a-e216-4b21-a526-326c8af90532" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:31 GMT", - "mise-correlation-id": "fce5283f-60ef-447f-93db-70e5a8b08678", + "Date": "Fri, 20 Jan 2023 15:00:21 GMT", + "mise-correlation-id": "fbec2569-d9a1-4e37-8a6f-43f6c5d09b26", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "190d2ecc-affe-434e-9c74-240dbd1bb928" + "x-ms-correlation-request-id": "060fd9f8-92b6-4899-8001-9213a9aafafa" }, "ResponseBody": { "loadTestConfiguration": { @@ -248,21 +248,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:31.2454875", + "expireDateTime": "2023-01-20T16:00:21.898237", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:31.245385", + "expireDateTime": "2023-01-20T16:00:21.898131", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:31.245511", + "expireDateTime": "2023-01-20T16:00:21.898266", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -274,11 +274,11 @@ "displayName": "sampletr", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:26.464Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:16.974Z" } }, { @@ -290,7 +290,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "08ea8768-2082-4ed3-b8c3-a77d040bd21e" + "x-ms-client-request-id": "58ccb5b8-d778-4932-94e7-ac6382d6aaf0" }, "RequestBody": null, "StatusCode": 200, @@ -299,11 +299,11 @@ "Connection": "keep-alive", "Content-Length": "1349", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:33 GMT", - "mise-correlation-id": "768ead89-8f17-46b1-be77-e740d58a43a1", + "Date": "Fri, 20 Jan 2023 15:00:24 GMT", + "mise-correlation-id": "deea291c-fe59-4d50-83d3-5896b55027fe", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "264efaea-dba8-4d1d-9e7d-b8a25bb34184" + "x-ms-correlation-request-id": "3dbb3711-6e61-489b-8edb-8f406ebf616b" }, "ResponseBody": { "loadTestConfiguration": { @@ -317,21 +317,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:33.6408848", + "expireDateTime": "2023-01-20T16:00:24.6814183", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:33.6407854", + "expireDateTime": "2023-01-20T16:00:24.6812541", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:33.6409067", + "expireDateTime": "2023-01-20T16:00:24.6814656", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -343,11 +343,11 @@ "displayName": "sampletr", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:26.464Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:16.974Z" } }, { @@ -359,20 +359,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "80a9f2e0-95af-483c-bd69-9941cd6bea94" + "x-ms-client-request-id": "b287f2ac-429c-40c5-a2a0-ecf96f18e569" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1348", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:36 GMT", - "mise-correlation-id": "3f518006-cf36-4c58-8a52-2a01d93f6b48", + "Date": "Fri, 20 Jan 2023 15:00:27 GMT", + "mise-correlation-id": "7248c1af-0e9c-4818-9079-81fe9095a7a5", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f3a4e2a1-e428-4ec0-a2bd-27bc21070562" + "x-ms-correlation-request-id": "1a9ed712-56d1-4db3-ac74-5a8c8f1b29b5" }, "ResponseBody": { "loadTestConfiguration": { @@ -386,21 +386,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:36.020995", + "expireDateTime": "2023-01-20T16:00:27.0954079", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:36.0208555", + "expireDateTime": "2023-01-20T16:00:27.0953014", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:36.0210279", + "expireDateTime": "2023-01-20T16:00:27.0954314", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -412,11 +412,11 @@ "displayName": "sampletr", "testId": "abc", "status": "CONFIGURING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:33.905Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:25.418Z" } }, { @@ -428,20 +428,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "1b001921-e62d-4199-bb16-818eee362d62" + "x-ms-client-request-id": "a06b98f0-e7e9-4d07-95c0-94ee24bc5411" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1348", + "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:38 GMT", - "mise-correlation-id": "fd273c04-2b54-456c-96f2-7a60996e450e", + "Date": "Fri, 20 Jan 2023 15:00:29 GMT", + "mise-correlation-id": "1e9e1b5c-14cb-4f01-9d2d-ed52afce884f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "226e1307-adbc-4157-b9c8-de0397c81d8d" + "x-ms-correlation-request-id": "ef27225f-394d-4f91-b0ce-32a11f0ce5ac" }, "ResponseBody": { "loadTestConfiguration": { @@ -455,21 +455,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:38.3805846", + "expireDateTime": "2023-01-20T16:00:29.4737005", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:38.3804926", + "expireDateTime": "2023-01-20T16:00:29.473596", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:38.3806071", + "expireDateTime": "2023-01-20T16:00:29.4737218", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -481,11 +481,11 @@ "displayName": "sampletr", "testId": "abc", "status": "CONFIGURING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:33.905Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:25.418Z" } }, { @@ -497,7 +497,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "052b7fa1-a35c-4727-a11b-0efc5a19b6b8" + "x-ms-client-request-id": "1dcac623-424e-4b3f-914c-4e56d2231a8d" }, "RequestBody": null, "StatusCode": 200, @@ -506,11 +506,11 @@ "Connection": "keep-alive", "Content-Length": "1348", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:40 GMT", - "mise-correlation-id": "ba8ec3a6-cc80-4938-9ccc-a0ebd15c6105", + "Date": "Fri, 20 Jan 2023 15:00:31 GMT", + "mise-correlation-id": "253c44d9-f2ef-4bcd-accc-19bc1cad0056", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "be6190a3-154a-4888-843a-d2bb99df4cba" + "x-ms-correlation-request-id": "c480a48d-0d41-44da-84e2-271d7bc0d9f5" }, "ResponseBody": { "loadTestConfiguration": { @@ -524,21 +524,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:40.7621929", + "expireDateTime": "2023-01-20T16:00:31.8660666", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:40.7620457", + "expireDateTime": "2023-01-20T16:00:31.8659524", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:40.7622212", + "expireDateTime": "2023-01-20T16:00:31.8660901", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -550,11 +550,11 @@ "displayName": "sampletr", "testId": "abc", "status": "CONFIGURING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:33.905Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:25.418Z" } }, { @@ -566,7 +566,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a3cb8699-8531-4a22-8414-ed6839552103" + "x-ms-client-request-id": "8f655810-9199-45aa-b0f3-bdde545dd656" }, "RequestBody": null, "StatusCode": 200, @@ -575,11 +575,11 @@ "Connection": "keep-alive", "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:43 GMT", - "mise-correlation-id": "86387556-4afe-4a6c-85fc-83c6abed7532", + "Date": "Fri, 20 Jan 2023 15:00:34 GMT", + "mise-correlation-id": "720ad6f8-5d74-4ae9-a0a5-3b5bde2154bd", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "0bb88150-f9e0-43ff-ae8d-a940a2de6005" + "x-ms-correlation-request-id": "62b5f3ff-4638-421a-a04d-59c2f42e0129" }, "ResponseBody": { "loadTestConfiguration": { @@ -593,21 +593,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:43.1403606", + "expireDateTime": "2023-01-20T16:00:34.2762332", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:43.1402558", + "expireDateTime": "2023-01-20T16:00:34.2761322", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:43.1403833", + "expireDateTime": "2023-01-20T16:00:34.2762558", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -619,11 +619,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -635,7 +635,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "78053f64-f84b-49b8-8ca6-9e58b7bd26ca" + "x-ms-client-request-id": "8ddfe0a1-c54f-4f52-ac39-086500104291" }, "RequestBody": null, "StatusCode": 200, @@ -644,11 +644,11 @@ "Connection": "keep-alive", "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:45 GMT", - "mise-correlation-id": "68eef307-5e28-410c-886e-808d43d07b5d", + "Date": "Fri, 20 Jan 2023 15:00:36 GMT", + "mise-correlation-id": "3bb5b370-3f3f-4392-ad74-1b0d5b4d3144", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "bdcb5d8d-0be8-4778-b315-fd1903a4765c" + "x-ms-correlation-request-id": "03eb4b80-231b-4aa5-b8d8-aea7c11f681e" }, "ResponseBody": { "loadTestConfiguration": { @@ -662,21 +662,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:45.5269088", + "expireDateTime": "2023-01-20T16:00:36.6470942", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:45.5267616", + "expireDateTime": "2023-01-20T16:00:36.6469812", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:45.5269325", + "expireDateTime": "2023-01-20T16:00:36.6471175", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -688,11 +688,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -704,7 +704,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "e532ab6e-0be5-4c0c-8e1d-0202e21201be" + "x-ms-client-request-id": "ca71b0cd-c28f-43e0-8751-5a62a256f923" }, "RequestBody": null, "StatusCode": 200, @@ -713,11 +713,11 @@ "Connection": "keep-alive", "Content-Length": "1345", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:48 GMT", - "mise-correlation-id": "4c0647a0-6913-4b81-b009-d7dcf0e4f176", + "Date": "Fri, 20 Jan 2023 15:00:39 GMT", + "mise-correlation-id": "e9aafe1f-dad3-498a-b02d-046d21ba0ad5", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d8a51781-0022-4beb-9388-bfd1f03ab5cc" + "x-ms-correlation-request-id": "886444bc-81a4-4502-93ba-1e3350dc72da" }, "ResponseBody": { "loadTestConfiguration": { @@ -731,21 +731,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:47.999138", + "expireDateTime": "2023-01-20T16:00:39.1558664", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:47.9989979", + "expireDateTime": "2023-01-20T16:00:39.155765", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:47.9991814", + "expireDateTime": "2023-01-20T16:00:39.1558895", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -757,11 +757,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -773,7 +773,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c249507d-1386-4494-a7a5-136ae5885cce" + "x-ms-client-request-id": "f12d4138-419a-42b1-b9c4-162a05f347b3" }, "RequestBody": null, "StatusCode": 200, @@ -782,11 +782,11 @@ "Connection": "keep-alive", "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:50 GMT", - "mise-correlation-id": "68db9a1c-e5e5-49d9-ab55-10fee4ff8de0", + "Date": "Fri, 20 Jan 2023 15:00:41 GMT", + "mise-correlation-id": "d412f6cf-dad8-4c51-a11e-654aaf75ea1d", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "40ace56a-f65a-4285-a9a2-ba8175cb60ac" + "x-ms-correlation-request-id": "235424b4-f854-4f1e-a713-9fa6f6ca0e41" }, "ResponseBody": { "loadTestConfiguration": { @@ -800,21 +800,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:50.3542753", + "expireDateTime": "2023-01-20T16:00:41.5451432", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:50.3541748", + "expireDateTime": "2023-01-20T16:00:41.5450371", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:50.3542986", + "expireDateTime": "2023-01-20T16:00:41.5451697", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -826,11 +826,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -842,20 +842,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a2751b2b-0535-49f1-9ccd-3ea991d09db4" + "x-ms-client-request-id": "e0d2e106-efd9-44b1-a09b-e325ae94da0e" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1346", + "Content-Length": "1345", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:52 GMT", - "mise-correlation-id": "b82e96bf-2306-44e4-a81f-01bc2a5ed50d", + "Date": "Fri, 20 Jan 2023 15:00:44 GMT", + "mise-correlation-id": "c299952d-374e-45e0-977a-4a2a231346df", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "258a7eff-79e3-4b06-bb95-59221cc7a83a" + "x-ms-correlation-request-id": "18a51f18-7560-4423-9eaf-d5b0461f778c" }, "ResponseBody": { "loadTestConfiguration": { @@ -869,21 +869,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:52.7279669", + "expireDateTime": "2023-01-20T16:00:43.9978816", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:52.7278583", + "expireDateTime": "2023-01-20T16:00:43.9977809", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:52.7279911", + "expireDateTime": "2023-01-20T16:00:43.997906", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -895,11 +895,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -911,20 +911,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5a6dd785-f7d0-4f16-ac19-dbdda1896cac" + "x-ms-client-request-id": "2fa332ed-87b4-4fd2-9de0-ffd8dbd23063" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1346", + "Content-Length": "1345", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:55 GMT", - "mise-correlation-id": "429875c0-f3a2-4be5-86e4-ceb7cdc67b95", + "Date": "Fri, 20 Jan 2023 15:00:46 GMT", + "mise-correlation-id": "2500da83-442f-46b4-826d-7a7955df4eaf", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a63c42a4-e9c0-4a0b-8c1c-5879f35c23e9" + "x-ms-correlation-request-id": "c3eadaa0-d618-4bb1-82cc-316df50c3bbf" }, "ResponseBody": { "loadTestConfiguration": { @@ -938,21 +938,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:55.1109086", + "expireDateTime": "2023-01-20T16:00:46.4055747", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:55.1108073", + "expireDateTime": "2023-01-20T16:00:46.4054766", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:55.1109315", + "expireDateTime": "2023-01-20T16:00:46.405596", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -964,11 +964,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -980,7 +980,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a80bf6a0-7728-41b4-ab77-53e32bc6a341" + "x-ms-client-request-id": "f6f5022e-7c45-4697-9ae4-95f5d8384cd4" }, "RequestBody": null, "StatusCode": 200, @@ -989,11 +989,11 @@ "Connection": "keep-alive", "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:57 GMT", - "mise-correlation-id": "20c41427-ec25-44b4-a70e-a5ba774ea742", + "Date": "Fri, 20 Jan 2023 15:00:48 GMT", + "mise-correlation-id": "b0befec2-0f92-4899-8f83-e5fe2919f54a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1f02a847-ae42-4aa6-8128-27845ba31c20" + "x-ms-correlation-request-id": "f2626c3e-80a3-4979-b5bb-0a2e4ac1f601" }, "ResponseBody": { "loadTestConfiguration": { @@ -1007,21 +1007,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:57.5138638", + "expireDateTime": "2023-01-20T16:00:48.7742589", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:57.5137507", + "expireDateTime": "2023-01-20T16:00:48.7741525", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:57.5138863", + "expireDateTime": "2023-01-20T16:00:48.7742818", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1033,11 +1033,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -1049,7 +1049,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c0a6cc6a-17db-481c-85ef-f51c2c4a5eb8" + "x-ms-client-request-id": "1b6d3b5c-1dd6-4151-a91e-1fa6e6189773" }, "RequestBody": null, "StatusCode": 200, @@ -1058,11 +1058,11 @@ "Connection": "keep-alive", "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:59 GMT", - "mise-correlation-id": "3668af7a-8669-4711-8033-030a0e310dc2", + "Date": "Fri, 20 Jan 2023 15:00:51 GMT", + "mise-correlation-id": "2079a991-ec99-4a74-9606-4bff34f6961a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d595b249-ac8a-4cea-83fe-7613d76f51d2" + "x-ms-correlation-request-id": "ae06823e-3aaa-4804-8d02-257ce41fa054" }, "ResponseBody": { "loadTestConfiguration": { @@ -1076,21 +1076,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:59.9456672", + "expireDateTime": "2023-01-20T16:00:51.1597594", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:37:59.9455627", + "expireDateTime": "2023-01-20T16:00:51.1596363", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:37:59.9456894", + "expireDateTime": "2023-01-20T16:00:51.1597888", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1102,11 +1102,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -1118,20 +1118,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "85009f1e-0c79-4fc4-b97d-ab0eebb36d11" + "x-ms-client-request-id": "a36bea02-dc37-492b-97af-4b8fda93fbbc" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1346", + "Content-Length": "1344", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:38:02 GMT", - "mise-correlation-id": "7d87ef66-dc24-4474-abc5-3e4a78bed848", + "Date": "Fri, 20 Jan 2023 15:00:53 GMT", + "mise-correlation-id": "5848ca74-ae47-42dd-a631-08672eb9e8bc", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ef4db0fe-69db-4fca-8b8f-bdf9539a7dec" + "x-ms-correlation-request-id": "1f5ec1dd-33b8-4a29-96ba-7f97bc405b4e" }, "ResponseBody": { "loadTestConfiguration": { @@ -1145,21 +1145,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:38:02.3869054", + "expireDateTime": "2023-01-20T16:00:53.757985", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:38:02.3867678", + "expireDateTime": "2023-01-20T16:00:53.7578758", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:38:02.3869275", + "expireDateTime": "2023-01-20T16:00:53.758007", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1171,11 +1171,11 @@ "displayName": "sampletr", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-19T18:37:26.239Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:37:42.545Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:33.738Z" } }, { @@ -1187,20 +1187,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "3c6c75c1-a8ad-4be7-9b28-4781b2532042" + "x-ms-client-request-id": "864b30b3-eafd-45c1-9602-79b5a4b18f08" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1576", + "Content-Length": "1578", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:38:05 GMT", - "mise-correlation-id": "dc1d4a9d-6870-4ed7-a238-bbeedea47fb2", + "Date": "Fri, 20 Jan 2023 15:00:56 GMT", + "mise-correlation-id": "1beded8c-aa96-4133-b417-65211e4bc66b", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f2786844-eacf-4400-a26f-003cc10a2d8b" + "x-ms-correlation-request-id": "14609fc4-6ae5-428d-a81d-0607e5bf12aa" }, "ResponseBody": { "loadTestConfiguration": { @@ -1214,21 +1214,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:38:05.0735663", + "expireDateTime": "2023-01-20T16:00:56.1558035", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:38:05.0734665", + "expireDateTime": "2023-01-20T16:00:56.1557026", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:38:05.073589", + "expireDateTime": "2023-01-20T16:00:56.1558248", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1238,7 +1238,7 @@ "url": "https://storageurl.com/", "fileName": "logs.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:38:05.073611", + "expireDateTime": "2023-01-20T16:00:56.1558488", "validationStatus": "VALIDATION_NOT_REQUIRED" } } @@ -1248,12 +1248,12 @@ "displayName": "sampletr", "testId": "abc", "status": "DONE", - "startDateTime": "2023-01-19T18:37:26.239Z", - "endDateTime": "2023-01-19T18:38:02.658Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "endDateTime": "2023-01-20T15:00:53.842Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:38:04.987Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:55.226Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json index 70b46c57954c..0675bb4cccf9 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ce6828d5-e289-4b71-bca4-32cf18072c43" + "x-ms-client-request-id": "440a9b3f-f8f2-49c2-aa5b-6d3bed86dcfc" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Thu, 19 Jan 2023 18:38:07 GMT", - "mise-correlation-id": "73fb850e-d7a1-481d-8720-0801d0d28ab5", + "Date": "Fri, 20 Jan 2023 15:01:06 GMT", + "mise-correlation-id": "5b484149-d061-4d89-a479-13811017e590", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4372a612-92f1-4909-b144-8d7665814c2d" + "x-ms-correlation-request-id": "a8a205bf-03f6-49e1-a81a-c17110ea69fb" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json index 4174492c1549..587078bc8139 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "d32d1c3c-308f-4b0a-8730-3f28d90bb8ed" + "x-ms-client-request-id": "1a03918b-a156-48c3-9946-8d9f87565306" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1577", + "Content-Length": "1776", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:38:05 GMT", - "mise-correlation-id": "bac7361f-1f70-4b3c-aa53-c5af16f4172a", + "Date": "Fri, 20 Jan 2023 15:01:04 GMT", + "mise-correlation-id": "06cf00f6-4fbf-4d95-9434-5451a8585de6", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "0f6f8e0f-5c1e-43ca-9f71-d247b736a0af" + "x-ms-correlation-request-id": "62dcbfea-fcc6-4327-8fa7-8f063fe8b1a1" }, "ResponseBody": { "loadTestConfiguration": { @@ -36,31 +36,38 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:38:05.6419337", + "expireDateTime": "2023-01-20T16:01:04.2579166", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T19:38:05.6418176", + "expireDateTime": "2023-01-20T16:01:04.2578098", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:38:05.6419575", + "expireDateTime": "2023-01-20T16:01:04.2579397", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] }, "outputArtifacts": { + "resultFileInfo": { + "url": "https://storageurl.com/", + "fileName": "csv.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:01:04.2579613", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, "logsFileInfo": { "url": "https://storageurl.com/", "fileName": "logs.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-19T19:38:05.641981", + "expireDateTime": "2023-01-20T16:01:04.2579835", "validationStatus": "VALIDATION_NOT_REQUIRED" } } @@ -70,12 +77,12 @@ "displayName": "sampletr", "testId": "abc", "status": "DONE", - "startDateTime": "2023-01-19T18:37:26.239Z", - "endDateTime": "2023-01-19T18:38:02.658Z", - "executedDateTime": "2023-01-19T18:37:24.866Z", + "startDateTime": "2023-01-20T15:00:16.821Z", + "endDateTime": "2023-01-20T15:00:53.842Z", + "executedDateTime": "2023-01-20T15:00:15.461Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-19T18:37:26.109Z", - "lastModifiedDateTime": "2023-01-19T18:38:04.987Z" + "createdDateTime": "2023-01-20T15:00:16.644Z", + "lastModifiedDateTime": "2023-01-20T15:00:59.798Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json index ea4fac1c99a5..ba479a03c155 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ec47fe41-7952-4a12-8212-bfe9b380f7dc" + "x-ms-client-request-id": "816b7323-2c4e-44f1-922d-513d742c9788" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:38:06 GMT", - "mise-correlation-id": "5b77084b-58c9-42bc-811a-38a3ad03cc3c", + "Date": "Fri, 20 Jan 2023 15:01:05 GMT", + "mise-correlation-id": "977c4762-dc06-4b75-9c94-199385cae8b3", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "eccac18b-1d42-412c-a521-e22e76816fd2" + "x-ms-correlation-request-id": "19dc4402-77ba-4229-83fb-925c9121f34a" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-19T18:38:06.097Z", - "lastModifiedDateTime": "2023-01-19T18:38:06.097Z" + "createdDateTime": "2023-01-20T15:01:04.733Z", + "lastModifiedDateTime": "2023-01-20T15:01:04.733Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json index 68e60d20190c..7d8b7e22c410 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "286601e0-ec34-4c88-b66f-596751d013ab" + "x-ms-client-request-id": "dc034d5a-9b6a-4a03-b66c-cdd2d5ef615c" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "2077", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:38:07 GMT", - "mise-correlation-id": "f717ae9c-17e4-4d7f-bc13-7574383409d9", + "Date": "Fri, 20 Jan 2023 15:01:05 GMT", + "mise-correlation-id": "b8b41cc1-478d-4600-947c-6568e6d14aa6", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ff4f9fb1-2134-45d1-8eb3-aeb8bf726fd8" + "x-ms-correlation-request-id": "87c4b4cb-b775-4bf6-883c-42721d6f2235" }, "ResponseBody": { "testRunId": "abcde", @@ -52,8 +52,8 @@ "resourceType": "microsoft.web/sites" } }, - "createdDateTime": "2023-01-19T18:38:06.114Z", - "lastModifiedDateTime": "2023-01-19T18:38:06.114Z" + "createdDateTime": "2023-01-20T15:01:04.751Z", + "lastModifiedDateTime": "2023-01-20T15:01:04.751Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json new file mode 100644 index 000000000000..62f40dd097a0 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json @@ -0,0 +1,111 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "60", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "32d369cb-a571-4d94-8fcd-48fe9cf754ed" + }, + "RequestBody": { + "testId": "abc", + "displayName": "sample123", + "virtualUsers": 10 + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1289", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 20 Jan 2023 15:00:57 GMT", + "Location": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", + "mise-correlation-id": "78921dea-ba78-4448-8bab-42eb2f0e62f5", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "863b4bc8-2ebf-4f56-8bb4-09724c705215" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "0001-01-01T00:00:00", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-20T16:00:56.6564413", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "0001-01-01T00:00:00", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcjad", + "displayName": "sample123", + "testId": "abc", + "status": "ACCEPTED", + "executedDateTime": "2023-01-20T15:00:56.656Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", + "createdDateTime": "2023-01-20T15:00:57.484Z", + "lastModifiedDateTime": "2023-01-20T15:00:57.484Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/adjwfjsdmf?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "7d8f720c-f6d2-4282-b5a8-19baeef97434" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "99", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 20 Jan 2023 15:00:57 GMT", + "mise-correlation-id": "20a5caed-2c1c-4786-aa7f-6ea58d267d85", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a3190ca3-86d3-458a-804d-da621ee9a0d8" + }, + "ResponseBody": { + "error": { + "code": "TestRunNotFound", + "message": "Test run not found with given name \u0022adjwfjsdmf\u0022." + } + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json new file mode 100644 index 000000000000..9f52aeff3c8f --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json @@ -0,0 +1,287 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "60", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "548a67b3-03af-44fd-b6a5-e4d41f2b6c8b" + }, + "RequestBody": { + "testId": "abc", + "displayName": "sample123", + "virtualUsers": 10 + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1351", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 20 Jan 2023 15:00:58 GMT", + "mise-correlation-id": "c6ff30fc-b9aa-4130-8541-bd5fcaa7a7aa", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "cb210576-ed6a-4c2a-be09-48877405b07a" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:00:58.3602008", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-20T16:00:58.3601002", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:00:58.3602222", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcjad", + "displayName": "sample123", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-20T15:00:57.863Z", + "executedDateTime": "2023-01-20T15:00:56.656Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", + "createdDateTime": "2023-01-20T15:00:57.484Z", + "lastModifiedDateTime": "2023-01-20T15:00:58.35Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "b61f91a6-e75a-4857-880d-b34a72601656" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1351", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 20 Jan 2023 15:00:58 GMT", + "mise-correlation-id": "d047c6af-7fd4-4fa1-ac8f-dd365fe5002f", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6842738f-ced7-412b-af0a-48d0fc04bbb5" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:00:58.8308474", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-20T16:00:58.8307335", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:00:58.8308721", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcjad", + "displayName": "sample123", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-20T15:00:57.863Z", + "executedDateTime": "2023-01-20T15:00:56.656Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", + "createdDateTime": "2023-01-20T15:00:57.484Z", + "lastModifiedDateTime": "2023-01-20T15:00:58.35Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "440d2ec1-97aa-4f74-8b3d-53dfa17dc431" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1351", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 20 Jan 2023 15:01:01 GMT", + "mise-correlation-id": "7e48d714-9a72-4871-a129-9b79bcd278bb", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "79ac5085-f21a-4f4a-8aa1-11ce0fa2c293" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:01:01.3223506", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-20T16:01:01.3222505", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:01:01.3223736", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcjad", + "displayName": "sample123", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-20T15:00:57.863Z", + "executedDateTime": "2023-01-20T15:00:56.656Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", + "createdDateTime": "2023-01-20T15:00:57.484Z", + "lastModifiedDateTime": "2023-01-20T15:00:58.35Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "d67fbdb1-dd89-4117-b0fa-eaae02b26c56" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1351", + "Content-Type": "application/json; charset=utf-8", + "Date": "Fri, 20 Jan 2023 15:01:03 GMT", + "mise-correlation-id": "9ef8181b-a4b4-46e1-a2c5-d034fbb0edb6", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8ae51401-ec15-4150-80ba-c9b57e1b4ede" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:01:03.7936471", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-20T16:01:03.7935434", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-20T16:01:03.7936693", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcjad", + "displayName": "sample123", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-20T15:00:57.863Z", + "executedDateTime": "2023-01-20T15:00:56.656Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", + "createdDateTime": "2023-01-20T15:00:57.484Z", + "lastModifiedDateTime": "2023-01-20T15:00:58.35Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json index 7bdcd2fe88c8..413c89710cce 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "54fd4e27-3c1c-4363-87c6-8826eab6e109" + "x-ms-client-request-id": "7411fecd-6659-4a88-b04c-67f005d627ea" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:16 GMT", + "Date": "Fri, 20 Jan 2023 15:00:07 GMT", "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", - "mise-correlation-id": "e0f81b29-446d-4bc2-9515-510a26a42660", + "mise-correlation-id": "ca4e4ee9-c852-474b-abde-95f932567e6b", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "729733e7-76d0-4ab0-92c4-8b1ae5574191" + "x-ms-correlation-request-id": "81ee670d-fb08-43af-8ffa-aeaf3ac337b3" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:16.2307507", + "expireDateTime": "2023-01-20T15:10:07.2017306", "validationStatus": "VALIDATION_INITIATED" } }, @@ -44,7 +44,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "bb2cd85e-f669-44ab-9733-30a823e4e007" + "x-ms-client-request-id": "9abe26d0-b2a2-4859-851c-49c8673d05a6" }, "RequestBody": null, "StatusCode": 200, @@ -53,17 +53,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:16 GMT", - "mise-correlation-id": "edf9ae4c-c9e4-4b16-b17b-e93e9f2657e1", + "Date": "Fri, 20 Jan 2023 15:00:07 GMT", + "mise-correlation-id": "fe9b7b00-8c43-4274-9f84-1a4157575284", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4d2aa6a7-17c1-40ec-aa46-50e4604e2b1e" + "x-ms-correlation-request-id": "d243c887-1b96-41bd-88ca-4495cf215f21" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:16.6207888", + "expireDateTime": "2023-01-20T15:10:07.5723293", "validationStatus": "VALIDATION_INITIATED" } }, @@ -76,7 +76,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "f83af542-d500-4bca-8bc1-58bb3212b700" + "x-ms-client-request-id": "cc47b357-a5b4-4cf6-ae62-193b6983d68e" }, "RequestBody": null, "StatusCode": 200, @@ -85,17 +85,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:18 GMT", - "mise-correlation-id": "adde2724-7fbf-44f6-b8cc-ce9ed42aa7c5", + "Date": "Fri, 20 Jan 2023 15:00:10 GMT", + "mise-correlation-id": "98ec4afa-9b9d-45bd-8f85-a0884863ca05", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e64a8499-85d0-4a08-bf24-83c0df2d7fd6" + "x-ms-correlation-request-id": "65f503ab-9453-4464-aa2c-b77a7546fe10" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:18.9612267", + "expireDateTime": "2023-01-20T15:10:09.9945713", "validationStatus": "VALIDATION_INITIATED" } }, @@ -108,7 +108,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "40a3aa03-9998-47b6-8a3b-5218039a14ab" + "x-ms-client-request-id": "cab0c204-ed7b-43ed-ab21-27b04bc5af13" }, "RequestBody": null, "StatusCode": 200, @@ -117,17 +117,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:21 GMT", - "mise-correlation-id": "ca904261-0ce5-403b-b9af-8992fbb835f5", + "Date": "Fri, 20 Jan 2023 15:00:12 GMT", + "mise-correlation-id": "4a496adb-10a7-409b-9f33-762f7b66e3d3", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f3ccc602-181d-4945-b994-fc7e0dac22ca" + "x-ms-correlation-request-id": "a6799e4f-192d-4883-8de1-33bedbd9e55a" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:21.5032919", + "expireDateTime": "2023-01-20T15:10:12.4019024", "validationStatus": "VALIDATION_INITIATED" } }, @@ -140,7 +140,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "47826ef7-e5c8-465b-983d-801dfc54eb04" + "x-ms-client-request-id": "aa59c8b8-4d4b-4b64-95fe-28cfede4d477" }, "RequestBody": null, "StatusCode": 200, @@ -149,17 +149,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 19 Jan 2023 18:37:23 GMT", - "mise-correlation-id": "0c2b0dbe-fcb4-46d8-9cf2-c0fcffb48752", + "Date": "Fri, 20 Jan 2023 15:00:14 GMT", + "mise-correlation-id": "394705f9-00ab-422f-9a76-c10b90f6c689", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4a8d9c51-69c0-4e34-bf4c-4115a29c3dd4" + "x-ms-correlation-request-id": "1b0284dc-ef50-4670-9711-49286feec805" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-19T18:47:23.8819088", + "expireDateTime": "2023-01-20T15:10:14.8494452", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sampleWithInitialLROCall.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sampleWithInitialLROCall.ts new file mode 100644 index 000000000000..8265310acb10 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sampleWithInitialLROCall.ts @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics + * + * @summary creates and run a loadtest + * @azsdk-weight 10 + */ + +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import { AbortController } from "@azure/abort-controller"; +import { DefaultAzureCredential } from "@azure/identity"; +import { createReadStream } from "fs"; +import { v4 as uuidv4 } from "uuid"; +import { getFileValidationPoller } from "../src/getFileValidationPoller"; +import { getTestRunCompletionPoller } from "../src/getTestRunCompletionPoller"; + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating/Updating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult, testId); + const fileValidateResult = await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + + if (fileValidatePoller.getOperationState().status != "succeeded") + throw new Error( + "There is some issue in validation, please make sure uploaded file is a valid JMX." + + fileValidateResult.body.validationFailureDetails + ); + + console.log(fileUploadResult); + + // Creating/Updating app component + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } + + // Creating/Updating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + + if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; + if (testRunId) { + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + let metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + queryParameters: { + metricname: metricDefinition.name, + metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, + }, + }); + + console.log(metricsResult); + console.log(testRunResult); + + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } + + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md index d64f2764a500..3b1c14d03e66 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md @@ -11,10 +11,11 @@ urlFragment: load-testing-javascript-beta These sample programs show how to use the JavaScript client libraries for Azure Load Testing rest in some common scenarios. -| **File Name** | **Description** | -| ----------------------- | -------------------------------- | -| [sample.js][sample] | creates and run a loadtest | -| [stopTest.js][stoptest] | creates, run and stop a loadtest | +| **File Name** | **Description** | +| ------------------------------------------------------- | -------------------------------- | +| [sample.js][sample] | creates and run a loadtest | +| [sampleWithInitialLROCall.js][samplewithinitiallrocall] | creates and run a loadtest | +| [stopTest.js][stoptest] | creates, run and stop a loadtest | ## Prerequisites @@ -57,6 +58,7 @@ npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +[samplewithinitiallrocall]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js [apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing [freesub]: https://azure.microsoft.com/free/ diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index 6b8f3a25b61a..25d876e2a6bf 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -57,18 +57,16 @@ async function main() { contentType: "application/octet-stream", body: readStream, }); - const fileUploadResult = await fileUploadPoller.pollUntilDone({ + await fileUploadPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileUploadResult + fileUploadPoller.getOperationState().error ); - console.log(fileUploadResult); - // Creating/Updating app component const appComponentCreationResult = await client .path("/tests/{testId}/app-components", testId) @@ -107,13 +105,16 @@ async function main() { }); if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + throw new Error( + "There is some issue in running the test, Error Response : " + + testRunPoller.getOperationState().error + ); - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; + const testRunStarttime = testRunResult.body.startDateTime; + const testRunEndTime = testRunResult.body.endDateTime; if (testRunId) { // get list of all metric namespaces and pick the first one - let metricNamespaces = await client + const metricNamespaces = await client .path("/test-runs/{testRunId}/metric-namespaces", testRunId) .get(); @@ -121,14 +122,14 @@ async function main() { throw metricNamespaces.body.error; } - let metricNamespace = metricNamespaces.body.value[0]; + const metricNamespace = metricNamespaces.body.value[0]; if (metricNamespace.name === undefined) { throw "No Metric Namespace name is defined."; } // get list of all metric definitions and pick the first one - let metricDefinitions = await client + const metricDefinitions = await client .path("/test-runs/{testRunId}/metric-definitions", testRunId) .get({ queryParameters: { @@ -140,14 +141,14 @@ async function main() { throw metricDefinitions.body.error; } - let metricDefinition = metricDefinitions.body.value[0]; + const metricDefinition = metricDefinitions.body.value[0]; if (metricDefinition.name === undefined) { throw "No Metric Namespace name is defined."; } // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + const metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ queryParameters: { metricname: metricDefinition.name, metricNamespace: metricNamespace.name, @@ -159,14 +160,14 @@ async function main() { console.log(testRunResult); // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + const deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); if (isUnexpected(deleteTestRunResult)) { throw deleteTestRunResult.body.error; } // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + const deleteTestResult = await client.path("/tests/{testId}", testId).delete(); if (isUnexpected(deleteTestResult)) { throw deleteTestResult.body.error; diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js new file mode 100644 index 000000000000..f4e5eb363fe7 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** + * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics + * + * @summary creates and run a loadtest + */ + +const AzureLoadTesting = require("@azure-rest/load-testing").default, + { isUnexpected } = require("@azure-rest/load-testing"); +const { AbortController } = require("@azure/abort-controller"); +const { DefaultAzureCredential } = require("@azure/identity"); +const { createReadStream } = require("fs"); +const { v4: uuidv4 } = require("uuid"); +const { getFileValidationPoller } = require("../src/getFileValidationPoller"); +const { getTestRunCompletionPoller } = require("../src/getTestRunCompletionPoller"); + +const readStream = createReadStream("./sample.jmx"); + +async function main() { + const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; + const displayName = "some-load-test"; + const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; + const testId = uuidv4(); // ID to be assigned to a test + const testRunId = uuidv4(); // ID to be assigned to a testRun + + // Build a client through AAD + const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); + + // Creating/Updating a load test + const testCreationResult = await client.path("/tests/{testId}", testId).patch({ + contentType: "application/merge-patch+json", + body: { + displayName: displayName, + description: "", + loadTestConfiguration: { + engineInstances: 1, // number of engine instances to run test + }, + }, + }); + // Checking for error response + if (isUnexpected(testCreationResult)) { + throw testCreationResult.body.error; + } + + if (testCreationResult.body.testId === undefined) + throw new Error("Test ID returned as undefined."); + + // Uploading .jmx file to a test + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult, testId); + const fileValidateResult = await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + + if (fileValidatePoller.getOperationState().status != "succeeded") + throw new Error( + "There is some issue in validation, please make sure uploaded file is a valid JMX." + + fileValidateResult.body.validationFailureDetails + ); + + console.log(fileUploadResult); + + // Creating/Updating app component + const appComponentCreationResult = await client + .path("/tests/{testId}/app-components", testId) + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: testCreationResult.body.testId, + components: { + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": + { + resourceId: + "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", + resourceName: "App-Service-Sample-Demo", + resourceType: "Microsoft.Web/sites", + subscriptionId: SUBSCRIPTION_ID, + }, + }, + }, + }); + + if (isUnexpected(appComponentCreationResult)) { + throw appComponentCreationResult.body.error; + } + + // Creating/Updating the test run + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ + contentType: "application/merge-patch+json", + body: { + testId: testId, + displayName: displayName, + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + + if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; + if (testRunId) { + // get list of all metric namespaces and pick the first one + let metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunId) + .get(); + + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } + + let metricNamespace = metricNamespaces.body.value[0]; + + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // get list of all metric definitions and pick the first one + let metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + let metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } + + // fetch client metrics using metric namespace and metric name + let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + queryParameters: { + metricname: metricDefinition.name, + metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, + }, + }); + + console.log(metricsResult); + console.log(testRunResult); + + // Deleting test run + let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + + if (isUnexpected(deleteTestRunResult)) { + throw deleteTestRunResult.body.error; + } + + // Deleting test + let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + + if (isUnexpected(deleteTestResult)) { + throw deleteTestResult.body.error; + } + } +} + +main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md index 5bbf0b6fecda..a3fe5dee2c57 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md @@ -11,10 +11,11 @@ urlFragment: load-testing-typescript-beta These sample programs show how to use the TypeScript client libraries for Azure Load Testing rest in some common scenarios. -| **File Name** | **Description** | -| ----------------------- | -------------------------------- | -| [sample.ts][sample] | creates and run a loadtest | -| [stopTest.ts][stoptest] | creates, run and stop a loadtest | +| **File Name** | **Description** | +| ------------------------------------------------------- | -------------------------------- | +| [sample.ts][sample] | creates and run a loadtest | +| [sampleWithInitialLROCall.ts][samplewithinitiallrocall] | creates and run a loadtest | +| [stopTest.ts][stoptest] | creates, run and stop a loadtest | ## Prerequisites @@ -69,6 +70,7 @@ npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +[samplewithinitiallrocall]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts [apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing [freesub]: https://azure.microsoft.com/free/ diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index 39c2c5a39132..34e81eab7452 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -56,18 +56,16 @@ async function main() { contentType: "application/octet-stream", body: readStream, }); - const fileUploadResult = await fileUploadPoller.pollUntilDone({ + await fileUploadPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileUploadResult + fileUploadPoller.getOperationState().error ); - console.log(fileUploadResult); - // Creating/Updating app component const appComponentCreationResult = await client .path("/tests/{testId}/app-components", testId) @@ -105,13 +103,16 @@ async function main() { }); if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + throw new Error( + "There is some issue in running the test, Error Response : " + + testRunPoller.getOperationState().error + ); - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; + const testRunStarttime = testRunResult.body.startDateTime; + const testRunEndTime = testRunResult.body.endDateTime; if (testRunId) { // get list of all metric namespaces and pick the first one - let metricNamespaces = await client + const metricNamespaces = await client .path("/test-runs/{testRunId}/metric-namespaces", testRunId) .get(); @@ -119,14 +120,14 @@ async function main() { throw metricNamespaces.body.error; } - let metricNamespace = metricNamespaces.body.value[0]; + const metricNamespace = metricNamespaces.body.value[0]; if (metricNamespace.name === undefined) { throw "No Metric Namespace name is defined."; } // get list of all metric definitions and pick the first one - let metricDefinitions = await client + const metricDefinitions = await client .path("/test-runs/{testRunId}/metric-definitions", testRunId) .get({ queryParameters: { @@ -138,14 +139,14 @@ async function main() { throw metricDefinitions.body.error; } - let metricDefinition = metricDefinitions.body.value[0]; + const metricDefinition = metricDefinitions.body.value[0]; if (metricDefinition.name === undefined) { throw "No Metric Namespace name is defined."; } // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ + const metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ queryParameters: { metricname: metricDefinition.name, metricNamespace: metricNamespace.name, @@ -157,14 +158,14 @@ async function main() { console.log(testRunResult); // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); + const deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); if (isUnexpected(deleteTestRunResult)) { throw deleteTestRunResult.body.error; } // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); + const deleteTestResult = await client.path("/tests/{testId}", testId).delete(); if (isUnexpected(deleteTestResult)) { throw deleteTestResult.body.error; diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts similarity index 99% rename from sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts rename to sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts index 48a99dc5f218..2a8d6c9171e2 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample1.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts @@ -5,7 +5,6 @@ * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics * * @summary creates and run a loadtest - * @azsdk-weight 10 */ import AzureLoadTesting, { diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts index 5a7f123391e7..da6a87a08f01 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts @@ -39,10 +39,10 @@ export async function getFileValidationPoller( const poller: SimplePollerLike, TestGetFile200Response> = { async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { if (_options?.abortSignal?.aborted) { - state.status = "failed"; - state.error = new Error("The operation was aborted."); - return; - } + state.status = "canceled"; + state.error = new Error("The operation was aborted."); + return; + } if (fileName) { let fileValidationResponse = await client @@ -93,7 +93,11 @@ export async function getFileValidationPoller( while (!poller.isDone()) { const delay = sleep(currentPollIntervalInMs, abortSignal); cancelJob = () => abortController.abort(); - await delay; + try { + await delay; + } catch (ex: any) { + state.status = "canceled"; + } await poller.poll({ abortSignal }); } } diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts index ba34f698c90b..8f9f5b26377e 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts @@ -41,12 +41,11 @@ export async function getTestRunCompletionPoller( const poller: SimplePollerLike, TestRunGet200Response> = { async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { - if (_options?.abortSignal?.aborted) { - state.status = "failed"; - state.error = new Error("The operation was aborted."); - return; - } + state.status = "canceled"; + state.error = new Error("The operation was aborted."); + return; + } if (testRunId) { let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); @@ -88,7 +87,11 @@ export async function getTestRunCompletionPoller( while (!poller.isDone()) { const delay = sleep(currentPollIntervalInMs, abortSignal); cancelJob = () => abortController.abort(); - await delay; + try { + await delay; + } catch (ex: any) { + state.status = "canceled"; + } await poller.poll({ abortSignal }); } } diff --git a/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts b/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts index c03d70125d3b..fe3dbd2a2873 100644 --- a/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts +++ b/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts @@ -3,7 +3,7 @@ import { AbortSignalLike } from "@azure/abort-controller"; import { TestRunOutput } from "../outputModels"; -const REJECTED_ERR = new Error("The operation has been aborted"); +const REJECTED_ERR = new Error("The operation was aborted."); export function sleep(ms: number, signal: AbortSignalLike): Promise { return new Promise((resolve, reject) => { diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts index f2872cd01ccf..0633eea38e18 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts @@ -5,7 +5,12 @@ import { assert } from "chai"; import { createClient, createRecorder } from "./utils/recordedClient"; import { Context } from "mocha"; import { AbortController } from "@azure/abort-controller"; -import { AzureLoadTestingClient, beginUploadTestFile } from "../../src"; +import { + AzureLoadTestingClient, + beginUploadTestFile, + getFileValidationPoller, + isUnexpected, +} from "../../src"; import { env, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; import * as fs from "fs"; import { isNode } from "@azure/core-util"; @@ -73,7 +78,26 @@ describe("Test Creation", () => { abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - assert.equal("VALIDATION_SUCCESS", fileUploadResult.body.validationStatus); + assert.equal(fileUploadResult.body.validationStatus, "VALIDATION_SUCCESS"); + }); + + it("should fail to upload the test file with LRO(404)", async () => { + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStreamTestFile, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult, "abcd"); + await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + assert.equal(fileValidatePoller.getOperationState().status, "failed"); }); it("should create the app components", async () => { diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts index b2d8be069f0c..d6736d939f37 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts @@ -7,7 +7,13 @@ import { createRecorder, createClient } from "./utils/recordedClient"; import { AbortController } from "@azure/abort-controller"; import { Context } from "mocha"; import * as fs from "fs"; -import { AzureLoadTestingClient, beginCreateOrUpdateTestRun, beginUploadTestFile } from "../../src"; +import { + AzureLoadTestingClient, + beginCreateOrUpdateTestRun, + beginUploadTestFile, + getTestRunCompletionPoller, + isUnexpected, +} from "../../src"; import { isNode } from "@azure/core-util"; describe("Test Run Creation", () => { @@ -75,6 +81,51 @@ describe("Test Run Creation", () => { assert.equal("DONE", testRunResult.body.status); }); + it("should not be able to create a test run(404)", async () => { + const testRunCreationResult = await client.path("/test-runs/{testRunId}", "abcjad").patch({ + contentType: "application/merge-patch+json", + body: { + testId: "abc", + displayName: "sample123", + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + testRunCreationResult.body.testRunId = "adjwfjsdmf"; + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + + assert.equal(testRunPoller.getOperationState().status, "failed"); + }); + + it("should timeout the test run", async () => { + const testRunCreationResult = await client.path("/test-runs/{testRunId}", "abcjad").patch({ + contentType: "application/merge-patch+json", + body: { + testId: "abc", + displayName: "sample123", + virtualUsers: 10, + }, + }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(5000), // timeout of 5 seconds + }); + + assert.equal("The operation was aborted.", testRunPoller.getOperationState().error?.message); + }); + it("should get a test run", async () => { const result = await client.path("/test-runs/{testRunId}", "abcde").get(); From 6b0d9de47cd5e2986465f6058b45729a365937cf Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Mon, 23 Jan 2023 16:44:47 +0530 Subject: [PATCH 45/60] Removed Begin Methods and added new recordings for tests --- .../load-testing-rest/package.json | 2 +- ...ould_upload_the_test_file_with_lro404.json | 4 + ...g_should_be_able_to_create_a_test_run.json | 4 + .../recording_should_create_a_loadtest.json | 16 +- ...ding_should_create_the_app_components.json | 12 +- .../recording_should_delete_the_test.json | 8 +- ...recording_should_delete_the_test_file.json | 8 +- ...l_to_upload_the_test_file_with_lro404.json | 131 +- .../recording_should_get_the_test.json | 20 +- ...ng_should_get_the_test_app_components.json | 12 +- .../recording_should_get_the_test_file.json | 14 +- ...pload_the_additional_file_without_lro.json | 12 +- ...ould_upload_the_test_file_with_lro404.json | 168 +++ ...g_should_be_able_to_create_a_test_run.json | 1193 +++++++++++++++++ ...d_create_a_app_component_for_test_run.json | 12 +- .../recording_should_create_a_loadtest.json | 12 +- .../recording_should_delete_a_test_run.json | 8 +- ...l_to_upload_the_test_file_with_lro404.json | 168 +++ .../recording_should_get_a_test_run.json | 37 +- ..._should_get_a_test_run_app_components.json | 12 +- ..._get_a_test_run_server_metrics_config.json | 12 +- ...d_not_be_able_to_create_a_test_run404.json | 24 +- ...recording_should_timeout_the_test_run.json | 94 +- ..._should_upload_the_test_file_with_lro.json | 52 +- .../review/load-testing.api.md | 16 +- .../load-testing-rest/samples-dev/sample.ts | 53 +- .../samples-dev/sampleWithInitialLROCall.ts | 188 --- .../samples/v1-beta/javascript/README.md | 12 +- .../samples/v1-beta/javascript/sample.js | 53 +- .../javascript/sampleWithInitialLROCall.js | 189 --- .../samples/v1-beta/typescript/README.md | 12 +- .../samples/v1-beta/typescript/src/sample.ts | 53 +- .../src/sampleWithInitialLROCall.ts | 189 --- .../samples/v1-beta/typescript/tsconfig.json | 2 +- .../src/beginCreateOrUpdateTestRun.ts | 34 - .../src/beginUploadTestFile.ts | 31 - .../src/getFileValidationPoller.ts | 7 +- .../load-testing-rest/src/index.ts | 2 - .../test/public/testAdministration.spec.ts | 28 +- .../test/public/testRun.spec.ts | 62 +- 40 files changed, 1988 insertions(+), 978 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file_with_lro404.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_be_able_to_create_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro404.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json delete mode 100644 sdk/loadtestservice/load-testing-rest/samples-dev/sampleWithInitialLROCall.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js delete mode 100644 sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts delete mode 100644 sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index beeb5a5bc8d3..612e805c1aba 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -76,7 +76,7 @@ "@azure/core-rest-pipeline": "^1.8.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0", - "@azure/core-lro": "~2.4.1", + "@azure/core-lro": "^2.4.1", "@azure/core-util": "~1.1.2", "@azure/abort-controller": "~1.1.1" }, diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file_with_lro404.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file_with_lro404.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_upload_the_test_file_with_lro404.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_be_able_to_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_be_able_to_create_a_test_run.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_be_able_to_create_a_test_run.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json index 277b426f9e3c..ef0c3612a2ee 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cc05ae2f-dfa8-47b8-acd2-05ff29af966c" + "x-ms-client-request-id": "01e4eada-6f48-4252-9efb-c195092a191e" }, "RequestBody": { "displayName": "sample_test", @@ -25,13 +25,13 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "476", + "Content-Length": "477", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 14:59:49 GMT", - "mise-correlation-id": "7d5ae247-1ff4-4460-ae95-b5dbe2e9ea22", + "Date": "Sun, 22 Jan 2023 10:00:32 GMT", + "mise-correlation-id": "5a0e9082-e410-481e-b3b1-7e03e74e4aab", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "20fa6fb4-7de7-4de5-8400-959ec8b260ce" + "x-ms-correlation-request-id": "39750596-4386-44f1-845d-81dd9976427e" }, "ResponseBody": { "loadTestConfiguration": { @@ -44,7 +44,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:59:49.6222984", + "expireDateTime": "2023-01-22T11:00:32.2671785", "validationStatus": "VALIDATION_SUCCESS" }, "additionalFileInfo": [] @@ -52,8 +52,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-20T14:56:50.37Z", - "lastModifiedDateTime": "2023-01-20T14:59:49.616Z" + "createdDateTime": "2023-01-22T09:57:27.647Z", + "lastModifiedDateTime": "2023-01-22T10:00:32.259Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json index 8efcf7a5e445..fcdbaeed1977 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json @@ -11,7 +11,7 @@ "Content-Length": "427", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "fddded41-12d9-44c3-bf5d-1bed5dbd034e" + "x-ms-client-request-id": "9cd7e1ff-3128-45e5-b9a2-d47cc544c1d3" }, "RequestBody": { "testId": "abc", @@ -30,12 +30,12 @@ "Connection": "keep-alive", "Content-Length": "563", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:00 GMT", + "Date": "Sun, 22 Jan 2023 10:00:43 GMT", "Location": "https://endpoint/tests/abc/app-components?api-version=2022-11-01", - "mise-correlation-id": "0f3068a3-b0bb-45f8-a53c-b873c672119f", + "mise-correlation-id": "0fcdc4e2-ff16-4d38-9f8d-436b5184c377", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b494ef35-a484-4a95-a909-931a0d8d0c1e" + "x-ms-correlation-request-id": "35e0be98-806c-4be2-bbff-d60e3ff35ea3" }, "ResponseBody": { "components": { @@ -48,8 +48,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-20T15:00:00.663Z", - "lastModifiedDateTime": "2023-01-20T15:00:00.663Z" + "createdDateTime": "2023-01-22T10:00:43.423Z", + "lastModifiedDateTime": "2023-01-22T10:00:43.423Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json index 4df129268919..a1dc6d331fc6 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "062219b2-d544-49dc-b2e9-38348630105a" + "x-ms-client-request-id": "43474440-dc2f-4850-96a8-cecbaedff892" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Fri, 20 Jan 2023 15:00:04 GMT", - "mise-correlation-id": "cb3e5980-9c13-4ada-9226-6501267a2012", + "Date": "Sun, 22 Jan 2023 10:00:46 GMT", + "mise-correlation-id": "21dd9d93-a5e5-4b4f-8585-13b1addd651f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f5380b7c-494f-4abc-bf05-b58e60980838" + "x-ms-correlation-request-id": "5b498695-2364-4ac3-8397-c4d47495daa7" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json index 9f76079742ec..b32430b29d6e 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "788b8c66-14ab-44c4-9725-5b46c1a7a905" + "x-ms-client-request-id": "01528f23-26f6-4c7a-845d-998ea03da518" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Fri, 20 Jan 2023 15:00:04 GMT", - "mise-correlation-id": "c54e7757-559d-4db2-a706-a3ae05035d15", + "Date": "Sun, 22 Jan 2023 10:00:45 GMT", + "mise-correlation-id": "56a3d7b0-77aa-49a6-ac6b-a7c3851934e5", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e4992a03-5005-461b-98e6-a202df748350" + "x-ms-correlation-request-id": "285fa474-d836-4e53-8d35-e85576223f09" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json index 981e31b5b8ec..6212f8faff7d 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json @@ -11,32 +11,64 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c037a2e1-5ef4-410d-878a-010223f51337" + "x-ms-client-request-id": "e6eff9dc-ab02-46a9-8103-8016cd312095" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "167", + "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 14:59:59 GMT", + "Date": "Sun, 22 Jan 2023 09:53:14 GMT", "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", - "mise-correlation-id": "1ebce1a9-e7ba-4fe3-869b-e736494ef9dc", + "mise-correlation-id": "eaf9c2b0-8530-439d-8cd7-39eb701b8e34", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "6cac6b2e-00d9-4024-bcfe-4d59d4885ad6" + "x-ms-correlation-request-id": "d8652c0c-3f28-4017-9753-16512fe8ba0c" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:09:59.791812", + "expireDateTime": "2023-01-22T10:03:14.1107847", "validationStatus": "VALIDATION_INITIATED" } }, { - "RequestUri": "https://endpoint/tests/abcd/files/sample.jmx?api-version=2022-11-01", + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "f719d22e-de9a-4bfc-b1d0-1c81104a2240" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 09:53:14 GMT", + "mise-correlation-id": "c6841fa6-f103-4b8a-8226-a81da2831c3b", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c2ec7e5e-19ed-44bc-a6ab-fe5083aa5053" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:14.6172131", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -44,26 +76,91 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "033d0595-0152-40d4-a3fa-02c7ee5eee9f" + "x-ms-client-request-id": "fa6dcc13-da74-434e-91d3-cce79a480541" }, "RequestBody": null, - "StatusCode": 404, + "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "86", + "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:00 GMT", - "mise-correlation-id": "0d851165-2e84-4327-932d-a4aef133c211", + "Date": "Sun, 22 Jan 2023 09:53:17 GMT", + "mise-correlation-id": "d5485797-2601-4368-b8b2-9923a99cdc6d", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "078996da-d7b0-4156-91c2-7635fb368f6c" + "x-ms-correlation-request-id": "6e352aee-6ef6-4897-abd0-322e4691bf61" }, "ResponseBody": { - "error": { - "code": "TestNotFound", - "message": "Test not found with given name \u0022abcd\u0022." - } + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:17.1446559", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "a9c0e909-909c-4a36-8cf9-8bd12c7fe085" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 09:53:19 GMT", + "mise-correlation-id": "1935e7ed-b265-4711-b9d1-ac73010e1626", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "56a5f27c-8c5a-459d-b082-3bdc23559f6b" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:19.6916599", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "485aa32a-e647-4fa8-8e66-a25024d9d753" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "166", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 09:53:22 GMT", + "mise-correlation-id": "6b1f0f3a-8d39-4896-be70-5c833e0bdd81", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "765b0c20-03e4-44f5-a56d-531b5ec1f2c3" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:22.1201763", + "validationStatus": "VALIDATION_SUCCESS" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json index cd32fa291cc0..0212c22e4179 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "425f9981-6963-434f-ba7d-2cbbf7192986" + "x-ms-client-request-id": "8549cd73-3897-4b22-ac5a-a6936187a0a2" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "670", + "Content-Length": "669", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:01 GMT", - "mise-correlation-id": "32e58b56-cc0e-484d-aebb-89e2f6740550", + "Date": "Sun, 22 Jan 2023 10:00:44 GMT", + "mise-correlation-id": "78f77574-0c54-4128-abe9-eb28e902744b", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f9b06bec-2707-440f-9557-7c6b40a2f8b8" + "x-ms-correlation-request-id": "340ae641-ef4a-439b-871c-3b7c39b65252" }, "ResponseBody": { "loadTestConfiguration": { @@ -35,15 +35,15 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T16:00:01.8364671", - "validationStatus": "VALIDATION_INITIATED" + "expireDateTime": "2023-01-22T11:00:44.4351745", + "validationStatus": "VALIDATION_SUCCESS" }, "additionalFileInfo": [ { "url": "https://storageurl.com/", "fileName": "additional-data.csv", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:00:01.8366073", + "expireDateTime": "2023-01-22T11:00:44.4352771", "validationStatus": "VALIDATION_NOT_REQUIRED" } ] @@ -51,8 +51,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-20T14:56:50.37Z", - "lastModifiedDateTime": "2023-01-20T15:00:00.712Z" + "createdDateTime": "2023-01-22T09:57:27.647Z", + "lastModifiedDateTime": "2023-01-22T10:00:43.513Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json index ae496e7bc988..aaacb18a5b1b 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "567e83ec-5956-4a5c-a624-4a1b220d66e6" + "x-ms-client-request-id": "ea8d2155-0d13-421f-9f10-561e96a732a5" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "563", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:02 GMT", - "mise-correlation-id": "4216a39b-83cf-45bf-8bdb-5df9f0b22278", + "Date": "Sun, 22 Jan 2023 10:00:45 GMT", + "mise-correlation-id": "d7d57624-f4fb-477c-ab1e-d74ca67d3fe1", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "09e25e61-c232-4c33-abf8-4a40fd05e07a" + "x-ms-correlation-request-id": "fac14121-a0f3-4fd5-8647-7503311b925b" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-20T15:00:00.663Z", - "lastModifiedDateTime": "2023-01-20T15:00:00.663Z" + "createdDateTime": "2023-01-22T10:00:43.423Z", + "lastModifiedDateTime": "2023-01-22T10:00:43.423Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json index 4f7ed4d04cf7..5955c29999d3 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json @@ -9,27 +9,27 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a2726c60-1c96-465a-9c78-2340d5ea9dc6" + "x-ms-client-request-id": "2441cd00-3d1d-4f10-b0ee-0d3a8b994482" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "168", + "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:01 GMT", - "mise-correlation-id": "e768fc9d-1392-46c5-9cfc-237d39ee528c", + "Date": "Sun, 22 Jan 2023 10:00:43 GMT", + "mise-correlation-id": "0fe042b6-21a9-434b-bae0-e0b0fd150b7d", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "05570931-ad0a-427e-ba9c-5365fb5a88ff" + "x-ms-correlation-request-id": "d274580d-f269-4e1c-b489-c382f6d73a64" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:10:01.2144175", - "validationStatus": "VALIDATION_INITIATED" + "expireDateTime": "2023-01-22T10:10:43.9695788", + "validationStatus": "VALIDATION_SUCCESS" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json index 3e128a60b3f5..3e5ff8c2429c 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json @@ -11,27 +11,27 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "812580b7-8645-432b-b3ff-d19c7aaab8d5" + "x-ms-client-request-id": "9bbaff0f-6538-473d-bfdc-bd954d71bfe4" }, - "RequestBody": "YSxiLGMsZA0KMSwyLDMsNA0K", + "RequestBody": "YSxiLGMsZAoxLDIsMyw0Cg==", "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", "Content-Length": "192", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 14:59:50 GMT", + "Date": "Sun, 22 Jan 2023 10:00:32 GMT", "Location": "https://endpoint/tests/abc/files/additional-data.csv?api-version=2022-11-01", - "mise-correlation-id": "32cd65f2-1d30-4e80-a7ec-a0e583903d07", + "mise-correlation-id": "2bd64d80-5ae3-469c-b281-b2fc88436abb", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4dddb0c1-6341-49e0-9d25-b1a2a0a587d1" + "x-ms-correlation-request-id": "937c7fd5-9ad2-47a6-99a7-96723752d39d" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "additional-data.csv", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T15:09:50.2677029", + "expireDateTime": "2023-01-22T10:10:32.8630917", "validationStatus": "VALIDATION_NOT_REQUIRED" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro404.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro404.json new file mode 100644 index 000000000000..c15b41b731c7 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro404.json @@ -0,0 +1,168 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "application/octet-stream", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "b3745c43-373b-41d9-acef-87622ed9087f" + }, + "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:00:33 GMT", + "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "mise-correlation-id": "6c431433-b132-4186-90db-7c7ef760534f", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3d6d1e4e-b172-4243-85c1-14e21827af5e" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:10:33.4613786", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "1d085764-8fc3-4687-bed8-b0abb0af2597" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:00:33 GMT", + "mise-correlation-id": "ddcf1025-fd2d-4fbd-b6e0-4e7597648b44", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "144fed57-2348-4059-a558-04350e6959c9" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:10:33.8438336", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "fd80b4f5-6c7a-4994-8bc4-4c27d05dee36" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:00:36 GMT", + "mise-correlation-id": "7c45260b-cfd1-4f18-a19e-200d97ae2e44", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "04154ade-2236-45e5-b8c3-2ec1d2f1bfc0" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:10:36.3610667", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "016e1e7a-6973-4b73-91b0-faad781ea2e1" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:00:38 GMT", + "mise-correlation-id": "733da4bf-4063-440d-b8cd-377845b65e01", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "29c11c88-13ff-4703-a0b2-fd0d9a4b5c14" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:10:38.7931104", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "b3298d44-007f-4178-8892-16b946e30197" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "166", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:00:42 GMT", + "mise-correlation-id": "5b3ceb51-2e69-4016-a8c8-14f2ce96b379", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "42d77cb1-3e8c-404a-b124-0b73f6360352" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:10:42.9361962", + "validationStatus": "VALIDATION_SUCCESS" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json new file mode 100644 index 000000000000..6e5222d86fee --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json @@ -0,0 +1,1193 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Length": "60", + "Content-Type": "application/merge-patch\u002Bjson", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "23e1c79f-38b8-44a2-b718-70c51281e34e" + }, + "RequestBody": { + "testId": "abc", + "displayName": "sample123", + "virtualUsers": 10 + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1286", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:06 GMT", + "Location": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "mise-correlation-id": "045a4d3a-1a2d-41eb-8487-8770d8d36198", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "b0593e91-1bfc-4d55-8044-a6a855b15fe8" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "0001-01-01T00:00:00", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:05.767674", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "0001-01-01T00:00:00", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "ACCEPTED", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:06.635Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "392142cc-96fa-4519-a512-c1b76ea8b0ca" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1350", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:07 GMT", + "mise-correlation-id": "0e53494e-bbd8-4582-9e14-ce49d3aec947", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "cc832390-ae8f-443d-b7ca-511f17511e9c" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:07.0881538", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:07.0880522", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:07.0881768", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:07.011Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "0d696f2e-a2aa-463a-a92c-2ac888e4f1a8" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1349", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:09 GMT", + "mise-correlation-id": "b4a1086c-352b-4344-870b-89b7a3901663", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "aae4ce28-52e6-40d8-a2fc-41163ef9b306" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:09.4524648", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:09.452364", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:09.4524868", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:07.011Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "66a4c540-7d6f-4d0a-9ed1-95e6ff3a9501" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1350", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:11 GMT", + "mise-correlation-id": "f857396b-589a-4260-86dc-55bc9e38354b", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c7fc6a2b-76d2-43bf-8abf-30790446d7d8" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:11.8733009", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:11.8729907", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:11.8733365", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "PROVISIONING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:07.011Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "6ba0d21c-6057-4738-a145-d2de8e881b17" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1349", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:14 GMT", + "mise-correlation-id": "860d5710-e0f4-45cb-8564-1257b6955f51", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "eb686028-42bb-4b3e-9bf1-7619a8ed8b9f" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:14.2991423", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:14.2990404", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:14.2991648", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "PROVISIONED", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:14.262Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "ef3b9715-36ba-4b66-ad5d-69a99832ef0a" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1348", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:16 GMT", + "mise-correlation-id": "835de479-1388-49c8-a831-4bb554e00065", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "28859ac3-d8d4-4b73-832f-379f5bc7a5e9" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:16.6900415", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:16.689891", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:16.6900854", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "CONFIGURING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:14.408Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "df873236-d7b9-4e5e-b2b2-d1dd2de5e63e" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1349", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:19 GMT", + "mise-correlation-id": "ffdb055d-3fe8-4001-9c84-cd6c7e194874", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "55c19928-5ac2-4f8d-9b87-3fe407921ea0" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:19.0903406", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:19.0901416", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:19.0903752", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "CONFIGURING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:14.408Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "860c6153-c689-4907-8f4c-ffcd970ddd23" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1349", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:21 GMT", + "mise-correlation-id": "4d727762-3fd4-4791-84ec-0c0a269ea954", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d67f5ec6-3080-44d4-8474-5324e5720b91" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:21.4426689", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:21.4425481", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:21.4427016", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "CONFIGURING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:14.408Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "ffa1bf69-77a6-41d5-998e-ea216f28cba2" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:23 GMT", + "mise-correlation-id": "6300610d-4ecc-4080-80d3-69292a588bef", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a8d61f58-884e-4dda-b730-4a8a09276b2f" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:23.8474231", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:23.8473122", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:23.8474467", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "9cf807c3-118f-4581-9689-9f293ed690bb" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:26 GMT", + "mise-correlation-id": "12ffc7d3-7eef-404b-a012-0a7f6cdddfa1", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "4ac79038-d7af-472f-982d-93cccff77ac5" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:26.2184591", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:26.2183611", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:26.2184811", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "f583ee6a-f942-4943-a3ff-dc5a88ce2805" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:28 GMT", + "mise-correlation-id": "8655eb88-a584-4de7-8edf-411d87c90fc9", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "6bf28b29-c2f7-4393-8a91-cb2643b95663" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:28.6367686", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:28.636654", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:28.6367912", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "d0f2d47d-c831-4e0e-964b-16cbcec244ae" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:31 GMT", + "mise-correlation-id": "6cc26436-df5c-47cf-9a6a-03d0f8e2a15c", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2974cf27-928f-43d6-a8a6-cfffdbd980d3" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:31.0265722", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:31.0264729", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:31.0265941", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "e4133205-638b-4ae4-8efd-74befd2b54d7" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1346", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:33 GMT", + "mise-correlation-id": "3138c0f4-2ceb-4e00-bf13-85ea2578b40e", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5bcf8cda-2602-4157-a09f-6478d3215c45" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:33.5889301", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:33.5888293", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:33.588953", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "b7e630bd-c8c0-4d59-ba0e-647b762dd535" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:35 GMT", + "mise-correlation-id": "8c20c5a1-ccf3-40f8-bb95-eb3f6ee9cac7", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "f4b98803-9370-4db4-90eb-56530f94fa0f" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:35.9476599", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:35.9475618", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:35.9476812", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "32958a2e-05a1-422b-9b7e-faa6ec3af395" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:38 GMT", + "mise-correlation-id": "59f5e5cb-2788-419b-acc2-71b5e77a2f75", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "eeb5cc30-ff6b-49e5-a04e-d01d5e4ec8c1" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:38.3666375", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:38.3665348", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:38.3666606", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "9abbbee5-67cb-4459-ad9c-137e4aa9b7da" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1347", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:40 GMT", + "mise-correlation-id": "7e6c0a84-b387-4890-8847-789b1a0ec25d", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "fa92d9f8-82b8-43ab-9c46-0164f3e1fee5" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:40.7281199", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:40.7280165", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:40.7281407", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": {} + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "EXECUTING", + "startDateTime": "2023-01-22T10:01:06.757Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + } + }, + { + "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "a2dc0eed-d1ba-4a0a-8afb-96c5f0754404" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "1578", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 10:01:43 GMT", + "mise-correlation-id": "564ae078-222a-4842-a2ed-e48e517406dc", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a01c803f-7a55-4ffe-bac1-9fc836ecab06" + }, + "ResponseBody": { + "loadTestConfiguration": { + "engineInstances": 1, + "splitAllCSVs": false, + "quickStartTest": false + }, + "testArtifacts": { + "inputArtifacts": { + "configFileInfo": { + "url": "https://storageurl.com/", + "fileName": "config.yaml", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:43.1428887", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "testScriptFileInfo": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T11:01:43.1427496", + "validationStatus": "VALIDATION_SUCCESS" + }, + "inputArtifactsZipFileInfo": { + "url": "https://storageurl.com/", + "fileName": "inputartifacts.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:43.142918", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "additionalFileInfo": [] + }, + "outputArtifacts": { + "logsFileInfo": { + "url": "https://storageurl.com/", + "fileName": "logs.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-22T11:01:43.1429467", + "validationStatus": "VALIDATION_NOT_REQUIRED" + } + } + }, + "testResult": "NOT_APPLICABLE", + "testRunId": "abcde", + "displayName": "sample123", + "testId": "abc", + "status": "DONE", + "startDateTime": "2023-01-22T10:01:06.757Z", + "endDateTime": "2023-01-22T10:01:42.603Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:43.025Z" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json index 19ca645896f9..96e4f03662ee 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "412", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "90cad167-466d-4bdf-bda6-e5f24b37622e" + "x-ms-client-request-id": "6d128832-b89d-4471-a8ee-7612cb61160f" }, "RequestBody": { "components": { @@ -29,12 +29,12 @@ "Connection": "keep-alive", "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:01:04 GMT", + "Date": "Sun, 22 Jan 2023 10:01:44 GMT", "Location": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", - "mise-correlation-id": "a9e98021-9a0c-482c-bb66-19fee2327280", + "mise-correlation-id": "adaa4df2-f0bf-4ccf-b8d2-cceaea3d1dbd", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "69c671ad-9c64-474e-bbe6-8d34b1f191f0" + "x-ms-correlation-request-id": "9a974977-7d4e-4b48-ab1f-cac1d3ab00d4" }, "ResponseBody": { "components": { @@ -47,8 +47,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-20T15:01:04.733Z", - "lastModifiedDateTime": "2023-01-20T15:01:04.733Z" + "createdDateTime": "2023-01-22T10:01:44.094Z", + "lastModifiedDateTime": "2023-01-22T10:01:44.094Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json index 11b44a2c9466..bcb0d3632a7f 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "de2b9733-5822-496d-b0b5-8591a63ddcc6" + "x-ms-client-request-id": "1304aa2f-3aba-4851-adb8-95ec8a373d63" }, "RequestBody": { "displayName": "sample_test", @@ -27,12 +27,12 @@ "Connection": "keep-alive", "Content-Length": "289", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:05 GMT", + "Date": "Sun, 22 Jan 2023 10:00:47 GMT", "Location": "https://endpoint/tests/abc?api-version=2022-11-01", - "mise-correlation-id": "5a553cf6-7ee6-4701-94eb-61442036a76e", + "mise-correlation-id": "86ae97e6-d91c-4d1a-b4b2-523ff32f7aeb", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a3a05a6f-9ac5-42be-bf8f-94c87b49f6f2" + "x-ms-correlation-request-id": "66a946a5-15a6-4cc7-a8cd-f79bfd550d0b" }, "ResponseBody": { "loadTestConfiguration": { @@ -46,8 +46,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-20T15:00:05.811Z", - "lastModifiedDateTime": "2023-01-20T15:00:05.811Z" + "createdDateTime": "2023-01-22T10:00:47.373Z", + "lastModifiedDateTime": "2023-01-22T10:00:47.373Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json index 0675bb4cccf9..c5e20c54bc00 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "440a9b3f-f8f2-49c2-aa5b-6d3bed86dcfc" + "x-ms-client-request-id": "bd8bc4dd-64bf-4590-8d09-86fc2aee3715" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Fri, 20 Jan 2023 15:01:06 GMT", - "mise-correlation-id": "5b484149-d061-4d89-a479-13811017e590", + "Date": "Sun, 22 Jan 2023 10:01:45 GMT", + "mise-correlation-id": "ce9a827c-b156-4d91-8b26-acbe905c67b3", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a8a205bf-03f6-49e1-a81a-c17110ea69fb" + "x-ms-correlation-request-id": "6e03fb1c-0f28-40a0-b2a2-3b96c3c8fe38" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json new file mode 100644 index 000000000000..a5c734a2a414 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_fail_to_upload_the_test_file_with_lro404.json @@ -0,0 +1,168 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "application/octet-stream", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "a611e865-a44f-40f8-bbe7-35f3b5f4289d" + }, + "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 09:53:27 GMT", + "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "mise-correlation-id": "76be3264-4987-487e-9e2f-917a23354be5", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "d21ecbe2-af00-4d4f-acb3-65fad88abbc9" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:27.8766314", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "02d9b3c7-21f7-4c82-857c-8f48ddc2df97" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 09:53:28 GMT", + "mise-correlation-id": "b4ab9385-c853-4563-a800-af62fcbd89a8", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "a82f6a17-6977-4155-aa79-f23344265669" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:28.2491362", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "769c55b9-ae01-4bf7-8b26-6fc4e99c13db" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 09:53:30 GMT", + "mise-correlation-id": "cb26aedf-89c7-4fcf-ba27-d7c2749a0ab8", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "bd49fcb1-3f2d-407d-a872-ab064ce223b9" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:30.8232367", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "a8f0931c-2430-4796-a1f4-443f18d01f2d" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 09:53:33 GMT", + "mise-correlation-id": "ade9346a-96c2-443c-8713-e3270b882954", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "3c955b31-71ee-45e1-963f-73ff90b7fd76" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:33.2758667", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "fc5b2572-b6b0-485f-92de-ad3bf49dc8d7" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "166", + "Content-Type": "application/json; charset=utf-8", + "Date": "Sun, 22 Jan 2023 09:53:35 GMT", + "mise-correlation-id": "540f42e0-155d-4efa-9a83-c4c29e8d1ad8", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "69d217b9-0bbe-41b9-bdde-0d4d6d2f149e" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-22T10:03:35.7030546", + "validationStatus": "VALIDATION_SUCCESS" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json index 587078bc8139..b729a80a7942 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "1a03918b-a156-48c3-9946-8d9f87565306" + "x-ms-client-request-id": "a4f88324-ee9e-41de-bdc3-d4fc0168b968" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1776", + "Content-Length": "1579", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:01:04 GMT", - "mise-correlation-id": "06cf00f6-4fbf-4d95-9434-5451a8585de6", + "Date": "Sun, 22 Jan 2023 10:01:43 GMT", + "mise-correlation-id": "82dcfca9-bd94-4ff2-9ea7-20e41b974da5", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "62dcbfea-fcc6-4327-8fa7-8f063fe8b1a1" + "x-ms-correlation-request-id": "f3b8e284-2165-4286-9d2f-840ea2a362e0" }, "ResponseBody": { "loadTestConfiguration": { @@ -36,53 +36,46 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:01:04.2579166", + "expireDateTime": "2023-01-22T11:01:43.6324655", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T16:01:04.2578098", + "expireDateTime": "2023-01-22T11:01:43.6323648", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:01:04.2579397", + "expireDateTime": "2023-01-22T11:01:43.6324868", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] }, "outputArtifacts": { - "resultFileInfo": { - "url": "https://storageurl.com/", - "fileName": "csv.zip", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:01:04.2579613", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, "logsFileInfo": { "url": "https://storageurl.com/", "fileName": "logs.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:01:04.2579835", + "expireDateTime": "2023-01-22T11:01:43.6325083", "validationStatus": "VALIDATION_NOT_REQUIRED" } } }, "testResult": "NOT_APPLICABLE", "testRunId": "abcde", - "displayName": "sampletr", + "displayName": "sample123", "testId": "abc", "status": "DONE", - "startDateTime": "2023-01-20T15:00:16.821Z", - "endDateTime": "2023-01-20T15:00:53.842Z", - "executedDateTime": "2023-01-20T15:00:15.461Z", + "startDateTime": "2023-01-22T10:01:06.757Z", + "endDateTime": "2023-01-22T10:01:42.603Z", + "executedDateTime": "2023-01-22T10:01:05.767Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-20T15:00:16.644Z", - "lastModifiedDateTime": "2023-01-20T15:00:59.798Z" + "createdDateTime": "2023-01-22T10:01:06.635Z", + "lastModifiedDateTime": "2023-01-22T10:01:43.025Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json index ba479a03c155..947a2e03fe95 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "816b7323-2c4e-44f1-922d-513d742c9788" + "x-ms-client-request-id": "feca4433-9425-4017-9cc2-97d87ca26cb5" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:01:05 GMT", - "mise-correlation-id": "977c4762-dc06-4b75-9c94-199385cae8b3", + "Date": "Sun, 22 Jan 2023 10:01:44 GMT", + "mise-correlation-id": "46738c0a-e42d-4bfb-a88e-5728c720a26f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "19dc4402-77ba-4229-83fb-925c9121f34a" + "x-ms-correlation-request-id": "a4aaa82e-324b-451e-87a7-817d30d95de4" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-20T15:01:04.733Z", - "lastModifiedDateTime": "2023-01-20T15:01:04.733Z" + "createdDateTime": "2023-01-22T10:01:44.094Z", + "lastModifiedDateTime": "2023-01-22T10:01:44.094Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json index 7d8b7e22c410..aacf4029d0b2 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "dc034d5a-9b6a-4a03-b66c-cdd2d5ef615c" + "x-ms-client-request-id": "e32ea808-050d-4475-b7a5-8e83b9d22579" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "2077", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:01:05 GMT", - "mise-correlation-id": "b8b41cc1-478d-4600-947c-6568e6d14aa6", + "Date": "Sun, 22 Jan 2023 10:01:45 GMT", + "mise-correlation-id": "4d4697dc-621b-40f7-a964-ef0af4af7484", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "87c4b4cb-b775-4bf6-883c-42721d6f2235" + "x-ms-correlation-request-id": "eef31ab0-c433-41e9-800c-e9be792b1a67" }, "ResponseBody": { "testRunId": "abcde", @@ -52,8 +52,8 @@ "resourceType": "microsoft.web/sites" } }, - "createdDateTime": "2023-01-20T15:01:04.751Z", - "lastModifiedDateTime": "2023-01-20T15:01:04.751Z" + "createdDateTime": "2023-01-22T10:01:44.152Z", + "lastModifiedDateTime": "2023-01-22T10:01:44.152Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json index 62f40dd097a0..41f1dced04b4 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json @@ -11,7 +11,7 @@ "Content-Length": "60", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "32d369cb-a571-4d94-8fcd-48fe9cf754ed" + "x-ms-client-request-id": "2be89d88-f81c-4759-9fde-aaca79194795" }, "RequestBody": { "testId": "abc", @@ -24,12 +24,12 @@ "Connection": "keep-alive", "Content-Length": "1289", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:57 GMT", + "Date": "Sun, 22 Jan 2023 10:00:58 GMT", "Location": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", - "mise-correlation-id": "78921dea-ba78-4448-8bab-42eb2f0e62f5", + "mise-correlation-id": "94604f61-dabf-4f49-8886-2cf5e0e93eac", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "863b4bc8-2ebf-4f56-8bb4-09724c705215" + "x-ms-correlation-request-id": "61709980-ce14-4ec1-84f3-ff7e7da3ffec" }, "ResponseBody": { "loadTestConfiguration": { @@ -50,7 +50,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T16:00:56.6564413", + "expireDateTime": "2023-01-22T11:00:57.4451411", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { @@ -69,10 +69,10 @@ "displayName": "sample123", "testId": "abc", "status": "ACCEPTED", - "executedDateTime": "2023-01-20T15:00:56.656Z", + "executedDateTime": "2023-01-22T10:00:57.445Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-20T15:00:57.484Z", - "lastModifiedDateTime": "2023-01-20T15:00:57.484Z" + "createdDateTime": "2023-01-22T10:00:58.447Z", + "lastModifiedDateTime": "2023-01-22T10:00:58.447Z" } }, { @@ -84,7 +84,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7d8f720c-f6d2-4282-b5a8-19baeef97434" + "x-ms-client-request-id": "88b6f997-3e91-42b5-b6fe-334146677cd2" }, "RequestBody": null, "StatusCode": 404, @@ -93,11 +93,11 @@ "Connection": "keep-alive", "Content-Length": "99", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:57 GMT", - "mise-correlation-id": "20a5caed-2c1c-4786-aa7f-6ea58d267d85", + "Date": "Sun, 22 Jan 2023 10:00:58 GMT", + "mise-correlation-id": "c446384f-d8f1-44bb-93cd-18f0ac337f32", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a3190ca3-86d3-458a-804d-da621ee9a0d8" + "x-ms-correlation-request-id": "5a231032-83f8-4de0-b7af-46f53adbbb38" }, "ResponseBody": { "error": { diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json index 9f52aeff3c8f..c77b0e4b7508 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "60", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "548a67b3-03af-44fd-b6a5-e4d41f2b6c8b" + "x-ms-client-request-id": "dcc164ed-e0c1-431c-9742-934e9298a2c4" }, "RequestBody": { "testId": "abc", @@ -22,13 +22,13 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1351", + "Content-Length": "1352", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:58 GMT", - "mise-correlation-id": "c6ff30fc-b9aa-4130-8541-bd5fcaa7a7aa", + "Date": "Sun, 22 Jan 2023 10:01:00 GMT", + "mise-correlation-id": "94aa3335-ffb6-40c5-a391-40c3554dd802", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "cb210576-ed6a-4c2a-be09-48877405b07a" + "x-ms-correlation-request-id": "4b4e89ec-3e56-4755-b860-cc26f930fe09" }, "ResponseBody": { "loadTestConfiguration": { @@ -42,21 +42,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:00:58.3602008", + "expireDateTime": "2023-01-22T11:00:59.4679394", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T16:00:58.3601002", + "expireDateTime": "2023-01-22T11:00:59.4678292", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:00:58.3602222", + "expireDateTime": "2023-01-22T11:00:59.4679632", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -68,11 +68,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-20T15:00:57.863Z", - "executedDateTime": "2023-01-20T15:00:56.656Z", + "startDateTime": "2023-01-22T10:00:58.865Z", + "executedDateTime": "2023-01-22T10:00:57.445Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-20T15:00:57.484Z", - "lastModifiedDateTime": "2023-01-20T15:00:58.35Z" + "createdDateTime": "2023-01-22T10:00:58.447Z", + "lastModifiedDateTime": "2023-01-22T10:00:59.459Z" } }, { @@ -84,20 +84,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "b61f91a6-e75a-4857-880d-b34a72601656" + "x-ms-client-request-id": "7d98316c-3270-40d2-8552-854febb9ff04" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1351", + "Content-Length": "1352", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:58 GMT", - "mise-correlation-id": "d047c6af-7fd4-4fa1-ac8f-dd365fe5002f", + "Date": "Sun, 22 Jan 2023 10:01:00 GMT", + "mise-correlation-id": "6c899d65-c594-44dc-8b85-d97ecc8db737", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "6842738f-ced7-412b-af0a-48d0fc04bbb5" + "x-ms-correlation-request-id": "9a6cf444-c05d-4744-8e25-cf837a6ec835" }, "ResponseBody": { "loadTestConfiguration": { @@ -111,21 +111,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:00:58.8308474", + "expireDateTime": "2023-01-22T11:01:00.4263251", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T16:00:58.8307335", + "expireDateTime": "2023-01-22T11:01:00.4261884", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:00:58.8308721", + "expireDateTime": "2023-01-22T11:01:00.4263591", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -137,11 +137,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-20T15:00:57.863Z", - "executedDateTime": "2023-01-20T15:00:56.656Z", + "startDateTime": "2023-01-22T10:00:58.865Z", + "executedDateTime": "2023-01-22T10:00:57.445Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-20T15:00:57.484Z", - "lastModifiedDateTime": "2023-01-20T15:00:58.35Z" + "createdDateTime": "2023-01-22T10:00:58.447Z", + "lastModifiedDateTime": "2023-01-22T10:00:59.459Z" } }, { @@ -153,20 +153,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "440d2ec1-97aa-4f74-8b3d-53dfa17dc431" + "x-ms-client-request-id": "ca1bc1cf-85f9-4dce-b650-ab21c04a48ab" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1351", + "Content-Length": "1350", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:01:01 GMT", - "mise-correlation-id": "7e48d714-9a72-4871-a129-9b79bcd278bb", + "Date": "Sun, 22 Jan 2023 10:01:02 GMT", + "mise-correlation-id": "6bc3e48f-c173-4c60-9cd3-e9ce26353866", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "79ac5085-f21a-4f4a-8aa1-11ce0fa2c293" + "x-ms-correlation-request-id": "999ec292-35af-449f-a750-6f9a3848f814" }, "ResponseBody": { "loadTestConfiguration": { @@ -180,21 +180,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:01:01.3223506", + "expireDateTime": "2023-01-22T11:01:02.792512", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T16:01:01.3222505", + "expireDateTime": "2023-01-22T11:01:02.7923836", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:01:01.3223736", + "expireDateTime": "2023-01-22T11:01:02.792545", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -206,11 +206,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-20T15:00:57.863Z", - "executedDateTime": "2023-01-20T15:00:56.656Z", + "startDateTime": "2023-01-22T10:00:58.865Z", + "executedDateTime": "2023-01-22T10:00:57.445Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-20T15:00:57.484Z", - "lastModifiedDateTime": "2023-01-20T15:00:58.35Z" + "createdDateTime": "2023-01-22T10:00:58.447Z", + "lastModifiedDateTime": "2023-01-22T10:00:59.459Z" } }, { @@ -222,7 +222,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "d67fbdb1-dd89-4117-b0fa-eaae02b26c56" + "x-ms-client-request-id": "18f45bca-b292-4f0d-8611-bc8ce530609f" }, "RequestBody": null, "StatusCode": 200, @@ -231,11 +231,11 @@ "Connection": "keep-alive", "Content-Length": "1351", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:01:03 GMT", - "mise-correlation-id": "9ef8181b-a4b4-46e1-a2c5-d034fbb0edb6", + "Date": "Sun, 22 Jan 2023 10:01:05 GMT", + "mise-correlation-id": "f8c6a8b2-b5a3-4dd5-acd3-2fdbfc00d5cb", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "8ae51401-ec15-4150-80ba-c9b57e1b4ede" + "x-ms-correlation-request-id": "41ee60e4-02fb-42f5-b706-17eacab66d76" }, "ResponseBody": { "loadTestConfiguration": { @@ -249,21 +249,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:01:03.7936471", + "expireDateTime": "2023-01-22T11:01:05.3064904", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T16:01:03.7935434", + "expireDateTime": "2023-01-22T11:01:05.306384", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-20T16:01:03.7936693", + "expireDateTime": "2023-01-22T11:01:05.3065131", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -275,11 +275,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-20T15:00:57.863Z", - "executedDateTime": "2023-01-20T15:00:56.656Z", + "startDateTime": "2023-01-22T10:00:58.865Z", + "executedDateTime": "2023-01-22T10:00:57.445Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-20T15:00:57.484Z", - "lastModifiedDateTime": "2023-01-20T15:00:58.35Z" + "createdDateTime": "2023-01-22T10:00:58.447Z", + "lastModifiedDateTime": "2023-01-22T10:00:59.459Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json index 413c89710cce..7f9e1477bd9e 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?fileType=JMX_FILE\u0026api-version=2022-11-01", + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7411fecd-6659-4a88-b04c-67f005d627ea" + "x-ms-client-request-id": "c5fc9bfd-c8fe-49a5-8a55-4e537cfd2a5b" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:07 GMT", + "Date": "Sun, 22 Jan 2023 10:00:49 GMT", "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", - "mise-correlation-id": "ca4e4ee9-c852-474b-abde-95f932567e6b", + "mise-correlation-id": "775223b8-c389-460c-8596-7ef7f372ce35", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "81ee670d-fb08-43af-8ffa-aeaf3ac337b3" + "x-ms-correlation-request-id": "9e00010c-3182-428b-a5ef-455f55cb25ee" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:10:07.2017306", + "expireDateTime": "2023-01-22T10:10:49.4580903", "validationStatus": "VALIDATION_INITIATED" } }, @@ -44,7 +44,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "9abe26d0-b2a2-4859-851c-49c8673d05a6" + "x-ms-client-request-id": "3bd25231-794f-4b49-8cc7-fd1bd1602479" }, "RequestBody": null, "StatusCode": 200, @@ -53,17 +53,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:07 GMT", - "mise-correlation-id": "fe9b7b00-8c43-4274-9f84-1a4157575284", + "Date": "Sun, 22 Jan 2023 10:00:49 GMT", + "mise-correlation-id": "c287b385-6315-4be3-a034-e5fa1ebeae3c", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d243c887-1b96-41bd-88ca-4495cf215f21" + "x-ms-correlation-request-id": "f168ce92-d7c9-4438-840f-14c341f74860" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:10:07.5723293", + "expireDateTime": "2023-01-22T10:10:49.8239473", "validationStatus": "VALIDATION_INITIATED" } }, @@ -76,7 +76,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cc47b357-a5b4-4cf6-ae62-193b6983d68e" + "x-ms-client-request-id": "0646cd55-966e-4a07-aa9d-10dd04a2fb3d" }, "RequestBody": null, "StatusCode": 200, @@ -85,17 +85,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:10 GMT", - "mise-correlation-id": "98ec4afa-9b9d-45bd-8f85-a0884863ca05", + "Date": "Sun, 22 Jan 2023 10:00:52 GMT", + "mise-correlation-id": "fb477e8d-47f0-49c1-bb6e-cfccc4a433a9", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "65f503ab-9453-4464-aa2c-b77a7546fe10" + "x-ms-correlation-request-id": "254ac00f-1b01-4040-89fd-1baf15cf05eb" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:10:09.9945713", + "expireDateTime": "2023-01-22T10:10:52.2670343", "validationStatus": "VALIDATION_INITIATED" } }, @@ -108,7 +108,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cab0c204-ed7b-43ed-ab21-27b04bc5af13" + "x-ms-client-request-id": "4f58cf11-127d-4efc-a614-df5002c7b526" }, "RequestBody": null, "StatusCode": 200, @@ -117,17 +117,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:12 GMT", - "mise-correlation-id": "4a496adb-10a7-409b-9f33-762f7b66e3d3", + "Date": "Sun, 22 Jan 2023 10:00:54 GMT", + "mise-correlation-id": "f05eba8e-dcf0-4ab8-b433-7a19234522d9", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a6799e4f-192d-4883-8de1-33bedbd9e55a" + "x-ms-correlation-request-id": "22b1752e-bd33-487a-aece-38da371384eb" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:10:12.4019024", + "expireDateTime": "2023-01-22T10:10:54.6544485", "validationStatus": "VALIDATION_INITIATED" } }, @@ -140,7 +140,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "aa59c8b8-4d4b-4b64-95fe-28cfede4d477" + "x-ms-client-request-id": "6f00555e-ce39-4722-b614-7ca39054b7c7" }, "RequestBody": null, "StatusCode": 200, @@ -149,17 +149,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 15:00:14 GMT", - "mise-correlation-id": "394705f9-00ab-422f-9a76-c10b90f6c689", + "Date": "Sun, 22 Jan 2023 10:00:57 GMT", + "mise-correlation-id": "d7354708-5c59-4b0b-ace9-2c9d9e52b82f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1b0284dc-ef50-4670-9711-49286feec805" + "x-ms-correlation-request-id": "99b012f6-afd8-4368-a89d-0d9ad7ec45ab" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:10:14.8494452", + "expireDateTime": "2023-01-22T10:10:57.0061841", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md index c0d6e3948faf..75f3cd6e5978 100644 --- a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md +++ b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md @@ -9,12 +9,10 @@ import { Client } from '@azure-rest/core-client'; import { ClientOptions } from '@azure-rest/core-client'; import { HttpResponse } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure/core-client'; import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PathUncheckedResponse } from '@azure-rest/core-client'; import { RawHttpHeaders } from '@azure/core-rest-pipeline'; -import { ReadStream } from 'fs'; import { RequestParameters } from '@azure-rest/core-client'; import { SimplePollerLike } from '@azure/core-lro'; import { StreamableMethod } from '@azure-rest/core-client'; @@ -47,12 +45,6 @@ export type AzureLoadTestingClient = Client & { path: Routes; }; -// @public -export function beginCreateOrUpdateTestRun(client: AzureLoadTestingClient, testId: string, displayName: string, polledOperationOptions?: PolledOperationOptions): Promise; - -// @public -export function beginUploadTestFile(client: AzureLoadTestingClient, testId: string, fileName: string, file: ReadStream, polledOperationOptions?: PolledOperationOptions): Promise; - // @public export interface CertificateMetadata { name?: string; @@ -144,12 +136,18 @@ export type FileUploadAndValidatePoller = SimplePollerLike = T extends Array ? TData : never; +// @public +export function getFileValidationPoller(client: AzureLoadTestingClient, fileUploadResult: TestUploadFile201Response, polledOperationOptions?: PolledOperationOptions): Promise; + // @public export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ page: TPage; nextPageLink?: string; }>; +// @public +export function getTestRunCompletionPoller(client: AzureLoadTestingClient, createTestRunResponse: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response, polledOperationOptions?: PolledOperationOptions): Promise; + // @public (undocumented) export function isUnexpected(response: TestCreateOrUpdate200Response | TestCreateOrUpdate201Response | TestCreateOrUpdateDefaultResponse): response is TestCreateOrUpdateDefaultResponse; @@ -366,7 +364,7 @@ export interface PassFailMetricOutput { } // @public (undocumented) -export interface PolledOperationOptions extends OperationOptions { +export interface PolledOperationOptions { updateIntervalInMs?: number; } diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 1f1834a0ae07..990b5c7c84c4 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -8,15 +8,13 @@ * @azsdk-weight 10 */ -import AzureLoadTesting, { - isUnexpected, - beginCreateOrUpdateTestRun, - beginUploadTestFile, -} from "@azure-rest/load-testing"; +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; import { AbortController } from "@azure/abort-controller"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; +import { getFileValidationPoller } from "../src/getFileValidationPoller"; +import { getTestRunCompletionPoller } from "../src/getTestRunCompletionPoller"; const readStream = createReadStream("./sample.jmx"); @@ -50,21 +48,26 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", { - queryParameters: { - fileType: "JMX_FILE", - }, - contentType: "application/octet-stream", - body: readStream, - }); - await fileUploadPoller.pollUntilDone({ + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - if (fileUploadPoller.getOperationState().status != "succeeded") + if (fileValidatePoller.getOperationState().status != "succeeded") throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileUploadPoller.getOperationState().error + fileValidateResult.body.validationFailureDetails ); // Creating/Updating app component @@ -91,7 +94,7 @@ async function main() { } // Creating/Updating the test run - const testRunPoller = await beginCreateOrUpdateTestRun(client, testRunId, { + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ contentType: "application/merge-patch+json", body: { testId: testId, @@ -99,18 +102,24 @@ async function main() { virtualUsers: 10, }, }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error( - "There is some issue in running the test, Error Response : " + - testRunPoller.getOperationState().error - ); + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - const testRunStarttime = testRunResult.body.startDateTime; - const testRunEndTime = testRunResult.body.endDateTime; + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; if (testRunId) { // get list of all metric namespaces and pick the first one const metricNamespaces = await client diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sampleWithInitialLROCall.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sampleWithInitialLROCall.ts deleted file mode 100644 index 8265310acb10..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sampleWithInitialLROCall.ts +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics - * - * @summary creates and run a loadtest - * @azsdk-weight 10 - */ - -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; -import { AbortController } from "@azure/abort-controller"; -import { DefaultAzureCredential } from "@azure/identity"; -import { createReadStream } from "fs"; -import { v4 as uuidv4 } from "uuid"; -import { getFileValidationPoller } from "../src/getFileValidationPoller"; -import { getTestRunCompletionPoller } from "../src/getTestRunCompletionPoller"; - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - const testId = uuidv4(); // ID to be assigned to a test - const testRunId = uuidv4(); // ID to be assigned to a testRun - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating/Updating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") - .put({ - contentType: "application/octet-stream", - body: readStream, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult, testId); - const fileValidateResult = await fileValidatePoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); - - if (fileValidatePoller.getOperationState().status != "succeeded") - throw new Error( - "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileValidateResult.body.validationFailureDetails - ); - - console.log(fileUploadResult); - - // Creating/Updating app component - const appComponentCreationResult = await client - .path("/tests/{testId}/app-components", testId) - .patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - components: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } - - // Creating/Updating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testId, - displayName: displayName, - virtualUsers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); - - if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; - if (testRunId) { - // get list of all metric namespaces and pick the first one - let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunId) - .get(); - - if (isUnexpected(metricNamespaces)) { - throw metricNamespaces.body.error; - } - - let metricNamespace = metricNamespaces.body.value[0]; - - if (metricNamespace.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // get list of all metric definitions and pick the first one - let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunId) - .get({ - queryParameters: { - metricNamespace: metricNamespace.name, - }, - }); - - if (isUnexpected(metricDefinitions)) { - throw metricDefinitions.body.error; - } - - let metricDefinition = metricDefinitions.body.value[0]; - - if (metricDefinition.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ - queryParameters: { - metricname: metricDefinition.name, - metricNamespace: metricNamespace.name, - timespan: testRunStarttime + "/" + testRunEndTime, - }, - }); - - console.log(metricsResult); - console.log(testRunResult); - - // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - - if (isUnexpected(deleteTestRunResult)) { - throw deleteTestRunResult.body.error; - } - - // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); - - if (isUnexpected(deleteTestResult)) { - throw deleteTestResult.body.error; - } - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md index 3b1c14d03e66..9ac0b70542de 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md @@ -11,11 +11,10 @@ urlFragment: load-testing-javascript-beta These sample programs show how to use the JavaScript client libraries for Azure Load Testing rest in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------- | -------------------------------- | -| [sample.js][sample] | creates and run a loadtest | -| [sampleWithInitialLROCall.js][samplewithinitiallrocall] | creates and run a loadtest | -| [stopTest.js][stoptest] | creates, run and stop a loadtest | +| **File Name** | **Description** | +| ----------------------- | -------------------------------- | +| [sample.js][sample] | creates and run a loadtest | +| [stopTest.js][stoptest] | creates, run and stop a loadtest | ## Prerequisites @@ -58,9 +57,8 @@ npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js -[samplewithinitiallrocall]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index 25d876e2a6bf..9b0f6c421dc5 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -8,15 +8,13 @@ */ const AzureLoadTesting = require("@azure-rest/load-testing").default, - { - isUnexpected, - beginCreateOrUpdateTestRun, - beginUploadTestFile, - } = require("@azure-rest/load-testing"); + { isUnexpected } = require("@azure-rest/load-testing"); const { AbortController } = require("@azure/abort-controller"); const { DefaultAzureCredential } = require("@azure/identity"); const { createReadStream } = require("fs"); const { v4: uuidv4 } = require("uuid"); +const { getFileValidationPoller } = require("../src/getFileValidationPoller"); +const { getTestRunCompletionPoller } = require("../src/getTestRunCompletionPoller"); const readStream = createReadStream("./sample.jmx"); @@ -50,21 +48,26 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", { - queryParameters: { - fileType: "JMX_FILE", - }, - contentType: "application/octet-stream", - body: readStream, - }); - await fileUploadPoller.pollUntilDone({ + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - if (fileUploadPoller.getOperationState().status != "succeeded") + if (fileValidatePoller.getOperationState().status != "succeeded") throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileUploadPoller.getOperationState().error + fileValidateResult.body.validationFailureDetails ); // Creating/Updating app component @@ -92,7 +95,7 @@ async function main() { } // Creating/Updating the test run - const testRunPoller = await beginCreateOrUpdateTestRun(client, testRunId, { + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ contentType: "application/merge-patch+json", body: { testId: testId, @@ -100,18 +103,24 @@ async function main() { virtualUsers: 10, }, }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error( - "There is some issue in running the test, Error Response : " + - testRunPoller.getOperationState().error - ); + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - const testRunStarttime = testRunResult.body.startDateTime; - const testRunEndTime = testRunResult.body.endDateTime; + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; if (testRunId) { // get list of all metric namespaces and pick the first one const metricNamespaces = await client diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js deleted file mode 100644 index f4e5eb363fe7..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sampleWithInitialLROCall.js +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics - * - * @summary creates and run a loadtest - */ - -const AzureLoadTesting = require("@azure-rest/load-testing").default, - { isUnexpected } = require("@azure-rest/load-testing"); -const { AbortController } = require("@azure/abort-controller"); -const { DefaultAzureCredential } = require("@azure/identity"); -const { createReadStream } = require("fs"); -const { v4: uuidv4 } = require("uuid"); -const { getFileValidationPoller } = require("../src/getFileValidationPoller"); -const { getTestRunCompletionPoller } = require("../src/getTestRunCompletionPoller"); - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - const testId = uuidv4(); // ID to be assigned to a test - const testRunId = uuidv4(); // ID to be assigned to a testRun - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating/Updating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") - .put({ - contentType: "application/octet-stream", - body: readStream, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult, testId); - const fileValidateResult = await fileValidatePoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); - - if (fileValidatePoller.getOperationState().status != "succeeded") - throw new Error( - "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileValidateResult.body.validationFailureDetails - ); - - console.log(fileUploadResult); - - // Creating/Updating app component - const appComponentCreationResult = await client - .path("/tests/{testId}/app-components", testId) - .patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - components: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": - { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } - - // Creating/Updating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testId, - displayName: displayName, - virtualUsers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); - - if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; - if (testRunId) { - // get list of all metric namespaces and pick the first one - let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunId) - .get(); - - if (isUnexpected(metricNamespaces)) { - throw metricNamespaces.body.error; - } - - let metricNamespace = metricNamespaces.body.value[0]; - - if (metricNamespace.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // get list of all metric definitions and pick the first one - let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunId) - .get({ - queryParameters: { - metricNamespace: metricNamespace.name, - }, - }); - - if (isUnexpected(metricDefinitions)) { - throw metricDefinitions.body.error; - } - - let metricDefinition = metricDefinitions.body.value[0]; - - if (metricDefinition.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ - queryParameters: { - metricname: metricDefinition.name, - metricNamespace: metricNamespace.name, - timespan: testRunStarttime + "/" + testRunEndTime, - }, - }); - - console.log(metricsResult); - console.log(testRunResult); - - // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - - if (isUnexpected(deleteTestRunResult)) { - throw deleteTestRunResult.body.error; - } - - // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); - - if (isUnexpected(deleteTestResult)) { - throw deleteTestResult.body.error; - } - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md index a3fe5dee2c57..688974679c5e 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md @@ -11,11 +11,10 @@ urlFragment: load-testing-typescript-beta These sample programs show how to use the TypeScript client libraries for Azure Load Testing rest in some common scenarios. -| **File Name** | **Description** | -| ------------------------------------------------------- | -------------------------------- | -| [sample.ts][sample] | creates and run a loadtest | -| [sampleWithInitialLROCall.ts][samplewithinitiallrocall] | creates and run a loadtest | -| [stopTest.ts][stoptest] | creates, run and stop a loadtest | +| **File Name** | **Description** | +| ----------------------- | -------------------------------- | +| [sample.ts][sample] | creates and run a loadtest | +| [stopTest.ts][stoptest] | creates, run and stop a loadtest | ## Prerequisites @@ -70,9 +69,8 @@ npx cross-env LOADTESTSERVICE_ENDPOINT="" SUBSCRIPTION Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts -[samplewithinitiallrocall]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index 34e81eab7452..b8488ce43c6b 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -7,15 +7,13 @@ * @summary creates and run a loadtest */ -import AzureLoadTesting, { - isUnexpected, - beginCreateOrUpdateTestRun, - beginUploadTestFile, -} from "@azure-rest/load-testing"; +import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; import { AbortController } from "@azure/abort-controller"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; +import { getFileValidationPoller } from "../src/getFileValidationPoller"; +import { getTestRunCompletionPoller } from "../src/getTestRunCompletionPoller"; const readStream = createReadStream("./sample.jmx"); @@ -49,21 +47,26 @@ async function main() { throw new Error("Test ID returned as undefined."); // Uploading .jmx file to a test - const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", { - queryParameters: { - fileType: "JMX_FILE", - }, - contentType: "application/octet-stream", - body: readStream, - }); - await fileUploadPoller.pollUntilDone({ + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - if (fileUploadPoller.getOperationState().status != "succeeded") + if (fileValidatePoller.getOperationState().status != "succeeded") throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileUploadPoller.getOperationState().error + fileValidateResult.body.validationFailureDetails ); // Creating/Updating app component @@ -90,7 +93,7 @@ async function main() { } // Creating/Updating the test run - const testRunPoller = await beginCreateOrUpdateTestRun(client, testRunId, { + const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ contentType: "application/merge-patch+json", body: { testId: testId, @@ -98,18 +101,24 @@ async function main() { virtualUsers: 10, }, }); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error( - "There is some issue in running the test, Error Response : " + - testRunPoller.getOperationState().error - ); + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - const testRunStarttime = testRunResult.body.startDateTime; - const testRunEndTime = testRunResult.body.endDateTime; + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; if (testRunId) { // get list of all metric namespaces and pick the first one const metricNamespaces = await client diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts deleted file mode 100644 index 2a8d6c9171e2..000000000000 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sampleWithInitialLROCall.ts +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -/** - * This sample demonstrates how to a) create a loadtest, b) upload a jmx file, c) create appcomponent, d) run test and e) get test status, and f) get test metrics - * - * @summary creates and run a loadtest - */ - -import AzureLoadTesting, { - isUnexpected, -} from "@azure-rest/load-testing"; -import { AbortController } from "@azure/abort-controller"; -import { DefaultAzureCredential } from "@azure/identity"; -import { createReadStream } from "fs"; -import { v4 as uuidv4 } from "uuid"; -import { getFileValidationPoller } from "../src/getFileValidationPoller"; -import { getTestRunCompletionPoller } from "../src/getTestRunCompletionPoller"; - -const readStream = createReadStream("./sample.jmx"); - -async function main() { - const endpoint = process.env["LOADTESTSERVICE_ENDPOINT"] || ""; - const displayName = "some-load-test"; - const SUBSCRIPTION_ID = process.env["SUBSCRIPTION_ID"] || ""; - const testId = uuidv4(); // ID to be assigned to a test - const testRunId = uuidv4(); // ID to be assigned to a testRun - - // Build a client through AAD - const client = AzureLoadTesting(endpoint, new DefaultAzureCredential()); - - // Creating/Updating a load test - const testCreationResult = await client.path("/tests/{testId}", testId).patch({ - contentType: "application/merge-patch+json", - body: { - displayName: displayName, - description: "", - loadTestConfiguration: { - engineInstances: 1, // number of engine instances to run test - }, - }, - }); - // Checking for error response - if (isUnexpected(testCreationResult)) { - throw testCreationResult.body.error; - } - - if (testCreationResult.body.testId === undefined) - throw new Error("Test ID returned as undefined."); - - // Uploading .jmx file to a test - const fileUploadResult = await client - .path("/tests/{testId}/files/{fileName}", testId, "sample.jmx") - .put({ - contentType: "application/octet-stream", - body: readStream, - }); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult, testId); - const fileValidateResult = await fileValidatePoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); - - if (fileValidatePoller.getOperationState().status != "succeeded") - throw new Error( - "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileValidateResult.body.validationFailureDetails - ); - - console.log(fileUploadResult); - - // Creating/Updating app component - const appComponentCreationResult = await client - .path("/tests/{testId}/app-components", testId) - .patch({ - contentType: "application/merge-patch+json", - body: { - testId: testCreationResult.body.testId, - components: { - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo": { - resourceId: - "/subscriptions/{SUBSCRIPTION_ID}/resourceGroups/App-Service-Sample-Demo-rg/providers/Microsoft.Web/sites/App-Service-Sample-Demo", - resourceName: "App-Service-Sample-Demo", - resourceType: "Microsoft.Web/sites", - subscriptionId: SUBSCRIPTION_ID, - }, - }, - }, - }); - - if (isUnexpected(appComponentCreationResult)) { - throw appComponentCreationResult.body.error; - } - - // Creating/Updating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", testRunId).patch({ - contentType: "application/merge-patch+json", - body: { - testId: testId, - displayName: displayName, - virtualUsers: 10, - }, - }); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); - - if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; - if (testRunId) { - // get list of all metric namespaces and pick the first one - let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunId) - .get(); - - if (isUnexpected(metricNamespaces)) { - throw metricNamespaces.body.error; - } - - let metricNamespace = metricNamespaces.body.value[0]; - - if (metricNamespace.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // get list of all metric definitions and pick the first one - let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunId) - .get({ - queryParameters: { - metricNamespace: metricNamespace.name, - }, - }); - - if (isUnexpected(metricDefinitions)) { - throw metricDefinitions.body.error; - } - - let metricDefinition = metricDefinitions.body.value[0]; - - if (metricDefinition.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ - queryParameters: { - metricname: metricDefinition.name, - metricNamespace: metricNamespace.name, - timespan: testRunStarttime + "/" + testRunEndTime, - }, - }); - - console.log(metricsResult); - console.log(testRunResult); - - // Deleting test run - let deleteTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).delete(); - - if (isUnexpected(deleteTestRunResult)) { - throw deleteTestRunResult.body.error; - } - - // Deleting test - let deleteTestResult = await client.path("/tests/{testId}", testId).delete(); - - if (isUnexpected(deleteTestResult)) { - throw deleteTestResult.body.error; - } - } -} - -main().catch(console.error); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json index 416c2dd82e00..e26ce2a6d8f7 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "ES2018", + "target": "ES2020", "module": "commonjs", "moduleResolution": "node", "resolveJsonModule": true, diff --git a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts b/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts deleted file mode 100644 index 507274b87013..000000000000 --- a/sdk/loadtestservice/load-testing-rest/src/beginCreateOrUpdateTestRun.ts +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { TestRunStatusPoller } from "./models"; -import { AzureLoadTestingClient } from "./clientDefinitions"; -import { isUnexpected } from "./isUnexpected"; -import { getTestRunCompletionPoller } from "./getTestRunCompletionPoller"; -import { TestRunCreateOrUpdateParameters } from "./parameters"; - -/** - * Creates a poller to poll for test run status. - * @param client - The Load Testing client. - * @param options - The operation options. - * @returns A poller which can be called to poll until completion of the job. - */ -export async function beginCreateOrUpdateTestRun( - client: AzureLoadTestingClient, - testRunId: string, - testRunParams: TestRunCreateOrUpdateParameters -): Promise { - // Creating the test run - const testRunCreationResult = await client - .path("/test-runs/{testRunId}", testRunId) - .patch(testRunParams); - - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; - } - - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); - - return getTestRunCompletionPoller(client, testRunCreationResult); -} diff --git a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts b/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts deleted file mode 100644 index b6b612d7917a..000000000000 --- a/sdk/loadtestservice/load-testing-rest/src/beginUploadTestFile.ts +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT license. - -import { FileUploadAndValidatePoller } from "./models"; -import { AzureLoadTestingClient } from "./clientDefinitions"; -import { isUnexpected } from "./isUnexpected"; -import { getFileValidationPoller } from "./getFileValidationPoller"; -import { TestUploadFileParameters } from "./parameters"; - -/** - * Uploads a file and creates a poller to poll for validation. - * @param client - The Load Testing client. - * @param options - The operation options. - * @returns A poller which can be called to poll until completion of the job. - */ -export async function beginUploadTestFile( - client: AzureLoadTestingClient, - testId: string, - fileName: string, - uploadParams: TestUploadFileParameters -): Promise { - const fileUploadResult = await client - .path("/tests/{testId}/files/{fileName}", testId, fileName) - .put(uploadParams); - - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } - - return getFileValidationPoller(client, fileUploadResult, testId); -} diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts index da6a87a08f01..0b557dcf1efc 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts @@ -18,10 +18,15 @@ import { sleep } from "./util/LROUtil"; export async function getFileValidationPoller( client: AzureLoadTestingClient, fileUploadResult: TestUploadFile201Response, - testId: string, polledOperationOptions: PolledOperationOptions = {} ): Promise { + //get filename and testid from initial response const fileName = fileUploadResult.body.fileName; + const requestUrl = fileUploadResult.request.url; + const testId = requestUrl.substring( + requestUrl.indexOf("tests/") + 6, + requestUrl.lastIndexOf("/files") + ); type Handler = (state: OperationState) => void; const state: OperationState = { diff --git a/sdk/loadtestservice/load-testing-rest/src/index.ts b/sdk/loadtestservice/load-testing-rest/src/index.ts index a10d5a1b03f5..06ed6346272e 100644 --- a/sdk/loadtestservice/load-testing-rest/src/index.ts +++ b/sdk/loadtestservice/load-testing-rest/src/index.ts @@ -11,8 +11,6 @@ export * from "./isUnexpected"; export * from "./models"; export * from "./outputModels"; export * from "./paginateHelper"; -export { beginCreateOrUpdateTestRun } from "./beginCreateOrUpdateTestRun"; -export { beginUploadTestFile } from "./beginUploadTestFile"; export { getFileValidationPoller } from "./getFileValidationPoller"; export { getTestRunCompletionPoller } from "./getTestRunCompletionPoller"; export default AzureLoadTesting; diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts index 0633eea38e18..010bc80eb62a 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts @@ -5,12 +5,7 @@ import { assert } from "chai"; import { createClient, createRecorder } from "./utils/recordedClient"; import { Context } from "mocha"; import { AbortController } from "@azure/abort-controller"; -import { - AzureLoadTestingClient, - beginUploadTestFile, - getFileValidationPoller, - isUnexpected, -} from "../../src"; +import { AzureLoadTestingClient, getFileValidationPoller, isUnexpected } from "../../src"; import { env, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; import * as fs from "fs"; import { isNode } from "@azure/core-util"; @@ -66,22 +61,7 @@ describe("Test Creation", () => { assert.include(["201"], result.status); }); - it("should upload the test file with LRO", async () => { - const fileUploadPoller = await beginUploadTestFile(client, "abc", "sample.jmx", { - queryParameters: { - fileType: "JMX_FILE", - }, - contentType: "application/octet-stream", - body: readStreamTestFile, - }); - const fileUploadResult = await fileUploadPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); - - assert.equal(fileUploadResult.body.validationStatus, "VALIDATION_SUCCESS"); - }); - - it("should fail to upload the test file with LRO(404)", async () => { + it("should upload the test file with LRO(404)", async () => { const fileUploadResult = await client .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") .put({ @@ -93,11 +73,11 @@ describe("Test Creation", () => { throw fileUploadResult.body.error; } - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult, "abcd"); + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - assert.equal(fileValidatePoller.getOperationState().status, "failed"); + assert.equal(fileValidatePoller.getOperationState().status, "succeeded"); }); it("should create the app components", async () => { diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts index d6736d939f37..c189e7598010 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts @@ -9,8 +9,7 @@ import { Context } from "mocha"; import * as fs from "fs"; import { AzureLoadTestingClient, - beginCreateOrUpdateTestRun, - beginUploadTestFile, + getFileValidationPoller, getTestRunCompletionPoller, isUnexpected, } from "../../src"; @@ -52,36 +51,48 @@ describe("Test Run Creation", () => { }); it("should upload the test file with LRO", async () => { - const fileUploadPoller = await beginUploadTestFile(client, "abc", "sample.jmx", { - queryParameters: { - fileType: "JMX_FILE", - }, - contentType: "application/octet-stream", - body: readStreamTestFile, - }); - const fileUploadResult = await fileUploadPoller.pollUntilDone({ + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStreamTestFile, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - - assert.equal("VALIDATION_SUCCESS", fileUploadResult.body.validationStatus); + assert.equal(fileValidatePoller.getOperationState().status, "succeeded"); }); - it("should create a test run", async () => { - const testRunPoller = await beginCreateOrUpdateTestRun(client, "abcde", { + it("should not be able to create a test run(404)", async () => { + const testRunCreationResult = await client.path("/test-runs/{testRunId}", "abcjad").patch({ contentType: "application/merge-patch+json", body: { testId: "abc", - displayName: "sampletr", + displayName: "sample123", + virtualUsers: 10, }, }); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(300 * 1000), // timeout of 60 seconds + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + testRunCreationResult.body.testRunId = "adjwfjsdmf"; + const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - assert.equal("DONE", testRunResult.body.status); + assert.equal(testRunPoller.getOperationState().status, "failed"); }); - it("should not be able to create a test run(404)", async () => { + it("should timeout the test run", async () => { const testRunCreationResult = await client.path("/test-runs/{testRunId}", "abcjad").patch({ contentType: "application/merge-patch+json", body: { @@ -95,17 +106,16 @@ describe("Test Run Creation", () => { throw testRunCreationResult.body.error; } - testRunCreationResult.body.testRunId = "adjwfjsdmf"; const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + abortSignal: AbortController.timeout(5000), // timeout of 5 seconds }); - assert.equal(testRunPoller.getOperationState().status, "failed"); + assert.equal("The operation was aborted.", testRunPoller.getOperationState().error?.message); }); - it("should timeout the test run", async () => { - const testRunCreationResult = await client.path("/test-runs/{testRunId}", "abcjad").patch({ + it("should be able to create a test run", async () => { + const testRunCreationResult = await client.path("/test-runs/{testRunId}", "abcde").patch({ contentType: "application/merge-patch+json", body: { testId: "abc", @@ -120,10 +130,10 @@ describe("Test Run Creation", () => { const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(5000), // timeout of 5 seconds + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); - assert.equal("The operation was aborted.", testRunPoller.getOperationState().error?.message); + assert.equal(testRunPoller.getOperationState().status, "succeeded"); }); it("should get a test run", async () => { From cb6c8639e7b6a74e0c875832806dc691058c0d01 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Mon, 23 Jan 2023 16:53:06 +0530 Subject: [PATCH 46/60] Corrected Broken Links --- .../load-testing-rest/samples/v1-beta/javascript/README.md | 2 +- .../load-testing-rest/samples/v1-beta/typescript/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md index 9ac0b70542de..d64f2764a500 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/README.md @@ -58,7 +58,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/stopTest.js -[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md index 688974679c5e..5bbf0b6fecda 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/README.md @@ -70,7 +70,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [sample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts [stoptest]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/stopTest.ts -[apiref]: https://docs.microsoft.com/javascript/api/@azure/load-testing +[apiref]: https://docs.microsoft.com/javascript/api/@azure-rest/load-testing [freesub]: https://azure.microsoft.com/free/ [createinstance_azureloadtestingserviceinstance]: https://learn.microsoft.com/azure/load-testing/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/loadtestservice/load-testing-rest/README.md From 682c84c470685ad9bacdb0143b4bf1f24aab1e89 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Mon, 23 Jan 2023 17:12:25 +0530 Subject: [PATCH 47/60] rush file update --- common/config/rush/pnpm-lock.yaml | 61 +++---------------------------- 1 file changed, 5 insertions(+), 56 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d1dc9b6e7c4c..636a7b4e3673 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1286,15 +1286,6 @@ packages: node-addon-api: 5.0.0 dev: false - /@azure/msal-node/1.14.2: - resolution: {integrity: sha512-t3whVhhLdZVVeDEtUPD2Wqfa8BDi3EDMnpWp8dbuRW0GhUpikBfs4AQU0Fe6P9zS87n9LpmUTLrIcPEEuzkvfA==} - engines: {node: 10 || 12 || 14 || 16 || 18} - dependencies: - '@azure/msal-common': 7.6.0 - jsonwebtoken: 8.5.1 - uuid: 8.3.2 - dev: false - /@azure/msal-node/1.14.6: resolution: {integrity: sha512-em/qqFL5tLMxMPl9vormAs13OgZpmQoJbiQ/GlWr+BA77eCLoL+Ehr5xRHowYo+LFe5b+p+PJVkRvT+mLvOkwA==} engines: {node: 10 || 12 || 14 || 16 || 18} @@ -5849,22 +5840,6 @@ packages: graceful-fs: 4.2.10 dev: false - /jsonwebtoken/8.5.1: - resolution: {integrity: sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==} - engines: {node: '>=4', npm: '>=1.4.28'} - dependencies: - jws: 3.2.2 - lodash.includes: 4.3.0 - lodash.isboolean: 3.0.3 - lodash.isinteger: 4.0.4 - lodash.isnumber: 3.0.3 - lodash.isplainobject: 4.0.6 - lodash.isstring: 4.0.1 - lodash.once: 4.1.1 - ms: 2.1.3 - semver: 5.7.1 - dev: false - /jsonwebtoken/9.0.0: resolution: {integrity: sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==} engines: {node: '>=12', npm: '>=6'} @@ -6173,42 +6148,14 @@ packages: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} dev: false - /lodash.includes/4.3.0: - resolution: {integrity: sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==} - dev: false - - /lodash.isboolean/3.0.3: - resolution: {integrity: sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==} - dev: false - /lodash.isequal/4.5.0: resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} dev: false - /lodash.isinteger/4.0.4: - resolution: {integrity: sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==} - dev: false - - /lodash.isnumber/3.0.3: - resolution: {integrity: sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==} - dev: false - - /lodash.isplainobject/4.0.6: - resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} - dev: false - - /lodash.isstring/4.0.1: - resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} - dev: false - /lodash.merge/4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: false - /lodash.once/4.1.1: - resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} - dev: false - /lodash.sortby/4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} dev: false @@ -15741,7 +15688,7 @@ packages: version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@azure/msal-node': 1.14.2 + '@azure/msal-node': 1.14.6 '@microsoft/api-extractor': 7.33.5 '@types/chai': 4.3.3 '@types/mocha': 7.0.2 @@ -17212,7 +17159,7 @@ packages: version: 0.0.0 dependencies: '@azure/identity': 2.1.0 - '@azure/msal-node': 1.14.2 + '@azure/msal-node': 1.14.6 '@azure/msal-node-extensions': 1.0.0-alpha.25 '@microsoft/api-extractor': 7.33.5 '@types/jws': 3.2.4 @@ -19252,7 +19199,7 @@ packages: dev: false file:projects/storage-blob.tgz: - resolution: {integrity: sha512-f9bQWeFKtmL2q3RV8uarpoT6iRwopkTMO/UlusZlnXSBkkV0lzoaDQv5S3oXjsYmOrMUYckw1/AbUlXQYaXZLQ==, tarball: file:projects/storage-blob.tgz} + resolution: {integrity: sha512-MVneKF1K/qMI3gpM6mIx1Uj+gQZe+7/A/F5xcmyBwfwX0PF3tyLZGq4kOdRg70HSz7x5WkRb43ahdx4V8nsuTw==, tarball: file:projects/storage-blob.tgz} name: '@rush-temp/storage-blob' version: 0.0.0 dependencies: @@ -19264,6 +19211,7 @@ packages: '@types/mocha': 7.0.2 '@types/node': 14.18.33 '@types/node-fetch': 2.6.2 + '@types/uuid': 8.3.4 chai: 4.3.6 cross-env: 7.0.3 dotenv: 16.0.3 @@ -19297,6 +19245,7 @@ packages: tslib: 2.4.1 typescript: 4.8.4 util: 0.12.5 + uuid: 8.3.2 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' From 039f88b63f3af24d3ce140c71eb29956cdd0a537 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Mon, 23 Jan 2023 22:54:38 +0530 Subject: [PATCH 48/60] build failure due to core-http formatting --- sdk/core/core-http/test/credentialTests.ts | 6 +++--- sdk/core/core-http/test/serializationTests.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sdk/core/core-http/test/credentialTests.ts b/sdk/core/core-http/test/credentialTests.ts index 9cd39cb7a6c9..e616f12d6121 100644 --- a/sdk/core/core-http/test/credentialTests.ts +++ b/sdk/core/core-http/test/credentialTests.ts @@ -87,21 +87,21 @@ describe("Basic Authentication credentials", () => { it("should fail with options.inHeader and options.inQuery set to null or undefined", function (done) { (function () { new ApiKeyCredentials({ inHeader: undefined, inQuery: undefined } as any); - }).should.throw(); + }.should.throw()); done(); }); it("should fail without options", function (done) { (function () { new (ApiKeyCredentials as any)(); - }).should.throw(); + }.should.throw()); done(); }); it("should fail with empty options", function (done) { (function () { new ApiKeyCredentials({}); - }).should.throw(); + }.should.throw()); done(); }); }); diff --git a/sdk/core/core-http/test/serializationTests.ts b/sdk/core/core-http/test/serializationTests.ts index 84f2a45a4fca..c8b77fd5fb76 100644 --- a/sdk/core/core-http/test/serializationTests.ts +++ b/sdk/core/core-http/test/serializationTests.ts @@ -774,7 +774,7 @@ describe("msrest", function () { (function () { Serializer.serialize(mapper, { length: undefined }, "testobj"); - }).should.throw("testobj.length cannot be undefined."); + }.should.throw("testobj.length cannot be undefined.")); }); it("should not allow null when required: true and nullable: false", function () { @@ -799,7 +799,7 @@ describe("msrest", function () { (function () { Serializer.serialize(mapper, { length: undefined }, "testobj"); - }).should.throw("testobj.length cannot be null or undefined."); + }.should.throw("testobj.length cannot be null or undefined.")); }); it("should not allow undefined when required: true and nullable: false", function () { @@ -824,7 +824,7 @@ describe("msrest", function () { (function () { Serializer.serialize(mapper, { length: undefined }, "testobj"); - }).should.throw("testobj.length cannot be null or undefined."); + }.should.throw("testobj.length cannot be null or undefined.")); }); it("should not allow null when required: true and nullable is undefined", function () { @@ -837,7 +837,7 @@ describe("msrest", function () { }; (function () { Serializer.serialize(mapper, undefined, "testobj"); - }).should.throw("testobj cannot be null or undefined."); + }.should.throw("testobj cannot be null or undefined.")); }); it("should not allow undefined when required: true and nullable is undefined", function () { @@ -850,7 +850,7 @@ describe("msrest", function () { }; (function () { Serializer.serialize(mapper, undefined, "testobj"); - }).should.throw("testobj cannot be null or undefined."); + }.should.throw("testobj cannot be null or undefined.")); }); it("should allow null when required: false and nullable: true", function () { @@ -879,7 +879,7 @@ describe("msrest", function () { // tslint:disable-next-line (function () { Serializer.serialize(mapper, null, "testobj"); - }).should.throw("testobj cannot be null."); + }.should.throw("testobj cannot be null.")); }); it("should allow null when required: false and nullable is undefined", function () { From 2dba1c07b043397e083071b75e5b9f628b616289 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:18:37 +0530 Subject: [PATCH 49/60] LRO Helper Changes Done --- .../recording_should_create_a_loadtest.json | 16 +- ...ding_should_create_the_app_components.json | 12 +- .../recording_should_delete_the_test.json | 8 +- ...recording_should_delete_the_test_file.json | 8 +- .../recording_should_get_the_test.json | 16 +- ...ng_should_get_the_test_app_components.json | 12 +- .../recording_should_get_the_test_file.json | 10 +- ...pload_the_additional_file_without_lro.json | 10 +- ..._should_upload_the_test_file_with_lro.json | 52 +-- ...g_should_be_able_to_create_a_test_run.json | 386 +++++++++--------- ...d_create_a_app_component_for_test_run.json | 14 +- .../recording_should_create_a_loadtest.json | 12 +- .../recording_should_delete_a_test_run.json | 8 +- .../recording_should_get_a_test_run.json | 28 +- ..._should_get_a_test_run_app_components.json | 14 +- ..._get_a_test_run_server_metrics_config.json | 12 +- ...d_not_be_able_to_create_a_test_run404.json | 26 +- ...recording_should_timeout_the_test_run.json | 94 ++--- ..._should_upload_the_test_file_with_lro.json | 50 +-- .../load-testing-rest/samples-dev/sample.ts | 14 +- .../samples/v1-beta/javascript/sample.js | 14 +- .../samples/v1-beta/typescript/src/sample.ts | 14 +- .../src/getFileValidationPoller.ts | 6 +- .../src/getTestRunCompletionPoller.ts | 8 +- .../load-testing-rest/src/index.ts | 3 +- .../load-testing-rest/src/models.ts | 16 +- .../load-testing-rest/src/pollingHelper.ts | 40 ++ .../test/public/testAdministration.spec.ts | 16 +- .../test/public/testRun.spec.ts | 28 +- 29 files changed, 511 insertions(+), 436 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json index ef0c3612a2ee..a80de4d3aff1 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "01e4eada-6f48-4252-9efb-c195092a191e" + "x-ms-client-request-id": "cb2e7aba-bf18-4774-8c16-10f6e90910d2" }, "RequestBody": { "displayName": "sample_test", @@ -25,13 +25,13 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "477", + "Content-Length": "476", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:32 GMT", - "mise-correlation-id": "5a0e9082-e410-481e-b3b1-7e03e74e4aab", + "Date": "Tue, 24 Jan 2023 04:45:03 GMT", + "mise-correlation-id": "91e9d238-1de4-4da9-8ed4-45827504a1ef", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "39750596-4386-44f1-845d-81dd9976427e" + "x-ms-correlation-request-id": "b523987c-ef18-43f0-8742-95afceac704a" }, "ResponseBody": { "loadTestConfiguration": { @@ -44,7 +44,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:00:32.2671785", + "expireDateTime": "2023-01-24T05:45:03.077528", "validationStatus": "VALIDATION_SUCCESS" }, "additionalFileInfo": [] @@ -52,8 +52,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-22T09:57:27.647Z", - "lastModifiedDateTime": "2023-01-22T10:00:32.259Z" + "createdDateTime": "2023-01-24T04:29:10.275Z", + "lastModifiedDateTime": "2023-01-24T04:45:03.071Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json index fcdbaeed1977..320ca7d44333 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json @@ -11,7 +11,7 @@ "Content-Length": "427", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "9cd7e1ff-3128-45e5-b9a2-d47cc544c1d3" + "x-ms-client-request-id": "e260bc37-91dd-4763-b3d9-0f1d8ff6efec" }, "RequestBody": { "testId": "abc", @@ -30,12 +30,12 @@ "Connection": "keep-alive", "Content-Length": "563", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:43 GMT", + "Date": "Tue, 24 Jan 2023 04:45:12 GMT", "Location": "https://endpoint/tests/abc/app-components?api-version=2022-11-01", - "mise-correlation-id": "0fcdc4e2-ff16-4d38-9f8d-436b5184c377", + "mise-correlation-id": "9508b4ca-cc51-4b2d-aedb-18b8d0664956", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "35e0be98-806c-4be2-bbff-d60e3ff35ea3" + "x-ms-correlation-request-id": "0310df60-11df-4315-b5ba-efda08139302" }, "ResponseBody": { "components": { @@ -48,8 +48,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-22T10:00:43.423Z", - "lastModifiedDateTime": "2023-01-22T10:00:43.423Z" + "createdDateTime": "2023-01-24T04:45:12.795Z", + "lastModifiedDateTime": "2023-01-24T04:45:12.795Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json index a1dc6d331fc6..8031f788b02b 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "43474440-dc2f-4850-96a8-cecbaedff892" + "x-ms-client-request-id": "803fda50-a1c8-48a3-a2a9-0e2198c3e554" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Sun, 22 Jan 2023 10:00:46 GMT", - "mise-correlation-id": "21dd9d93-a5e5-4b4f-8585-13b1addd651f", + "Date": "Tue, 24 Jan 2023 04:45:15 GMT", + "mise-correlation-id": "01c0a75b-41cb-4dfc-a0b5-c3f08a6444ea", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5b498695-2364-4ac3-8397-c4d47495daa7" + "x-ms-correlation-request-id": "491fd349-8069-4e40-b3d5-272bd97c34a3" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json index b32430b29d6e..01411c8fc269 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "01528f23-26f6-4c7a-845d-998ea03da518" + "x-ms-client-request-id": "7686e804-4567-4c26-928f-c9d013166492" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Sun, 22 Jan 2023 10:00:45 GMT", - "mise-correlation-id": "56a3d7b0-77aa-49a6-ac6b-a7c3851934e5", + "Date": "Tue, 24 Jan 2023 04:45:14 GMT", + "mise-correlation-id": "2faf834f-6440-4918-bae5-0b708f124e69", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "285fa474-d836-4e53-8d35-e85576223f09" + "x-ms-correlation-request-id": "9aa24ed5-27eb-4903-8595-8201258b619a" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json index 0212c22e4179..3bb4eb885b9b 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "8549cd73-3897-4b22-ac5a-a6936187a0a2" + "x-ms-client-request-id": "51a38eca-cdbd-4112-9c4e-1dfe2abda588" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "669", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:44 GMT", - "mise-correlation-id": "78f77574-0c54-4128-abe9-eb28e902744b", + "Date": "Tue, 24 Jan 2023 04:45:13 GMT", + "mise-correlation-id": "46ededf5-d8ab-472b-8133-e6703311d7b7", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "340ae641-ef4a-439b-871c-3b7c39b65252" + "x-ms-correlation-request-id": "89c80cdb-7807-4fad-929e-28b38a4b5031" }, "ResponseBody": { "loadTestConfiguration": { @@ -35,7 +35,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:00:44.4351745", + "expireDateTime": "2023-01-24T05:45:13.7821044", "validationStatus": "VALIDATION_SUCCESS" }, "additionalFileInfo": [ @@ -43,7 +43,7 @@ "url": "https://storageurl.com/", "fileName": "additional-data.csv", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:00:44.4352771", + "expireDateTime": "2023-01-24T05:45:13.7822401", "validationStatus": "VALIDATION_NOT_REQUIRED" } ] @@ -51,8 +51,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-22T09:57:27.647Z", - "lastModifiedDateTime": "2023-01-22T10:00:43.513Z" + "createdDateTime": "2023-01-24T04:29:10.275Z", + "lastModifiedDateTime": "2023-01-24T04:45:12.855Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json index aaacb18a5b1b..bf25c4c57108 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ea8d2155-0d13-421f-9f10-561e96a732a5" + "x-ms-client-request-id": "77ed7435-d45f-4dd0-9ecf-968a23d6f386" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "563", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:45 GMT", - "mise-correlation-id": "d7d57624-f4fb-477c-ab1e-d74ca67d3fe1", + "Date": "Tue, 24 Jan 2023 04:45:14 GMT", + "mise-correlation-id": "9206d2da-db38-40c3-900c-2e2882ce4eb7", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "fac14121-a0f3-4fd5-8647-7503311b925b" + "x-ms-correlation-request-id": "c87be000-f8c8-4427-b6a3-b8c7f7626ecb" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-22T10:00:43.423Z", - "lastModifiedDateTime": "2023-01-22T10:00:43.423Z" + "createdDateTime": "2023-01-24T04:45:12.795Z", + "lastModifiedDateTime": "2023-01-24T04:45:12.795Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json index 5955c29999d3..0b8b69a7941f 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "2441cd00-3d1d-4f10-b0ee-0d3a8b994482" + "x-ms-client-request-id": "7a8d6f3b-a4c2-46aa-bbcb-a38ad84e260a" }, "RequestBody": null, "StatusCode": 200, @@ -18,17 +18,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:43 GMT", - "mise-correlation-id": "0fe042b6-21a9-434b-bae0-e0b0fd150b7d", + "Date": "Tue, 24 Jan 2023 04:45:13 GMT", + "mise-correlation-id": "28bad869-eda6-4f1d-9569-364e8f24f452", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d274580d-f269-4e1c-b489-c382f6d73a64" + "x-ms-correlation-request-id": "e4aed82b-1fc3-4fe3-8e35-16d1adae1a94" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T10:10:43.9695788", + "expireDateTime": "2023-01-24T04:55:13.3216731", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json index 3e5ff8c2429c..73175d6c4b7b 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "9bbaff0f-6538-473d-bfdc-bd954d71bfe4" + "x-ms-client-request-id": "5ce33e4d-ca0f-4c06-b37a-d5f3e21ccfe5" }, "RequestBody": "YSxiLGMsZAoxLDIsMyw0Cg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "192", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:32 GMT", + "Date": "Tue, 24 Jan 2023 04:45:03 GMT", "Location": "https://endpoint/tests/abc/files/additional-data.csv?api-version=2022-11-01", - "mise-correlation-id": "2bd64d80-5ae3-469c-b281-b2fc88436abb", + "mise-correlation-id": "9aa5515b-21cc-4e33-b5ef-581f35040941", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "937c7fd5-9ad2-47a6-99a7-96723752d39d" + "x-ms-correlation-request-id": "de7b68f0-c8bd-423c-9401-278e37295fe4" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "additional-data.csv", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T10:10:32.8630917", + "expireDateTime": "2023-01-24T04:55:03.7764101", "validationStatus": "VALIDATION_NOT_REQUIRED" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json index 58db1168128e..16f5896b9964 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?fileType=JMX_FILE\u0026api-version=2022-11-01", + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", "RequestMethod": "PUT", "RequestHeaders": { "Accept": "application/json", @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ab996edb-24d3-47e2-afd0-9bdc3a12f174" + "x-ms-client-request-id": "e63e9961-0839-4668-b719-afd44b9da00a" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 14:59:50 GMT", + "Date": "Tue, 24 Jan 2023 04:45:04 GMT", "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", - "mise-correlation-id": "69f8869d-98e1-4ecd-9814-956053fb3636", + "mise-correlation-id": "d795bd87-82a2-447c-b2ee-fd47dcd8081a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "72b75a4c-190b-451e-b82f-1e8471ecf678" + "x-ms-correlation-request-id": "e854804a-745e-4618-9dec-4375242c1c25" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:09:50.8399486", + "expireDateTime": "2023-01-24T04:55:04.3966631", "validationStatus": "VALIDATION_INITIATED" } }, @@ -44,7 +44,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "35ecab85-59a9-4a03-b52b-fed7d19809ae" + "x-ms-client-request-id": "aa1d066c-4455-4916-8124-043a0f5bc8e8" }, "RequestBody": null, "StatusCode": 200, @@ -53,17 +53,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 14:59:51 GMT", - "mise-correlation-id": "286a10c8-d2ba-471d-98c3-96fa364e067b", + "Date": "Tue, 24 Jan 2023 04:45:05 GMT", + "mise-correlation-id": "25198963-5f2e-4d7b-a9d2-0483feedb78a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "6ecc7bce-2431-410c-93c5-a62a3eefed07" + "x-ms-correlation-request-id": "7b3fe5a3-a726-44c7-a807-dc1660707b42" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:09:51.3068987", + "expireDateTime": "2023-01-24T04:55:05.0414444", "validationStatus": "VALIDATION_INITIATED" } }, @@ -76,7 +76,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7485404c-e334-4070-aa3b-d6e07bc7b4cb" + "x-ms-client-request-id": "76392ee1-0798-40e2-b429-8eb2abc17279" }, "RequestBody": null, "StatusCode": 200, @@ -85,17 +85,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 14:59:53 GMT", - "mise-correlation-id": "cb03d348-f29b-4478-83ec-1197b76389df", + "Date": "Tue, 24 Jan 2023 04:45:07 GMT", + "mise-correlation-id": "796370b9-eb3f-432d-97c9-d5e1aa8f03ad", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f0b4a654-2ccc-473b-b8ff-265b617ade13" + "x-ms-correlation-request-id": "cd09b555-7c64-4150-be61-71640ee55402" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:09:53.7098782", + "expireDateTime": "2023-01-24T04:55:07.4375319", "validationStatus": "VALIDATION_INITIATED" } }, @@ -108,7 +108,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "49f4b497-9ecc-4d82-ada2-3d6c029a0f2b" + "x-ms-client-request-id": "9f29d139-bbed-4281-825b-03c716fac30a" }, "RequestBody": null, "StatusCode": 200, @@ -117,17 +117,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 14:59:56 GMT", - "mise-correlation-id": "df405e0f-746c-4577-8c8b-73fa3320abfc", + "Date": "Tue, 24 Jan 2023 04:45:09 GMT", + "mise-correlation-id": "c10da02e-d748-468c-8fb0-52ce3146d3d4", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7c461241-2602-47c8-b567-bc514e753845" + "x-ms-correlation-request-id": "bc062c62-1927-46b4-ba54-73dba9df6054" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:09:56.0920764", + "expireDateTime": "2023-01-24T04:55:09.8540153", "validationStatus": "VALIDATION_INITIATED" } }, @@ -140,7 +140,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5f390065-470d-409d-83e2-ede137e767c9" + "x-ms-client-request-id": "61ffd0b8-4ffc-4a68-acc5-a2ccaeb02a0a" }, "RequestBody": null, "StatusCode": 200, @@ -149,17 +149,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Fri, 20 Jan 2023 14:59:58 GMT", - "mise-correlation-id": "3df2a330-98e9-433d-9815-a6dcb8aadf91", + "Date": "Tue, 24 Jan 2023 04:45:12 GMT", + "mise-correlation-id": "c25de1e7-8b4c-4370-b2ee-6250e3027b6b", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b859c435-a2a5-4715-90a6-dce27e0a8306" + "x-ms-correlation-request-id": "b0b579b1-929e-4b18-9569-29dc6c939e3d" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-20T15:09:58.5041289", + "expireDateTime": "2023-01-24T04:55:12.3046203", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json index 6e5222d86fee..a5bb916b332d 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "60", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "23e1c79f-38b8-44a2-b718-70c51281e34e" + "x-ms-client-request-id": "bd1208a1-721b-426d-90c3-65d7fdb4504b" }, "RequestBody": { "testId": "abc", @@ -22,14 +22,14 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1286", + "Content-Length": "1287", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:06 GMT", + "Date": "Tue, 24 Jan 2023 04:45:36 GMT", "Location": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "mise-correlation-id": "045a4d3a-1a2d-41eb-8487-8770d8d36198", + "mise-correlation-id": "11314e55-1e78-48b8-bfae-8d03a38b6f05", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b0593e91-1bfc-4d55-8044-a6a855b15fe8" + "x-ms-correlation-request-id": "15963d40-f143-4e0c-a317-9abda373bad7" }, "ResponseBody": { "loadTestConfiguration": { @@ -50,7 +50,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:05.767674", + "expireDateTime": "2023-01-24T05:45:35.0977217", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { @@ -69,10 +69,10 @@ "displayName": "sample123", "testId": "abc", "status": "ACCEPTED", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:06.635Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:36.856Z" } }, { @@ -84,7 +84,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "392142cc-96fa-4519-a512-c1b76ea8b0ca" + "x-ms-client-request-id": "58626759-fc82-4fcb-8ea8-7be99a24523a" }, "RequestBody": null, "StatusCode": 200, @@ -93,11 +93,11 @@ "Connection": "keep-alive", "Content-Length": "1350", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:07 GMT", - "mise-correlation-id": "0e53494e-bbd8-4582-9e14-ce49d3aec947", + "Date": "Tue, 24 Jan 2023 04:45:37 GMT", + "mise-correlation-id": "45210f02-c88e-4745-b817-6dca83230016", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "cc832390-ae8f-443d-b7ca-511f17511e9c" + "x-ms-correlation-request-id": "9e9bb722-a488-4d9f-a665-e19fd178db1e" }, "ResponseBody": { "loadTestConfiguration": { @@ -111,21 +111,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:07.0881538", + "expireDateTime": "2023-01-24T05:45:37.2499718", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:07.0880522", + "expireDateTime": "2023-01-24T05:45:37.2498714", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:07.0881768", + "expireDateTime": "2023-01-24T05:45:37.2499956", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -137,11 +137,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:07.011Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:37.211Z" } }, { @@ -153,20 +153,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "0d696f2e-a2aa-463a-a92c-2ac888e4f1a8" + "x-ms-client-request-id": "5763101f-919c-4168-9cf9-c7474db9feab" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1349", + "Content-Length": "1350", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:09 GMT", - "mise-correlation-id": "b4a1086c-352b-4344-870b-89b7a3901663", + "Date": "Tue, 24 Jan 2023 04:45:39 GMT", + "mise-correlation-id": "e51e4921-b590-4b16-af0e-43787a9e90ca", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "aae4ce28-52e6-40d8-a2fc-41163ef9b306" + "x-ms-correlation-request-id": "4c5ed63a-864e-45e5-b990-cec934446041" }, "ResponseBody": { "loadTestConfiguration": { @@ -180,21 +180,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:09.4524648", + "expireDateTime": "2023-01-24T05:45:39.6239037", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:09.452364", + "expireDateTime": "2023-01-24T05:45:39.6238043", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:09.4524868", + "expireDateTime": "2023-01-24T05:45:39.6239258", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -206,11 +206,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:07.011Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:37.211Z" } }, { @@ -222,7 +222,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "66a4c540-7d6f-4d0a-9ed1-95e6ff3a9501" + "x-ms-client-request-id": "b8d2cb02-6323-414c-9cba-ada928c6c376" }, "RequestBody": null, "StatusCode": 200, @@ -231,11 +231,11 @@ "Connection": "keep-alive", "Content-Length": "1350", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:11 GMT", - "mise-correlation-id": "f857396b-589a-4260-86dc-55bc9e38354b", + "Date": "Tue, 24 Jan 2023 04:45:41 GMT", + "mise-correlation-id": "bc76c40d-674c-4407-950f-fe7e7b70752a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c7fc6a2b-76d2-43bf-8abf-30790446d7d8" + "x-ms-correlation-request-id": "45bd115a-a2bc-4580-8e64-ab5ef80a93cf" }, "ResponseBody": { "loadTestConfiguration": { @@ -249,21 +249,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:11.8733009", + "expireDateTime": "2023-01-24T05:45:41.9892097", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:11.8729907", + "expireDateTime": "2023-01-24T05:45:41.9890845", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:11.8733365", + "expireDateTime": "2023-01-24T05:45:41.9892346", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -275,11 +275,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:07.011Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:37.211Z" } }, { @@ -291,7 +291,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "6ba0d21c-6057-4738-a145-d2de8e881b17" + "x-ms-client-request-id": "b40a2549-e8ac-4e6b-8928-3ecf0cc2d240" }, "RequestBody": null, "StatusCode": 200, @@ -300,11 +300,11 @@ "Connection": "keep-alive", "Content-Length": "1349", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:14 GMT", - "mise-correlation-id": "860d5710-e0f4-45cb-8564-1257b6955f51", + "Date": "Tue, 24 Jan 2023 04:45:44 GMT", + "mise-correlation-id": "5ee95503-16bb-4fef-b9f4-f103765cb105", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "eb686028-42bb-4b3e-9bf1-7619a8ed8b9f" + "x-ms-correlation-request-id": "5fb66f27-61ed-41cd-b541-ec10a08567c5" }, "ResponseBody": { "loadTestConfiguration": { @@ -318,21 +318,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:14.2991423", + "expireDateTime": "2023-01-24T05:45:44.4603246", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:14.2990404", + "expireDateTime": "2023-01-24T05:45:44.4602229", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:14.2991648", + "expireDateTime": "2023-01-24T05:45:44.4603467", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -344,11 +344,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONED", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:14.262Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:44.431Z" } }, { @@ -360,20 +360,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ef3b9715-36ba-4b66-ad5d-69a99832ef0a" + "x-ms-client-request-id": "c8336b9d-eb91-46d5-970e-e3c2af6ef7cb" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1348", + "Content-Length": "1349", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:16 GMT", - "mise-correlation-id": "835de479-1388-49c8-a831-4bb554e00065", + "Date": "Tue, 24 Jan 2023 04:45:46 GMT", + "mise-correlation-id": "f791f3e3-ac22-4cf6-b599-7fd55a9b09b0", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "28859ac3-d8d4-4b73-832f-379f5bc7a5e9" + "x-ms-correlation-request-id": "cbb8ea63-cb52-453d-8d8f-269b12057000" }, "ResponseBody": { "loadTestConfiguration": { @@ -387,21 +387,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:16.6900415", + "expireDateTime": "2023-01-24T05:45:46.8332468", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:16.689891", + "expireDateTime": "2023-01-24T05:45:46.8331476", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:16.6900854", + "expireDateTime": "2023-01-24T05:45:46.8332684", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -413,11 +413,11 @@ "displayName": "sample123", "testId": "abc", "status": "CONFIGURING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:14.408Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:44.509Z" } }, { @@ -429,20 +429,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "df873236-d7b9-4e5e-b2b2-d1dd2de5e63e" + "x-ms-client-request-id": "d10e6b42-ff26-4675-be1b-241db97ff827" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1349", + "Content-Length": "1348", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:19 GMT", - "mise-correlation-id": "ffdb055d-3fe8-4001-9c84-cd6c7e194874", + "Date": "Tue, 24 Jan 2023 04:45:49 GMT", + "mise-correlation-id": "e5f97a28-25b8-436c-8482-bafc702018fa", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "55c19928-5ac2-4f8d-9b87-3fe407921ea0" + "x-ms-correlation-request-id": "63bfd602-e0e4-4128-8e18-3ea428e98494" }, "ResponseBody": { "loadTestConfiguration": { @@ -456,21 +456,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:19.0903406", + "expireDateTime": "2023-01-24T05:45:49.2668773", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:19.0901416", + "expireDateTime": "2023-01-24T05:45:49.2667373", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:19.0903752", + "expireDateTime": "2023-01-24T05:45:49.266916", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -482,11 +482,11 @@ "displayName": "sample123", "testId": "abc", "status": "CONFIGURING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:14.408Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:44.509Z" } }, { @@ -498,7 +498,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "860c6153-c689-4907-8f4c-ffcd970ddd23" + "x-ms-client-request-id": "a4bf4e62-a482-4cda-ab76-ed99ecdfb850" }, "RequestBody": null, "StatusCode": 200, @@ -507,11 +507,11 @@ "Connection": "keep-alive", "Content-Length": "1349", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:21 GMT", - "mise-correlation-id": "4d727762-3fd4-4791-84ec-0c0a269ea954", + "Date": "Tue, 24 Jan 2023 04:45:51 GMT", + "mise-correlation-id": "9b2f6d9b-6a6c-45a0-a510-8545bf28c9d5", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "d67f5ec6-3080-44d4-8474-5324e5720b91" + "x-ms-correlation-request-id": "4dc5e9b4-380b-4305-ad39-cacfe63d7b5c" }, "ResponseBody": { "loadTestConfiguration": { @@ -525,21 +525,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:21.4426689", + "expireDateTime": "2023-01-24T05:45:51.6515598", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:21.4425481", + "expireDateTime": "2023-01-24T05:45:51.6514573", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:21.4427016", + "expireDateTime": "2023-01-24T05:45:51.6515816", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -551,11 +551,11 @@ "displayName": "sample123", "testId": "abc", "status": "CONFIGURING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:14.408Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:44.509Z" } }, { @@ -567,20 +567,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ffa1bf69-77a6-41d5-998e-ea216f28cba2" + "x-ms-client-request-id": "1d15ec86-a2ce-465e-a0bd-c4817d20636d" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1345", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:23 GMT", - "mise-correlation-id": "6300610d-4ecc-4080-80d3-69292a588bef", + "Date": "Tue, 24 Jan 2023 04:45:54 GMT", + "mise-correlation-id": "0be1bf31-fc64-431a-962a-925e2e14c6be", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a8d61f58-884e-4dda-b730-4a8a09276b2f" + "x-ms-correlation-request-id": "ded2f000-59bd-451e-b704-bd6a2f7c9867" }, "ResponseBody": { "loadTestConfiguration": { @@ -594,21 +594,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:23.8474231", + "expireDateTime": "2023-01-24T05:45:54.0408337", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:23.8473122", + "expireDateTime": "2023-01-24T05:45:54.04072", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:23.8474467", + "expireDateTime": "2023-01-24T05:45:54.0408564", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -620,11 +620,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" } }, { @@ -636,7 +636,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "9cf807c3-118f-4581-9689-9f293ed690bb" + "x-ms-client-request-id": "cedb64f2-ab9a-4a8b-82b5-09e82042f03f" }, "RequestBody": null, "StatusCode": 200, @@ -645,11 +645,11 @@ "Connection": "keep-alive", "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:26 GMT", - "mise-correlation-id": "12ffc7d3-7eef-404b-a012-0a7f6cdddfa1", + "Date": "Tue, 24 Jan 2023 04:45:56 GMT", + "mise-correlation-id": "48facd6e-5369-4671-bf2e-bbb548e90fe7", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4ac79038-d7af-472f-982d-93cccff77ac5" + "x-ms-correlation-request-id": "de2538ee-24dd-4b03-ac1c-bf39e95ff331" }, "ResponseBody": { "loadTestConfiguration": { @@ -663,21 +663,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:26.2184591", + "expireDateTime": "2023-01-24T05:45:56.4250023", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:26.2183611", + "expireDateTime": "2023-01-24T05:45:56.4248466", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:26.2184811", + "expireDateTime": "2023-01-24T05:45:56.4250254", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -689,11 +689,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" } }, { @@ -705,7 +705,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "f583ee6a-f942-4943-a3ff-dc5a88ce2805" + "x-ms-client-request-id": "4ce47903-a181-4d15-99e5-fbe9fbf24f33" }, "RequestBody": null, "StatusCode": 200, @@ -714,11 +714,11 @@ "Connection": "keep-alive", "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:28 GMT", - "mise-correlation-id": "8655eb88-a584-4de7-8edf-411d87c90fc9", + "Date": "Tue, 24 Jan 2023 04:45:58 GMT", + "mise-correlation-id": "874374dd-b8cc-4703-8a21-a0b83a946235", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "6bf28b29-c2f7-4393-8a91-cb2643b95663" + "x-ms-correlation-request-id": "37cafbd1-1e2a-4eeb-9139-2fc541b9fbc5" }, "ResponseBody": { "loadTestConfiguration": { @@ -732,21 +732,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:28.6367686", + "expireDateTime": "2023-01-24T05:45:58.789472", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:28.636654", + "expireDateTime": "2023-01-24T05:45:58.7893733", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:28.6367912", + "expireDateTime": "2023-01-24T05:45:58.7894956", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -758,11 +758,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" } }, { @@ -774,7 +774,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "d0f2d47d-c831-4e0e-964b-16cbcec244ae" + "x-ms-client-request-id": "ec5b3be0-190a-4daa-872a-31cc4df236e5" }, "RequestBody": null, "StatusCode": 200, @@ -783,11 +783,11 @@ "Connection": "keep-alive", "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:31 GMT", - "mise-correlation-id": "6cc26436-df5c-47cf-9a6a-03d0f8e2a15c", + "Date": "Tue, 24 Jan 2023 04:46:01 GMT", + "mise-correlation-id": "b83eb0c4-fd83-451d-9836-f4b970643cef", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2974cf27-928f-43d6-a8a6-cfffdbd980d3" + "x-ms-correlation-request-id": "ed9595b2-be10-43a4-8312-210e988c9323" }, "ResponseBody": { "loadTestConfiguration": { @@ -801,21 +801,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:31.0265722", + "expireDateTime": "2023-01-24T05:46:01.2224407", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:31.0264729", + "expireDateTime": "2023-01-24T05:46:01.2222698", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:31.0265941", + "expireDateTime": "2023-01-24T05:46:01.2224748", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -827,11 +827,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" } }, { @@ -843,20 +843,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "e4133205-638b-4ae4-8efd-74befd2b54d7" + "x-ms-client-request-id": "c3cc5d48-6109-4a47-a021-670950995973" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1346", + "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:33 GMT", - "mise-correlation-id": "3138c0f4-2ceb-4e00-bf13-85ea2578b40e", + "Date": "Tue, 24 Jan 2023 04:46:03 GMT", + "mise-correlation-id": "1c9b057a-3087-4d09-88dc-a9b76b20e1ca", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5bcf8cda-2602-4157-a09f-6478d3215c45" + "x-ms-correlation-request-id": "725373a1-a58a-4111-b5d4-732ef47b88c7" }, "ResponseBody": { "loadTestConfiguration": { @@ -870,21 +870,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:33.5889301", + "expireDateTime": "2023-01-24T05:46:03.6920444", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:33.5888293", + "expireDateTime": "2023-01-24T05:46:03.6919414", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:33.588953", + "expireDateTime": "2023-01-24T05:46:03.6920673", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -896,11 +896,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" } }, { @@ -912,7 +912,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "b7e630bd-c8c0-4d59-ba0e-647b762dd535" + "x-ms-client-request-id": "6dfb3934-5977-4f9c-a03a-afabd72cdbb8" }, "RequestBody": null, "StatusCode": 200, @@ -921,11 +921,11 @@ "Connection": "keep-alive", "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:35 GMT", - "mise-correlation-id": "8c20c5a1-ccf3-40f8-bb95-eb3f6ee9cac7", + "Date": "Tue, 24 Jan 2023 04:46:06 GMT", + "mise-correlation-id": "d0637888-1014-4be2-9993-1ab9402fd55f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f4b98803-9370-4db4-90eb-56530f94fa0f" + "x-ms-correlation-request-id": "a1905ef4-53bd-4ffc-ae32-f64e208298e3" }, "ResponseBody": { "loadTestConfiguration": { @@ -939,21 +939,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:35.9476599", + "expireDateTime": "2023-01-24T05:46:06.1339151", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:35.9475618", + "expireDateTime": "2023-01-24T05:46:06.1338106", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:35.9476812", + "expireDateTime": "2023-01-24T05:46:06.1339378", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -965,11 +965,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" } }, { @@ -981,7 +981,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "32958a2e-05a1-422b-9b7e-faa6ec3af395" + "x-ms-client-request-id": "1af19e51-7ab9-44ff-bd72-0ca231789a3e" }, "RequestBody": null, "StatusCode": 200, @@ -990,11 +990,11 @@ "Connection": "keep-alive", "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:38 GMT", - "mise-correlation-id": "59f5e5cb-2788-419b-acc2-71b5e77a2f75", + "Date": "Tue, 24 Jan 2023 04:46:08 GMT", + "mise-correlation-id": "a66d5506-b83d-4913-8f22-1661afa25137", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "eeb5cc30-ff6b-49e5-a04e-d01d5e4ec8c1" + "x-ms-correlation-request-id": "a1ff205c-3839-478c-ae50-57c7a35b9765" }, "ResponseBody": { "loadTestConfiguration": { @@ -1008,21 +1008,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:38.3666375", + "expireDateTime": "2023-01-24T05:46:08.5311241", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:38.3665348", + "expireDateTime": "2023-01-24T05:46:08.5310211", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:38.3666606", + "expireDateTime": "2023-01-24T05:46:08.5311479", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1034,11 +1034,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" } }, { @@ -1050,7 +1050,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "9abbbee5-67cb-4459-ad9c-137e4aa9b7da" + "x-ms-client-request-id": "ec2d1ba0-4390-4d3f-9d43-dcb72abfaa6d" }, "RequestBody": null, "StatusCode": 200, @@ -1059,11 +1059,11 @@ "Connection": "keep-alive", "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:40 GMT", - "mise-correlation-id": "7e6c0a84-b387-4890-8847-789b1a0ec25d", + "Date": "Tue, 24 Jan 2023 04:46:10 GMT", + "mise-correlation-id": "8b18ecc8-3b1d-4e0b-86fe-345f75d636c2", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "fa92d9f8-82b8-43ab-9c46-0164f3e1fee5" + "x-ms-correlation-request-id": "1d243ade-ed5f-487e-abcb-44cd151567cd" }, "ResponseBody": { "loadTestConfiguration": { @@ -1077,21 +1077,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:40.7281199", + "expireDateTime": "2023-01-24T05:46:10.9004086", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:40.7280165", + "expireDateTime": "2023-01-24T05:46:10.9003066", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:40.7281407", + "expireDateTime": "2023-01-24T05:46:10.9004309", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1103,11 +1103,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-22T10:01:06.757Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:22.562Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" } }, { @@ -1119,20 +1119,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a2dc0eed-d1ba-4a0a-8afb-96c5f0754404" + "x-ms-client-request-id": "4dd8f830-5494-4bf8-8f25-01de1efcfbb8" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1578", + "Content-Length": "1579", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:43 GMT", - "mise-correlation-id": "564ae078-222a-4842-a2ed-e48e517406dc", + "Date": "Tue, 24 Jan 2023 04:46:13 GMT", + "mise-correlation-id": "5cd77d86-708d-453f-b510-baae79aa9350", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a01c803f-7a55-4ffe-bac1-9fc836ecab06" + "x-ms-correlation-request-id": "5fd8e922-b37b-4787-af00-c3e0ba8ec892" }, "ResponseBody": { "loadTestConfiguration": { @@ -1146,21 +1146,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:43.1428887", + "expireDateTime": "2023-01-24T05:46:13.3118267", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:43.1427496", + "expireDateTime": "2023-01-24T05:46:13.3117207", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:43.142918", + "expireDateTime": "2023-01-24T05:46:13.3118481", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1170,7 +1170,7 @@ "url": "https://storageurl.com/", "fileName": "logs.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:43.1429467", + "expireDateTime": "2023-01-24T05:46:13.3118696", "validationStatus": "VALIDATION_NOT_REQUIRED" } } @@ -1180,12 +1180,12 @@ "displayName": "sample123", "testId": "abc", "status": "DONE", - "startDateTime": "2023-01-22T10:01:06.757Z", - "endDateTime": "2023-01-22T10:01:42.603Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "endDateTime": "2023-01-24T04:46:12.948Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:43.025Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:46:13.301Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json index 96e4f03662ee..f96b6f91a327 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "412", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "6d128832-b89d-4471-a8ee-7612cb61160f" + "x-ms-client-request-id": "d58a0aab-9ba8-47f5-9a74-10eb687d0c67" }, "RequestBody": { "components": { @@ -27,14 +27,14 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "568", + "Content-Length": "566", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:44 GMT", + "Date": "Tue, 24 Jan 2023 04:46:14 GMT", "Location": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", - "mise-correlation-id": "adaa4df2-f0bf-4ccf-b8d2-cceaea3d1dbd", + "mise-correlation-id": "c547b326-b1b8-4763-9d91-f621e46a89a9", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9a974977-7d4e-4b48-ab1f-cac1d3ab00d4" + "x-ms-correlation-request-id": "ce725733-6e41-4cb6-854a-f5e27aa25ed1" }, "ResponseBody": { "components": { @@ -47,8 +47,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-22T10:01:44.094Z", - "lastModifiedDateTime": "2023-01-22T10:01:44.094Z" + "createdDateTime": "2023-01-24T04:46:14.38Z", + "lastModifiedDateTime": "2023-01-24T04:46:14.38Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json index bcb0d3632a7f..16c49edeb6d8 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "1304aa2f-3aba-4851-adb8-95ec8a373d63" + "x-ms-client-request-id": "ca12c0dc-afe7-4a47-b510-86e60b6b762a" }, "RequestBody": { "displayName": "sample_test", @@ -27,12 +27,12 @@ "Connection": "keep-alive", "Content-Length": "289", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:47 GMT", + "Date": "Tue, 24 Jan 2023 04:45:16 GMT", "Location": "https://endpoint/tests/abc?api-version=2022-11-01", - "mise-correlation-id": "86ae97e6-d91c-4d1a-b4b2-523ff32f7aeb", + "mise-correlation-id": "bc2e6e06-770c-44c1-b58f-ee25ce1d2d89", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "66a946a5-15a6-4cc7-a8cd-f79bfd550d0b" + "x-ms-correlation-request-id": "31825575-1b0a-41c1-afd0-7366ae50a92e" }, "ResponseBody": { "loadTestConfiguration": { @@ -46,8 +46,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-22T10:00:47.373Z", - "lastModifiedDateTime": "2023-01-22T10:00:47.373Z" + "createdDateTime": "2023-01-24T04:45:16.676Z", + "lastModifiedDateTime": "2023-01-24T04:45:16.676Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json index c5e20c54bc00..1bb6343d7951 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "bd8bc4dd-64bf-4590-8d09-86fc2aee3715" + "x-ms-client-request-id": "bdc10933-d752-400c-8215-51644cf5a9ae" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Sun, 22 Jan 2023 10:01:45 GMT", - "mise-correlation-id": "ce9a827c-b156-4d91-8b26-acbe905c67b3", + "Date": "Tue, 24 Jan 2023 04:46:15 GMT", + "mise-correlation-id": "5125b40e-ff02-43ee-8e57-500a3a7ebd56", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "6e03fb1c-0f28-40a0-b2a2-3b96c3c8fe38" + "x-ms-correlation-request-id": "5a123690-796b-45b8-8f6b-95a37d573105" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json index b729a80a7942..057f812c8010 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a4f88324-ee9e-41de-bdc3-d4fc0168b968" + "x-ms-client-request-id": "7219e1b0-a4b7-465b-8743-932b8fb8165e" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1579", + "Content-Length": "1578", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:43 GMT", - "mise-correlation-id": "82dcfca9-bd94-4ff2-9ea7-20e41b974da5", + "Date": "Tue, 24 Jan 2023 04:46:13 GMT", + "mise-correlation-id": "a31308e6-2cf1-4505-aba5-14417deca692", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f3b8e284-2165-4286-9d2f-840ea2a362e0" + "x-ms-correlation-request-id": "3c1bafe6-7a9e-4a58-b363-5c1aeedd884c" }, "ResponseBody": { "loadTestConfiguration": { @@ -36,21 +36,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:43.6324655", + "expireDateTime": "2023-01-24T05:46:13.8669874", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:43.6323648", + "expireDateTime": "2023-01-24T05:46:13.8668854", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:43.6324868", + "expireDateTime": "2023-01-24T05:46:13.8670095", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -60,7 +60,7 @@ "url": "https://storageurl.com/", "fileName": "logs.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:43.6325083", + "expireDateTime": "2023-01-24T05:46:13.867032", "validationStatus": "VALIDATION_NOT_REQUIRED" } } @@ -70,12 +70,12 @@ "displayName": "sample123", "testId": "abc", "status": "DONE", - "startDateTime": "2023-01-22T10:01:06.757Z", - "endDateTime": "2023-01-22T10:01:42.603Z", - "executedDateTime": "2023-01-22T10:01:05.767Z", + "startDateTime": "2023-01-24T04:45:36.997Z", + "endDateTime": "2023-01-24T04:46:12.948Z", + "executedDateTime": "2023-01-24T04:45:35.099Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-22T10:01:06.635Z", - "lastModifiedDateTime": "2023-01-22T10:01:43.025Z" + "createdDateTime": "2023-01-24T04:45:36.856Z", + "lastModifiedDateTime": "2023-01-24T04:46:13.499Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json index 947a2e03fe95..9f85c3108c8b 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "feca4433-9425-4017-9cc2-97d87ca26cb5" + "x-ms-client-request-id": "56004997-9704-4d7e-b6ed-8d0c81d60b0f" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "568", + "Content-Length": "566", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:44 GMT", - "mise-correlation-id": "46738c0a-e42d-4bfb-a88e-5728c720a26f", + "Date": "Tue, 24 Jan 2023 04:46:14 GMT", + "mise-correlation-id": "51336adb-1866-4de9-afce-961eeb34dfe6", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a4aaa82e-324b-451e-87a7-817d30d95de4" + "x-ms-correlation-request-id": "84849a3e-65da-432f-8123-e9e2829f9a8c" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-22T10:01:44.094Z", - "lastModifiedDateTime": "2023-01-22T10:01:44.094Z" + "createdDateTime": "2023-01-24T04:46:14.38Z", + "lastModifiedDateTime": "2023-01-24T04:46:14.38Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json index aacf4029d0b2..3921326fc379 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "e32ea808-050d-4475-b7a5-8e83b9d22579" + "x-ms-client-request-id": "2ab4b126-8386-455a-a2ee-fee2a01c72c2" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "2077", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:45 GMT", - "mise-correlation-id": "4d4697dc-621b-40f7-a964-ef0af4af7484", + "Date": "Tue, 24 Jan 2023 04:46:15 GMT", + "mise-correlation-id": "566defea-2672-48ca-b5bd-a1463f961862", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "eef31ab0-c433-41e9-800c-e9be792b1a67" + "x-ms-correlation-request-id": "caf0326b-40e2-46b1-8846-c8bc149b2fd2" }, "ResponseBody": { "testRunId": "abcde", @@ -52,8 +52,8 @@ "resourceType": "microsoft.web/sites" } }, - "createdDateTime": "2023-01-22T10:01:44.152Z", - "lastModifiedDateTime": "2023-01-22T10:01:44.152Z" + "createdDateTime": "2023-01-24T04:46:14.397Z", + "lastModifiedDateTime": "2023-01-24T04:46:14.397Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json index 41f1dced04b4..2450ef3cf51f 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json @@ -11,7 +11,7 @@ "Content-Length": "60", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "2be89d88-f81c-4759-9fde-aaca79194795" + "x-ms-client-request-id": "401f077b-1c58-45de-a6fc-29c5d51ef9ce" }, "RequestBody": { "testId": "abc", @@ -22,14 +22,14 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1289", + "Content-Length": "1287", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:58 GMT", + "Date": "Tue, 24 Jan 2023 04:45:28 GMT", "Location": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", - "mise-correlation-id": "94604f61-dabf-4f49-8886-2cf5e0e93eac", + "mise-correlation-id": "8169c94c-3a9d-46c3-ac14-cc04399dfa9b", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "61709980-ce14-4ec1-84f3-ff7e7da3ffec" + "x-ms-correlation-request-id": "f51ae026-ee36-40b1-b2d7-f7054600bcea" }, "ResponseBody": { "loadTestConfiguration": { @@ -50,7 +50,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:00:57.4451411", + "expireDateTime": "2023-01-24T05:45:26.6808045", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { @@ -69,10 +69,10 @@ "displayName": "sample123", "testId": "abc", "status": "ACCEPTED", - "executedDateTime": "2023-01-22T10:00:57.445Z", + "executedDateTime": "2023-01-24T04:45:26.683Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-22T10:00:58.447Z", - "lastModifiedDateTime": "2023-01-22T10:00:58.447Z" + "createdDateTime": "2023-01-24T04:45:28.19Z", + "lastModifiedDateTime": "2023-01-24T04:45:28.19Z" } }, { @@ -84,7 +84,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "88b6f997-3e91-42b5-b6fe-334146677cd2" + "x-ms-client-request-id": "acf26c03-2956-4f47-b3aa-432d71929581" }, "RequestBody": null, "StatusCode": 404, @@ -93,11 +93,11 @@ "Connection": "keep-alive", "Content-Length": "99", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:58 GMT", - "mise-correlation-id": "c446384f-d8f1-44bb-93cd-18f0ac337f32", + "Date": "Tue, 24 Jan 2023 04:45:28 GMT", + "mise-correlation-id": "dbde731f-33bf-44ab-8c0f-d29fa22d91eb", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5a231032-83f8-4de0-b7af-46f53adbbb38" + "x-ms-correlation-request-id": "8bba7f6f-84c3-43b8-9dba-0c8c8e9f403b" }, "ResponseBody": { "error": { diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json index c77b0e4b7508..0221bfd7e469 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "60", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "dcc164ed-e0c1-431c-9742-934e9298a2c4" + "x-ms-client-request-id": "aad1c619-a170-4914-b7d8-e1bfc74fb580" }, "RequestBody": { "testId": "abc", @@ -22,13 +22,13 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1352", + "Content-Length": "1350", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:00 GMT", - "mise-correlation-id": "94aa3335-ffb6-40c5-a391-40c3554dd802", + "Date": "Tue, 24 Jan 2023 04:45:29 GMT", + "mise-correlation-id": "6de95233-aec3-4019-9d1c-9ed804ead104", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4b4e89ec-3e56-4755-b860-cc26f930fe09" + "x-ms-correlation-request-id": "fc7e3cb4-e77f-4c10-b2fd-ac1c560fa314" }, "ResponseBody": { "loadTestConfiguration": { @@ -42,21 +42,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:00:59.4679394", + "expireDateTime": "2023-01-24T05:45:29.1650869", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:00:59.4678292", + "expireDateTime": "2023-01-24T05:45:29.1649756", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:00:59.4679632", + "expireDateTime": "2023-01-24T05:45:29.165109", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -68,11 +68,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-22T10:00:58.865Z", - "executedDateTime": "2023-01-22T10:00:57.445Z", + "startDateTime": "2023-01-24T04:45:28.314Z", + "executedDateTime": "2023-01-24T04:45:26.683Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-22T10:00:58.447Z", - "lastModifiedDateTime": "2023-01-22T10:00:59.459Z" + "createdDateTime": "2023-01-24T04:45:28.19Z", + "lastModifiedDateTime": "2023-01-24T04:45:29.158Z" } }, { @@ -84,20 +84,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7d98316c-3270-40d2-8552-854febb9ff04" + "x-ms-client-request-id": "7544344c-35ee-411d-aa82-ef5d1edc9ee6" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1352", + "Content-Length": "1351", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:00 GMT", - "mise-correlation-id": "6c899d65-c594-44dc-8b85-d97ecc8db737", + "Date": "Tue, 24 Jan 2023 04:45:29 GMT", + "mise-correlation-id": "a0fc8c65-45af-41ba-9aef-c3eb54bb1d0d", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9a6cf444-c05d-4744-8e25-cf837a6ec835" + "x-ms-correlation-request-id": "1a987d0e-0710-489a-a7c4-a015dad2f423" }, "ResponseBody": { "loadTestConfiguration": { @@ -111,21 +111,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:00.4263251", + "expireDateTime": "2023-01-24T05:45:29.6565117", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:00.4261884", + "expireDateTime": "2023-01-24T05:45:29.6564095", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:00.4263591", + "expireDateTime": "2023-01-24T05:45:29.6565352", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -137,11 +137,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-22T10:00:58.865Z", - "executedDateTime": "2023-01-22T10:00:57.445Z", + "startDateTime": "2023-01-24T04:45:28.314Z", + "executedDateTime": "2023-01-24T04:45:26.683Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-22T10:00:58.447Z", - "lastModifiedDateTime": "2023-01-22T10:00:59.459Z" + "createdDateTime": "2023-01-24T04:45:28.19Z", + "lastModifiedDateTime": "2023-01-24T04:45:29.158Z" } }, { @@ -153,20 +153,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ca1bc1cf-85f9-4dce-b650-ab21c04a48ab" + "x-ms-client-request-id": "3a6da3fa-fb09-4d3e-8346-733dc33f35dc" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1350", + "Content-Length": "1351", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:02 GMT", - "mise-correlation-id": "6bc3e48f-c173-4c60-9cd3-e9ce26353866", + "Date": "Tue, 24 Jan 2023 04:45:32 GMT", + "mise-correlation-id": "801ca016-702d-424e-8853-17b3c4a03c28", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "999ec292-35af-449f-a750-6f9a3848f814" + "x-ms-correlation-request-id": "5c66b3c4-bb43-496f-a8bd-85516f377fdd" }, "ResponseBody": { "loadTestConfiguration": { @@ -180,21 +180,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:02.792512", + "expireDateTime": "2023-01-24T05:45:32.0618593", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:02.7923836", + "expireDateTime": "2023-01-24T05:45:32.0617547", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:02.792545", + "expireDateTime": "2023-01-24T05:45:32.0618837", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -206,11 +206,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-22T10:00:58.865Z", - "executedDateTime": "2023-01-22T10:00:57.445Z", + "startDateTime": "2023-01-24T04:45:28.314Z", + "executedDateTime": "2023-01-24T04:45:26.683Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-22T10:00:58.447Z", - "lastModifiedDateTime": "2023-01-22T10:00:59.459Z" + "createdDateTime": "2023-01-24T04:45:28.19Z", + "lastModifiedDateTime": "2023-01-24T04:45:29.158Z" } }, { @@ -222,7 +222,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "18f45bca-b292-4f0d-8611-bc8ce530609f" + "x-ms-client-request-id": "09719c61-2f25-43f8-9251-5f50782e3791" }, "RequestBody": null, "StatusCode": 200, @@ -231,11 +231,11 @@ "Connection": "keep-alive", "Content-Length": "1351", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:01:05 GMT", - "mise-correlation-id": "f8c6a8b2-b5a3-4dd5-acd3-2fdbfc00d5cb", + "Date": "Tue, 24 Jan 2023 04:45:34 GMT", + "mise-correlation-id": "7864caae-5e5d-4396-b757-d4b8343f3e61", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "41ee60e4-02fb-42f5-b706-17eacab66d76" + "x-ms-correlation-request-id": "2eeb5194-6f70-421a-9865-f257e3acd03f" }, "ResponseBody": { "loadTestConfiguration": { @@ -249,21 +249,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:05.3064904", + "expireDateTime": "2023-01-24T05:45:34.4972587", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T11:01:05.306384", + "expireDateTime": "2023-01-24T05:45:34.4971482", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-22T11:01:05.3065131", + "expireDateTime": "2023-01-24T05:45:34.4972885", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -275,11 +275,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-22T10:00:58.865Z", - "executedDateTime": "2023-01-22T10:00:57.445Z", + "startDateTime": "2023-01-24T04:45:28.314Z", + "executedDateTime": "2023-01-24T04:45:26.683Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-22T10:00:58.447Z", - "lastModifiedDateTime": "2023-01-22T10:00:59.459Z" + "createdDateTime": "2023-01-24T04:45:28.19Z", + "lastModifiedDateTime": "2023-01-24T04:45:29.158Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json index 7f9e1477bd9e..8a2ac5c97e2e 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c5fc9bfd-c8fe-49a5-8a55-4e537cfd2a5b" + "x-ms-client-request-id": "a0ca235b-3a09-4c23-a807-d529abb3f57a" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:49 GMT", + "Date": "Tue, 24 Jan 2023 04:45:18 GMT", "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", - "mise-correlation-id": "775223b8-c389-460c-8596-7ef7f372ce35", + "mise-correlation-id": "d32c79ac-660a-4a5c-a39c-26eb022a7c2e", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9e00010c-3182-428b-a5ef-455f55cb25ee" + "x-ms-correlation-request-id": "efaea1ae-f3cf-44d0-b0ab-93e28affa583" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T10:10:49.4580903", + "expireDateTime": "2023-01-24T04:55:18.3149886", "validationStatus": "VALIDATION_INITIATED" } }, @@ -44,7 +44,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "3bd25231-794f-4b49-8cc7-fd1bd1602479" + "x-ms-client-request-id": "db833e94-d2ff-4673-9434-48c87ca6d6e7" }, "RequestBody": null, "StatusCode": 200, @@ -53,17 +53,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:49 GMT", - "mise-correlation-id": "c287b385-6315-4be3-a034-e5fa1ebeae3c", + "Date": "Tue, 24 Jan 2023 04:45:18 GMT", + "mise-correlation-id": "51e1ab55-d8d2-41af-8042-e3b08a1674ab", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f168ce92-d7c9-4438-840f-14c341f74860" + "x-ms-correlation-request-id": "f1d444dc-2afc-444d-82ef-735571bfd269" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T10:10:49.8239473", + "expireDateTime": "2023-01-24T04:55:18.7422997", "validationStatus": "VALIDATION_INITIATED" } }, @@ -76,7 +76,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "0646cd55-966e-4a07-aa9d-10dd04a2fb3d" + "x-ms-client-request-id": "8ed9fe7e-10e5-4902-bca3-78f24b565397" }, "RequestBody": null, "StatusCode": 200, @@ -85,17 +85,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:52 GMT", - "mise-correlation-id": "fb477e8d-47f0-49c1-bb6e-cfccc4a433a9", + "Date": "Tue, 24 Jan 2023 04:45:21 GMT", + "mise-correlation-id": "1675eb19-148c-4741-ad38-6cfe3103175e", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "254ac00f-1b01-4040-89fd-1baf15cf05eb" + "x-ms-correlation-request-id": "b2fe942f-d9f3-48de-895a-fa5f9b38ce2a" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T10:10:52.2670343", + "expireDateTime": "2023-01-24T04:55:21.1955218", "validationStatus": "VALIDATION_INITIATED" } }, @@ -108,7 +108,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "4f58cf11-127d-4efc-a614-df5002c7b526" + "x-ms-client-request-id": "31eccfd0-75e3-494c-bb22-af2e6be67bdb" }, "RequestBody": null, "StatusCode": 200, @@ -117,17 +117,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:54 GMT", - "mise-correlation-id": "f05eba8e-dcf0-4ab8-b433-7a19234522d9", + "Date": "Tue, 24 Jan 2023 04:45:23 GMT", + "mise-correlation-id": "7b98f849-365e-4531-97a2-13cdc0172546", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "22b1752e-bd33-487a-aece-38da371384eb" + "x-ms-correlation-request-id": "92127ce0-21e8-4e7f-884a-1f394475dfb4" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T10:10:54.6544485", + "expireDateTime": "2023-01-24T04:55:23.8094385", "validationStatus": "VALIDATION_INITIATED" } }, @@ -140,7 +140,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "6f00555e-ce39-4722-b614-7ca39054b7c7" + "x-ms-client-request-id": "68f8baca-79ec-4f0d-96a9-8b84e60adc3a" }, "RequestBody": null, "StatusCode": 200, @@ -149,17 +149,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Sun, 22 Jan 2023 10:00:57 GMT", - "mise-correlation-id": "d7354708-5c59-4b0b-ace9-2c9d9e52b82f", + "Date": "Tue, 24 Jan 2023 04:45:26 GMT", + "mise-correlation-id": "25be5ad8-782e-4ac6-8ab6-f72b81c5fc24", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "99b012f6-afd8-4368-a89d-0d9ad7ec45ab" + "x-ms-correlation-request-id": "2c2a2c22-a805-45d5-9505-7b71b8a8fdcd" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-22T10:10:57.0061841", + "expireDateTime": "2023-01-24T04:55:26.1956912", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 990b5c7c84c4..80902ca50c6f 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -8,13 +8,11 @@ * @azsdk-weight 10 */ -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import AzureLoadTesting, { isUnexpected, getLongRunningPoller } from "@azure-rest/load-testing"; import { AbortController } from "@azure/abort-controller"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; -import { getFileValidationPoller } from "../src/getFileValidationPoller"; -import { getTestRunCompletionPoller } from "../src/getTestRunCompletionPoller"; const readStream = createReadStream("./sample.jmx"); @@ -59,7 +57,10 @@ async function main() { throw fileUploadResult.body.error; } - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); + if (!fileValidatePoller) { + throw new Error("Missing poller"); + } const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -110,7 +111,10 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); + if (!testRunPoller) { + throw new Error("Missing poller"); + } const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index 9b0f6c421dc5..fb7e3559080c 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -8,13 +8,11 @@ */ const AzureLoadTesting = require("@azure-rest/load-testing").default, - { isUnexpected } = require("@azure-rest/load-testing"); + { isUnexpected, getLongRunningPoller } = require("@azure-rest/load-testing"); const { AbortController } = require("@azure/abort-controller"); const { DefaultAzureCredential } = require("@azure/identity"); const { createReadStream } = require("fs"); const { v4: uuidv4 } = require("uuid"); -const { getFileValidationPoller } = require("../src/getFileValidationPoller"); -const { getTestRunCompletionPoller } = require("../src/getTestRunCompletionPoller"); const readStream = createReadStream("./sample.jmx"); @@ -59,7 +57,10 @@ async function main() { throw fileUploadResult.body.error; } - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); + if (!fileValidatePoller) { + throw new Error("Missing poller"); + } const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -111,7 +112,10 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); + if (!testRunPoller) { + throw new Error("Missing poller"); + } const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index b8488ce43c6b..54d912758fd2 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -7,13 +7,11 @@ * @summary creates and run a loadtest */ -import AzureLoadTesting, { isUnexpected } from "@azure-rest/load-testing"; +import AzureLoadTesting, { isUnexpected, getLongRunningPoller } from "@azure-rest/load-testing"; import { AbortController } from "@azure/abort-controller"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; import { v4 as uuidv4 } from "uuid"; -import { getFileValidationPoller } from "../src/getFileValidationPoller"; -import { getTestRunCompletionPoller } from "../src/getTestRunCompletionPoller"; const readStream = createReadStream("./sample.jmx"); @@ -58,7 +56,10 @@ async function main() { throw fileUploadResult.body.error; } - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); + if (!fileValidatePoller) { + throw new Error("Missing poller"); + } const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -109,7 +110,10 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); + if (!testRunPoller) { + throw new Error("Missing poller"); + } const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts index 0b557dcf1efc..448a789d7139 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts @@ -20,7 +20,7 @@ export async function getFileValidationPoller( fileUploadResult: TestUploadFile201Response, polledOperationOptions: PolledOperationOptions = {} ): Promise { - //get filename and testid from initial response + // get filename and testid from initial response const fileName = fileUploadResult.body.fileName; const requestUrl = fileUploadResult.request.url; const testId = requestUrl.substring( @@ -50,7 +50,7 @@ export async function getFileValidationPoller( } if (fileName) { - let fileValidationResponse = await client + const fileValidationResponse = await client .path("/tests/{testId}/files/{fileName}", testId, fileName) .get(); if (isUnexpected(fileValidationResponse)) { @@ -62,7 +62,7 @@ export async function getFileValidationPoller( state.status = "running"; } if (fileValidationResponse.body.validationStatus === "NOT_VALIDATED") { - if (fileValidationResponse.body.fileType == "JMX_FILE") { + if (fileValidationResponse.body.fileType === "JMX_FILE") { state.status = "running"; } else { state.status = "succeeded"; diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts index 8f9f5b26377e..f40af2d60ee8 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts @@ -3,7 +3,7 @@ import { AbortController, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; -import { TestRunStatusPoller, PolledOperationOptions } from "./models"; +import { TestRunCompletionPoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./clientDefinitions"; import { TestRunCreateOrUpdate200Response, @@ -23,7 +23,7 @@ export async function getTestRunCompletionPoller( client: AzureLoadTestingClient, createTestRunResponse: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response, polledOperationOptions: PolledOperationOptions = {} -): Promise { +): Promise { type Handler = (state: OperationState) => void; const state: OperationState = { @@ -48,7 +48,7 @@ export async function getTestRunCompletionPoller( } if (testRunId) { - let getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); + const getTestRunResult = await client.path("/test-runs/{testRunId}", testRunId).get(); if (isUnexpected(getTestRunResult)) { state.status = "failed"; state.error = new Error(getTestRunResult.body.error.message); @@ -61,7 +61,7 @@ export async function getTestRunCompletionPoller( } if (getTestRunResult.body.status === "CANCELLED") { - state.status === "canceled"; + state.status = "canceled"; } if (getTestRunResult.body.status === "DONE") { diff --git a/sdk/loadtestservice/load-testing-rest/src/index.ts b/sdk/loadtestservice/load-testing-rest/src/index.ts index 06ed6346272e..3dc576e82dcc 100644 --- a/sdk/loadtestservice/load-testing-rest/src/index.ts +++ b/sdk/loadtestservice/load-testing-rest/src/index.ts @@ -11,6 +11,5 @@ export * from "./isUnexpected"; export * from "./models"; export * from "./outputModels"; export * from "./paginateHelper"; -export { getFileValidationPoller } from "./getFileValidationPoller"; -export { getTestRunCompletionPoller } from "./getTestRunCompletionPoller"; +export { getLongRunningPoller } from "./pollingHelper"; export default AzureLoadTesting; diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 8b0df6d7e52c..4862c4269548 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -2,7 +2,13 @@ // Licensed under the MIT license. import { OperationState, SimplePollerLike } from "@azure/core-lro"; -import { TestGetFile200Response, TestRunGet200Response } from "./responses"; +import { + TestGetFile200Response, + TestRunCreateOrUpdate200Response, + TestRunCreateOrUpdate201Response, + TestRunGet200Response, + TestUploadFile201Response, +} from "./responses"; /** Load test model */ export interface Test { @@ -405,11 +411,17 @@ export type FileUploadAndValidatePoller = SimplePollerLike< TestGetFile200Response >; -export type TestRunStatusPoller = SimplePollerLike< +export type TestRunCompletionPoller = SimplePollerLike< OperationState, TestRunGet200Response >; +export type TestRunCompletionResponse = + | TestRunCreateOrUpdate200Response + | TestRunCreateOrUpdate201Response; + +export type FileValidationResponse = TestUploadFile201Response; + export interface PolledOperationOptions { /** * Time delay between poll requests, in milliseconds. diff --git a/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts new file mode 100644 index 000000000000..49f4f51f7084 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AzureLoadTestingClient } from "./clientDefinitions"; +import { getFileValidationPoller } from "./getFileValidationPoller"; +import { getTestRunCompletionPoller } from "./getTestRunCompletionPoller"; +import { + FileUploadAndValidatePoller, + FileValidationResponse, + TestRunCompletionPoller, + TestRunCompletionResponse, +} from "./models"; + +export async function getLongRunningPoller( + client: AzureLoadTestingClient, + initialResponse3: FileValidationResponse +): Promise; +export async function getLongRunningPoller( + client: AzureLoadTestingClient, + initialResponse2: TestRunCompletionResponse +): Promise; +export async function getLongRunningPoller( + client: AzureLoadTestingClient, + initialResponse: TestRunCompletionResponse | FileValidationResponse +): Promise { + if (isFileValidation(initialResponse)) { + return getFileValidationPoller(client, initialResponse); + } else if (isTestRunCompletion(initialResponse)) { + return getTestRunCompletionPoller(client, initialResponse); + } + return undefined; +} + +function isFileValidation(response: any): response is FileValidationResponse { + return response.request.url.includes("files"); +} + +function isTestRunCompletion(response: any): response is TestRunCompletionResponse { + return response.request.url.includes("test-runs"); +} diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts index 010bc80eb62a..11056c5b3799 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts @@ -5,10 +5,11 @@ import { assert } from "chai"; import { createClient, createRecorder } from "./utils/recordedClient"; import { Context } from "mocha"; import { AbortController } from "@azure/abort-controller"; -import { AzureLoadTestingClient, getFileValidationPoller, isUnexpected } from "../../src"; +import { AzureLoadTestingClient, isUnexpected } from "../../src"; import { env, isPlaybackMode, Recorder } from "@azure-tools/test-recorder"; import * as fs from "fs"; import { isNode } from "@azure/core-util"; +import { getLongRunningPoller } from "../../src/pollingHelper"; describe("Test Creation", () => { let recorder: Recorder; @@ -30,7 +31,7 @@ describe("Test Creation", () => { await recorder.stop(); }); - //patch/put + // patch/put it("should create a loadtest", async () => { const result = await client.path("/tests/{testId}", "abc").patch({ contentType: "application/merge-patch+json", @@ -61,7 +62,7 @@ describe("Test Creation", () => { assert.include(["201"], result.status); }); - it("should upload the test file with LRO(404)", async () => { + it("should upload the test file with LRO", async () => { const fileUploadResult = await client .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") .put({ @@ -73,7 +74,10 @@ describe("Test Creation", () => { throw fileUploadResult.body.error; } - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); + if (!fileValidatePoller) { + throw new Error("Missing poller"); + } await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -101,7 +105,7 @@ describe("Test Creation", () => { assert.include(["200", "201"], result.status); }); - //get + // get it("should get the test file", async () => { const result = await client.path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx").get(); @@ -120,7 +124,7 @@ describe("Test Creation", () => { assert.include(["200"], result.status); }); - //delete + // delete it("should delete the test file", async () => { const result = await client .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts index c189e7598010..2ec4c1969b72 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts @@ -7,13 +7,9 @@ import { createRecorder, createClient } from "./utils/recordedClient"; import { AbortController } from "@azure/abort-controller"; import { Context } from "mocha"; import * as fs from "fs"; -import { - AzureLoadTestingClient, - getFileValidationPoller, - getTestRunCompletionPoller, - isUnexpected, -} from "../../src"; +import { AzureLoadTestingClient, isUnexpected } from "../../src"; import { isNode } from "@azure/core-util"; +import { getLongRunningPoller } from "../../src/pollingHelper"; describe("Test Run Creation", () => { let recorder: Recorder; @@ -62,7 +58,10 @@ describe("Test Run Creation", () => { throw fileUploadResult.body.error; } - const fileValidatePoller = await getFileValidationPoller(client, fileUploadResult); + const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); + if (!fileValidatePoller) { + throw new Error("Missing poller"); + } await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -84,7 +83,10 @@ describe("Test Run Creation", () => { } testRunCreationResult.body.testRunId = "adjwfjsdmf"; - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); + if (!testRunPoller) { + throw new Error("Missing poller"); + } await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -106,7 +108,10 @@ describe("Test Run Creation", () => { throw testRunCreationResult.body.error; } - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); + if (!testRunPoller) { + throw new Error("Missing poller"); + } await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(5000), // timeout of 5 seconds }); @@ -128,7 +133,10 @@ describe("Test Run Creation", () => { throw testRunCreationResult.body.error; } - const testRunPoller = await getTestRunCompletionPoller(client, testRunCreationResult); + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); + if (!testRunPoller) { + throw new Error("Missing poller"); + } await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); From 990f2f0198ba06ba1681adae2a9a420952db0964 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Tue, 24 Jan 2023 10:42:25 +0530 Subject: [PATCH 50/60] Ran API extractor again --- .../review/load-testing.api.md | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md index 75f3cd6e5978..296d3b33a2ab 100644 --- a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md +++ b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md @@ -133,11 +133,17 @@ export interface FileInfoOutput { // @public export type FileUploadAndValidatePoller = SimplePollerLike, TestGetFile200Response>; +// @public (undocumented) +export type FileValidationResponse = TestUploadFile201Response; + // @public export type GetArrayType = T extends Array ? TData : never; -// @public -export function getFileValidationPoller(client: AzureLoadTestingClient, fileUploadResult: TestUploadFile201Response, polledOperationOptions?: PolledOperationOptions): Promise; +// @public (undocumented) +export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse3: FileValidationResponse): Promise; + +// @public (undocumented) +export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse2: TestRunCompletionResponse): Promise; // @public export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ @@ -145,9 +151,6 @@ export type GetPage = (pageLink: string, maxPageSize?: number) => Promise nextPageLink?: string; }>; -// @public -export function getTestRunCompletionPoller(client: AzureLoadTestingClient, createTestRunResponse: TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response, polledOperationOptions?: PolledOperationOptions): Promise; - // @public (undocumented) export function isUnexpected(response: TestCreateOrUpdate200Response | TestCreateOrUpdate201Response | TestCreateOrUpdateDefaultResponse): response is TestCreateOrUpdateDefaultResponse; @@ -959,6 +962,12 @@ export interface TestRunArtifactsOutput { outputArtifacts?: TestRunOutputArtifactsOutput; } +// @public (undocumented) +export type TestRunCompletionPoller = SimplePollerLike, TestRunGet200Response>; + +// @public (undocumented) +export type TestRunCompletionResponse = TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response; + // @public export interface TestRunCreateOrUpdate200Response extends HttpResponse { // (undocumented) @@ -1600,9 +1609,6 @@ export interface TestRunStatisticsOutput { transaction?: string; } -// @public (undocumented) -export type TestRunStatusPoller = SimplePollerLike, TestRunGet200Response>; - // @public (undocumented) export interface TestRunStop { post(options?: TestRunStopParameters): StreamableMethod; From d60e8533142ebbe55a7da19642e58abd8a4bacc8 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Tue, 24 Jan 2023 12:50:26 +0530 Subject: [PATCH 51/60] Running empty tests --- sdk/loadtestservice/load-testing-rest/karma.conf.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdk/loadtestservice/load-testing-rest/karma.conf.js b/sdk/loadtestservice/load-testing-rest/karma.conf.js index 2664494e4228..71ccaa76a8a6 100644 --- a/sdk/loadtestservice/load-testing-rest/karma.conf.js +++ b/sdk/loadtestservice/load-testing-rest/karma.conf.js @@ -16,6 +16,8 @@ module.exports = function (config) { // available frameworks: https://npmjs.org/browse/keyword/karma-adapter frameworks: ["source-map-support", "mocha"], + failOnEmptyTestSuite: false, + plugins: [ "karma-mocha", "karma-mocha-reporter", From 0f1ee4d7efe1c59b8d4b5af0a11a2a9fd0efa8fe Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Tue, 24 Jan 2023 21:41:23 +0530 Subject: [PATCH 52/60] Review Comments LRO Helper --- .../load-testing-rest/src/models.ts | 4 ++-- .../load-testing-rest/src/pollingHelper.ts | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/src/models.ts b/sdk/loadtestservice/load-testing-rest/src/models.ts index 4862c4269548..3e412088d625 100644 --- a/sdk/loadtestservice/load-testing-rest/src/models.ts +++ b/sdk/loadtestservice/load-testing-rest/src/models.ts @@ -416,11 +416,11 @@ export type TestRunCompletionPoller = SimplePollerLike< TestRunGet200Response >; -export type TestRunCompletionResponse = +export type TestRunCreateOrUpdateSuccessResponse = | TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response; -export type FileValidationResponse = TestUploadFile201Response; +export type TestUploadFileSuccessResponse = TestUploadFile201Response; export interface PolledOperationOptions { /** diff --git a/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts index 49f4f51f7084..60a2f07bf118 100644 --- a/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts +++ b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts @@ -6,35 +6,35 @@ import { getFileValidationPoller } from "./getFileValidationPoller"; import { getTestRunCompletionPoller } from "./getTestRunCompletionPoller"; import { FileUploadAndValidatePoller, - FileValidationResponse, + TestUploadFileSuccessResponse, TestRunCompletionPoller, - TestRunCompletionResponse, + TestRunCreateOrUpdateSuccessResponse, } from "./models"; export async function getLongRunningPoller( client: AzureLoadTestingClient, - initialResponse3: FileValidationResponse + initialResponse: TestUploadFileSuccessResponse ): Promise; export async function getLongRunningPoller( client: AzureLoadTestingClient, - initialResponse2: TestRunCompletionResponse + initialResponse: TestRunCreateOrUpdateSuccessResponse ): Promise; export async function getLongRunningPoller( client: AzureLoadTestingClient, - initialResponse: TestRunCompletionResponse | FileValidationResponse + initialResponse: TestRunCreateOrUpdateSuccessResponse | TestUploadFileSuccessResponse ): Promise { - if (isFileValidation(initialResponse)) { + if (isFileUpload(initialResponse)) { return getFileValidationPoller(client, initialResponse); - } else if (isTestRunCompletion(initialResponse)) { + } else if (isTestRunCreation(initialResponse)) { return getTestRunCompletionPoller(client, initialResponse); } return undefined; } -function isFileValidation(response: any): response is FileValidationResponse { - return response.request.url.includes("files"); +function isFileUpload(response: any): response is TestUploadFileSuccessResponse { + return response.request.url.includes("/files/"); } -function isTestRunCompletion(response: any): response is TestRunCompletionResponse { - return response.request.url.includes("test-runs"); +function isTestRunCreation(response: any): response is TestRunCreateOrUpdateSuccessResponse { + return response.request.url.includes("/test-runs/"); } From ebfc296e3967bd79446666bba8e8c9f64232326e Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Tue, 24 Jan 2023 22:43:26 +0530 Subject: [PATCH 53/60] New API review --- .../load-testing-rest/review/load-testing.api.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md index 296d3b33a2ab..c734d10dd1b1 100644 --- a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md +++ b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md @@ -133,17 +133,14 @@ export interface FileInfoOutput { // @public export type FileUploadAndValidatePoller = SimplePollerLike, TestGetFile200Response>; -// @public (undocumented) -export type FileValidationResponse = TestUploadFile201Response; - // @public export type GetArrayType = T extends Array ? TData : never; // @public (undocumented) -export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse3: FileValidationResponse): Promise; +export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestUploadFileSuccessResponse): Promise; // @public (undocumented) -export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse2: TestRunCompletionResponse): Promise; +export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestRunCreateOrUpdateSuccessResponse): Promise; // @public export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ @@ -965,9 +962,6 @@ export interface TestRunArtifactsOutput { // @public (undocumented) export type TestRunCompletionPoller = SimplePollerLike, TestRunGet200Response>; -// @public (undocumented) -export type TestRunCompletionResponse = TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response; - // @public export interface TestRunCreateOrUpdate200Response extends HttpResponse { // (undocumented) @@ -1123,6 +1117,9 @@ export interface TestRunCreateOrUpdateServerMetricsConfigMediaTypesParam { // @public (undocumented) export type TestRunCreateOrUpdateServerMetricsConfigParameters = TestRunCreateOrUpdateServerMetricsConfigMediaTypesParam & TestRunCreateOrUpdateServerMetricsConfigBodyParam & RequestParameters; +// @public (undocumented) +export type TestRunCreateOrUpdateSuccessResponse = TestRunCreateOrUpdate200Response | TestRunCreateOrUpdate201Response; + // @public (undocumented) export interface TestRunDelete { delete(options?: TestRunDeleteParameters): StreamableMethod; @@ -1720,6 +1717,9 @@ export interface TestUploadFileQueryParamProperties { fileType?: "JMX_FILE" | "USER_PROPERTIES" | "ADDITIONAL_ARTIFACTS"; } +// @public (undocumented) +export type TestUploadFileSuccessResponse = TestUploadFile201Response; + // @public export interface TimeSeriesElementOutput { data?: Array; From c6efca63e7ca031620f25d25682c00f727b8b4bd Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 25 Jan 2023 01:35:31 +0530 Subject: [PATCH 54/60] LRO helper refactoring --- .../src/getFileValidationPoller.ts | 43 ++++++++++--------- .../src/getTestRunCompletionPoller.ts | 5 +-- .../load-testing-rest/src/pollingHelper.ts | 8 ++-- 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts index 448a789d7139..e0f631170ac3 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts @@ -42,9 +42,8 @@ export async function getFileValidationPoller( const currentPollIntervalInMs = polledOperationOptions.updateIntervalInMs ?? 2000; const poller: SimplePollerLike, TestGetFile200Response> = { - async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { - if (_options?.abortSignal?.aborted) { - state.status = "canceled"; + async poll(options?: { abortSignal?: AbortSignalLike }): Promise { + if (options?.abortSignal?.aborted) { state.error = new Error("The operation was aborted."); return; } @@ -58,26 +57,30 @@ export async function getFileValidationPoller( state.error = new Error(fileValidationResponse.body.error.message); return; } - if (fileValidationResponse.body.validationStatus === "VALIDATION_INITIATED") { - state.status = "running"; - } - if (fileValidationResponse.body.validationStatus === "NOT_VALIDATED") { - if (fileValidationResponse.body.fileType === "JMX_FILE") { + + switch (fileValidationResponse.body.validationStatus) { + case "NOT_VALIDATED": { + if (fileValidationResponse.body.fileType === "JMX_FILE") { + state.status = "running"; + } else { + state.status = "succeeded"; + } + break; + } + case "VALIDATION_INITIATED": { state.status = "running"; - } else { + break; + } + case "VALIDATION_SUCCESS": + case "VALIDATION_NOT_REQUIRED": { state.status = "succeeded"; + break; + } + case "VALIDATION_FAILURE": { + state.status = "failed"; + state.error = new Error(fileValidationResponse.body.validationStatus); + break; } - } - if ( - fileValidationResponse.body.validationStatus === "VALIDATION_SUCCESS" || - fileValidationResponse.body.validationStatus === "VALIDATION_NOT_REQUIRED" - ) { - state.status = "succeeded"; - } - - if (fileValidationResponse.body.validationStatus === "VALIDATION_FAILURE") { - state.status = "failed"; - state.error = new Error(fileValidationResponse.body.validationStatus); } state.result = fileValidationResponse; diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts index f40af2d60ee8..d841c8222454 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts @@ -40,9 +40,8 @@ export async function getTestRunCompletionPoller( const testRunId = createTestRunResponse.body.testRunId; const poller: SimplePollerLike, TestRunGet200Response> = { - async poll(_options?: { abortSignal?: AbortSignalLike }): Promise { - if (_options?.abortSignal?.aborted) { - state.status = "canceled"; + async poll(options?: { abortSignal?: AbortSignalLike }): Promise { + if (options?.abortSignal?.aborted) { state.error = new Error("The operation was aborted."); return; } diff --git a/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts index 60a2f07bf118..cbd1726a4c84 100644 --- a/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts +++ b/sdk/loadtestservice/load-testing-rest/src/pollingHelper.ts @@ -14,21 +14,21 @@ import { export async function getLongRunningPoller( client: AzureLoadTestingClient, initialResponse: TestUploadFileSuccessResponse -): Promise; +): Promise; export async function getLongRunningPoller( client: AzureLoadTestingClient, initialResponse: TestRunCreateOrUpdateSuccessResponse -): Promise; +): Promise; export async function getLongRunningPoller( client: AzureLoadTestingClient, initialResponse: TestRunCreateOrUpdateSuccessResponse | TestUploadFileSuccessResponse -): Promise { +): Promise { if (isFileUpload(initialResponse)) { return getFileValidationPoller(client, initialResponse); } else if (isTestRunCreation(initialResponse)) { return getTestRunCompletionPoller(client, initialResponse); } - return undefined; + throw new Error("The Operation is not a long running operation."); } function isFileUpload(response: any): response is TestUploadFileSuccessResponse { From af8fcd85e997f069aebbf9f04a121f3dc0e6fd93 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 25 Jan 2023 02:06:16 +0530 Subject: [PATCH 55/60] Updated Samples and Readme --- .../load-testing-rest/README.md | 53 ++++++++++++------- .../load-testing-rest/samples-dev/sample.ts | 6 --- .../samples/v1-beta/javascript/sample.js | 6 --- .../samples/v1-beta/typescript/src/sample.ts | 6 --- .../src/getFileValidationPoller.ts | 4 +- .../src/getTestRunCompletionPoller.ts | 2 +- 6 files changed, 36 insertions(+), 41 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/README.md b/sdk/loadtestservice/load-testing-rest/README.md index 5f162cc2b906..7ebd7558558e 100644 --- a/sdk/loadtestservice/load-testing-rest/README.md +++ b/sdk/loadtestservice/load-testing-rest/README.md @@ -135,24 +135,27 @@ const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzu var TEST_ID = "some-test-id"; const readStream = createReadStream("./sample.jmx"); -const fileUploadPoller = await beginUploadTestFile(client, testId, "sample.jmx", { - queryParameters: { - fileType: "JMX_FILE", - }, - contentType: "application/octet-stream", - body: readStream, -}); -const fileUploadResult = await fileUploadPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds -}); +const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", TEST_ID, "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; + } + + const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); + const fileValidateResult = await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); if (fileUploadPoller.getOperationState().status != "succeeded") throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + - fileUploadResult + fileValidateResult.body.validationFailureDetails ); - -console.log(fileUploadResult); ``` ### Running a Test @@ -165,19 +168,28 @@ const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzu var TEST_ID = "some-test-id"; var DISPLAY_NAME = "my-load-test"; +var TEST_RUN_ID = "some-test-run-id"; // Creating/Updating the test run -const testRunPoller = await beginCreateOrUpdateTestRun(client, testRunId, { + const testRunCreationResult = await client.path("/test-runs/{testRunId}", TEST_RUN_ID).patch({ contentType: "application/merge-patch+json", body: { - testId: testId, - displayName: displayName, - virtualUsers: 10, + testId: TEST_ID, + displayName: DISPLAY_NAME, }, }); -const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds -}); + + if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; + } + + if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); + + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); + const testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) throw new Error("There is some issue in running the test, Error Response : " + testRunResult); @@ -231,6 +243,7 @@ if (testRunId) { console.log(metricsResult); console.log(testRunResult); +} ``` ## Troubleshooting diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 80902ca50c6f..48a2e9055d53 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -58,9 +58,6 @@ async function main() { } const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - if (!fileValidatePoller) { - throw new Error("Missing poller"); - } const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -112,9 +109,6 @@ async function main() { throw new Error("Test Run ID returned as undefined."); const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - if (!testRunPoller) { - throw new Error("Missing poller"); - } const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index fb7e3559080c..3065a96138d4 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -58,9 +58,6 @@ async function main() { } const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - if (!fileValidatePoller) { - throw new Error("Missing poller"); - } const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -113,9 +110,6 @@ async function main() { throw new Error("Test Run ID returned as undefined."); const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - if (!testRunPoller) { - throw new Error("Missing poller"); - } const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index 54d912758fd2..ce57acceefb4 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -57,9 +57,6 @@ async function main() { } const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - if (!fileValidatePoller) { - throw new Error("Missing poller"); - } const fileValidateResult = await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -111,9 +108,6 @@ async function main() { throw new Error("Test Run ID returned as undefined."); const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - if (!testRunPoller) { - throw new Error("Missing poller"); - } const testRunResult = await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts index e0f631170ac3..2410a1c034dd 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts @@ -44,7 +44,7 @@ export async function getFileValidationPoller( const poller: SimplePollerLike, TestGetFile200Response> = { async poll(options?: { abortSignal?: AbortSignalLike }): Promise { if (options?.abortSignal?.aborted) { - state.error = new Error("The operation was aborted."); + state.error = new Error("The polling was aborted."); return; } @@ -78,7 +78,7 @@ export async function getFileValidationPoller( } case "VALIDATION_FAILURE": { state.status = "failed"; - state.error = new Error(fileValidationResponse.body.validationStatus); + state.error = new Error(fileValidationResponse.body.validationFailureDetails); break; } } diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts index d841c8222454..76b5e1da9521 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts @@ -42,7 +42,7 @@ export async function getTestRunCompletionPoller( const poller: SimplePollerLike, TestRunGet200Response> = { async poll(options?: { abortSignal?: AbortSignalLike }): Promise { if (options?.abortSignal?.aborted) { - state.error = new Error("The operation was aborted."); + state.error = new Error("The polling was aborted."); return; } From f5d59dd30cc9636ec133a4d4770bb361ccc63df4 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 25 Jan 2023 17:18:00 +0530 Subject: [PATCH 56/60] Throw Error when Abort --- ..._upload_the_test_file_with_lrotimeout.json | 4 + .../recording_should_delete_the_test.json | 4 + .../recording_should_create_a_loadtest.json | 24 +- ...ding_should_create_the_app_components.json | 12 +- .../recording_should_delete_the_test.json | 8 +- ...recording_should_delete_the_test_file.json | 8 +- .../recording_should_get_the_test.json | 16 +- ...ng_should_get_the_test_app_components.json | 12 +- .../recording_should_get_the_test_file.json | 10 +- ..._upload_the_test_file_with_lrotimeout.json | 72 +++ ...pload_the_additional_file_without_lro.json | 10 +- ..._should_upload_the_test_file_with_lro.json | 50 +- ...g_should_be_able_to_create_a_test_run.json | 490 +++++++----------- ...d_create_a_app_component_for_test_run.json | 14 +- .../recording_should_create_a_loadtest.json | 12 +- .../recording_should_delete_a_test_run.json | 8 +- .../recording_should_delete_the_test.json | 29 ++ .../recording_should_get_a_test_run.json | 28 +- ..._should_get_a_test_run_app_components.json | 14 +- ..._get_a_test_run_server_metrics_config.json | 12 +- ...d_not_be_able_to_create_a_test_run404.json | 138 ++++- ...recording_should_timeout_the_test_run.json | 202 ++------ ..._should_upload_the_test_file_with_lro.json | 50 +- .../load-testing-rest/samples-dev/sample.ts | 21 +- .../samples/v1-beta/javascript/sample.js | 21 +- .../samples/v1-beta/typescript/src/sample.ts | 21 +- .../src/getFileValidationPoller.ts | 11 +- .../src/getTestRunCompletionPoller.ts | 11 +- .../load-testing-rest/src/util/LROUtil.ts | 4 +- .../test/public/testAdministration.spec.ts | 28 +- .../test/public/testRun.spec.ts | 47 +- 31 files changed, 676 insertions(+), 715 deletions(-) create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_not_upload_the_test_file_with_lrotimeout.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_the_test.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_not_upload_the_test_file_with_lrotimeout.json create mode 100644 sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_the_test.json diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_not_upload_the_test_file_with_lrotimeout.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_not_upload_the_test_file_with_lrotimeout.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_creation/recording_should_not_upload_the_test_file_with_lrotimeout.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_the_test.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/browsers/test_run_creation/recording_should_delete_the_test.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json index a80de4d3aff1..32e632bfd1f7 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cb2e7aba-bf18-4774-8c16-10f6e90910d2" + "x-ms-client-request-id": "e1e4f0c6-b151-4586-a155-f9cfb0f9aeca" }, "RequestBody": { "displayName": "sample_test", @@ -21,17 +21,18 @@ "splitAllCSVs": false } }, - "StatusCode": 200, + "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "476", + "Content-Length": "289", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:03 GMT", - "mise-correlation-id": "91e9d238-1de4-4da9-8ed4-45827504a1ef", + "Date": "Wed, 25 Jan 2023 11:38:58 GMT", + "Location": "https://endpoint/tests/abc?api-version=2022-11-01", + "mise-correlation-id": "ee1f6c32-6785-4f55-8995-d304c712a33a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b523987c-ef18-43f0-8742-95afceac704a" + "x-ms-correlation-request-id": "0465d8eb-2e5d-411b-b876-4e323878e3af" }, "ResponseBody": { "loadTestConfiguration": { @@ -40,20 +41,13 @@ "quickStartTest": false }, "inputArtifacts": { - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "sample.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:03.077528", - "validationStatus": "VALIDATION_SUCCESS" - }, "additionalFileInfo": [] }, "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-24T04:29:10.275Z", - "lastModifiedDateTime": "2023-01-24T04:45:03.071Z" + "createdDateTime": "2023-01-25T11:38:58.651Z", + "lastModifiedDateTime": "2023-01-25T11:38:58.651Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json index 320ca7d44333..9021eb274935 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_create_the_app_components.json @@ -11,7 +11,7 @@ "Content-Length": "427", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "e260bc37-91dd-4763-b3d9-0f1d8ff6efec" + "x-ms-client-request-id": "8b2544ac-559d-4a11-9b35-65914ea2a773" }, "RequestBody": { "testId": "abc", @@ -30,12 +30,12 @@ "Connection": "keep-alive", "Content-Length": "563", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:12 GMT", + "Date": "Wed, 25 Jan 2023 11:39:11 GMT", "Location": "https://endpoint/tests/abc/app-components?api-version=2022-11-01", - "mise-correlation-id": "9508b4ca-cc51-4b2d-aedb-18b8d0664956", + "mise-correlation-id": "25f127b7-32f6-467c-aa81-b224f6689050", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "0310df60-11df-4315-b5ba-efda08139302" + "x-ms-correlation-request-id": "61513fce-36f0-4e82-958a-50f19e562656" }, "ResponseBody": { "components": { @@ -48,8 +48,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-24T04:45:12.795Z", - "lastModifiedDateTime": "2023-01-24T04:45:12.795Z" + "createdDateTime": "2023-01-25T11:39:11.268Z", + "lastModifiedDateTime": "2023-01-25T11:39:11.268Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json index 8031f788b02b..14fc8099132f 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "803fda50-a1c8-48a3-a2a9-0e2198c3e554" + "x-ms-client-request-id": "d1160c33-d8e6-4f79-bc85-48dd42c265b2" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Tue, 24 Jan 2023 04:45:15 GMT", - "mise-correlation-id": "01c0a75b-41cb-4dfc-a0b5-c3f08a6444ea", + "Date": "Wed, 25 Jan 2023 11:39:14 GMT", + "mise-correlation-id": "3fcf9ffb-460e-4fc2-bc1d-e00567fef785", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "491fd349-8069-4e40-b3d5-272bd97c34a3" + "x-ms-correlation-request-id": "c9518998-4eff-4a41-a535-2428f2abb923" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json index 01411c8fc269..caac9fc9bc08 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_delete_the_test_file.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7686e804-4567-4c26-928f-c9d013166492" + "x-ms-client-request-id": "410d2b7c-f0a0-468a-b638-6e2ff0ec5b74" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Tue, 24 Jan 2023 04:45:14 GMT", - "mise-correlation-id": "2faf834f-6440-4918-bae5-0b708f124e69", + "Date": "Wed, 25 Jan 2023 11:39:13 GMT", + "mise-correlation-id": "d413e775-7305-4826-9369-e666ec022904", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9aa24ed5-27eb-4903-8595-8201258b619a" + "x-ms-correlation-request-id": "5797d72b-5c75-49cf-a467-f5ef10c255fb" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json index 3bb4eb885b9b..fda218a4c059 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "51a38eca-cdbd-4112-9c4e-1dfe2abda588" + "x-ms-client-request-id": "c3b5d25f-febb-48fd-8a50-b0b4ec052e1c" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "669", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:13 GMT", - "mise-correlation-id": "46ededf5-d8ab-472b-8133-e6703311d7b7", + "Date": "Wed, 25 Jan 2023 11:39:12 GMT", + "mise-correlation-id": "f91952fd-e3cf-4baf-aba6-9017ebf69943", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "89c80cdb-7807-4fad-929e-28b38a4b5031" + "x-ms-correlation-request-id": "b9a27b07-68e0-4444-93d0-3d99a7c80334" }, "ResponseBody": { "loadTestConfiguration": { @@ -35,7 +35,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:13.7821044", + "expireDateTime": "2023-01-25T12:39:12.2375066", "validationStatus": "VALIDATION_SUCCESS" }, "additionalFileInfo": [ @@ -43,7 +43,7 @@ "url": "https://storageurl.com/", "fileName": "additional-data.csv", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:13.7822401", + "expireDateTime": "2023-01-25T12:39:12.2376094", "validationStatus": "VALIDATION_NOT_REQUIRED" } ] @@ -51,8 +51,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-24T04:29:10.275Z", - "lastModifiedDateTime": "2023-01-24T04:45:12.855Z" + "createdDateTime": "2023-01-25T11:38:58.651Z", + "lastModifiedDateTime": "2023-01-25T11:39:11.294Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json index bf25c4c57108..be5a00013de9 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_app_components.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "77ed7435-d45f-4dd0-9ecf-968a23d6f386" + "x-ms-client-request-id": "9f4437ba-7b8b-459e-ac66-422b6d447805" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "563", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:14 GMT", - "mise-correlation-id": "9206d2da-db38-40c3-900c-2e2882ce4eb7", + "Date": "Wed, 25 Jan 2023 11:39:12 GMT", + "mise-correlation-id": "7819b5b5-bd06-435d-b011-f0743cd81d01", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "c87be000-f8c8-4427-b6a3-b8c7f7626ecb" + "x-ms-correlation-request-id": "bddf8703-8850-4487-949a-e71bb391ce46" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testId": "abc", - "createdDateTime": "2023-01-24T04:45:12.795Z", - "lastModifiedDateTime": "2023-01-24T04:45:12.795Z" + "createdDateTime": "2023-01-25T11:39:11.268Z", + "lastModifiedDateTime": "2023-01-25T11:39:11.268Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json index 0b8b69a7941f..d1f82c24db46 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_get_the_test_file.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7a8d6f3b-a4c2-46aa-bbcb-a38ad84e260a" + "x-ms-client-request-id": "92e9791f-3e9f-4c5d-918c-41c0c213a8b5" }, "RequestBody": null, "StatusCode": 200, @@ -18,17 +18,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:13 GMT", - "mise-correlation-id": "28bad869-eda6-4f1d-9569-364e8f24f452", + "Date": "Wed, 25 Jan 2023 11:39:11 GMT", + "mise-correlation-id": "e00ffaef-638b-49b0-b769-46218619a5bb", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e4aed82b-1fc3-4fe3-8e35-16d1adae1a94" + "x-ms-correlation-request-id": "7c03dc75-778a-43cb-a424-997cd96b7692" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:13.3216731", + "expireDateTime": "2023-01-25T11:49:11.7813573", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_not_upload_the_test_file_with_lrotimeout.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_not_upload_the_test_file_with_lrotimeout.json new file mode 100644 index 000000000000..f4fecdb64e99 --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_not_upload_the_test_file_with_lrotimeout.json @@ -0,0 +1,72 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "Content-Type": "application/octet-stream", + "Transfer-Encoding": "chunked", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "e1ee5729-ea40-498f-a0aa-34ba1ceefca7" + }, + "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 25 Jan 2023 11:39:01 GMT", + "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "mise-correlation-id": "919a7fd5-4602-4aef-a6b5-c18c4c52226f", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "ca196831-3dc4-4649-b2bc-c5d4e98b8588" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-25T11:49:01.9186569", + "validationStatus": "VALIDATION_INITIATED" + } + }, + { + "RequestUri": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "94bbfedf-3e0e-404b-9f8d-fb2e24346fa4" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Content-Length": "168", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 25 Jan 2023 11:39:02 GMT", + "mise-correlation-id": "1e593c29-e6ee-4f26-9b4f-32b2dfe9c73f", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2f0ea9c4-74ba-4a1a-b4a7-bd688170bb39" + }, + "ResponseBody": { + "url": "https://storageurl.com/", + "fileName": "sample.jmx", + "fileType": "JMX_FILE", + "expireDateTime": "2023-01-25T11:49:02.4438915", + "validationStatus": "VALIDATION_INITIATED" + } + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json index 73175d6c4b7b..6f4e8f0ddefe 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_additional_file_without_lro.json @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5ce33e4d-ca0f-4c06-b37a-d5f3e21ccfe5" + "x-ms-client-request-id": "f3e73c21-b442-4d55-82f8-1cb12dcb4075" }, "RequestBody": "YSxiLGMsZAoxLDIsMyw0Cg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "192", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:03 GMT", + "Date": "Wed, 25 Jan 2023 11:38:59 GMT", "Location": "https://endpoint/tests/abc/files/additional-data.csv?api-version=2022-11-01", - "mise-correlation-id": "9aa5515b-21cc-4e33-b5ef-581f35040941", + "mise-correlation-id": "829b51fe-c176-4746-8a21-a3ccbd112103", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "de7b68f0-c8bd-423c-9401-278e37295fe4" + "x-ms-correlation-request-id": "99a28cc3-56ae-4638-ad7e-fa159a9dbe7a" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "additional-data.csv", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T04:55:03.7764101", + "expireDateTime": "2023-01-25T11:48:59.4754889", "validationStatus": "VALIDATION_NOT_REQUIRED" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json index 16f5896b9964..e637b7e48b3d 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_creation/recording_should_upload_the_test_file_with_lro.json @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "e63e9961-0839-4668-b719-afd44b9da00a" + "x-ms-client-request-id": "e31d4115-a330-48a9-9535-2d5167730dde" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:04 GMT", + "Date": "Wed, 25 Jan 2023 11:39:03 GMT", "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", - "mise-correlation-id": "d795bd87-82a2-447c-b2ee-fd47dcd8081a", + "mise-correlation-id": "0f1f0190-1240-4b20-a07e-c70a059822b6", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "e854804a-745e-4618-9dec-4375242c1c25" + "x-ms-correlation-request-id": "0f8e49dc-7dc9-4d69-9d7d-43afb2860a0e" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:04.3966631", + "expireDateTime": "2023-01-25T11:49:03.0272787", "validationStatus": "VALIDATION_INITIATED" } }, @@ -44,7 +44,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "aa1d066c-4455-4916-8124-043a0f5bc8e8" + "x-ms-client-request-id": "59704f33-eaaf-4102-9b75-78c0ab2401a4" }, "RequestBody": null, "StatusCode": 200, @@ -53,17 +53,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:05 GMT", - "mise-correlation-id": "25198963-5f2e-4d7b-a9d2-0483feedb78a", + "Date": "Wed, 25 Jan 2023 11:39:03 GMT", + "mise-correlation-id": "fe469d44-913f-4676-825e-d576fcf14156", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "7b3fe5a3-a726-44c7-a807-dc1660707b42" + "x-ms-correlation-request-id": "d0090a9a-1a5d-40ce-bcbb-ef11a25ed0c3" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:05.0414444", + "expireDateTime": "2023-01-25T11:49:03.4556419", "validationStatus": "VALIDATION_INITIATED" } }, @@ -76,7 +76,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "76392ee1-0798-40e2-b429-8eb2abc17279" + "x-ms-client-request-id": "4733407f-a0b7-4f19-af07-01c77d1bb5db" }, "RequestBody": null, "StatusCode": 200, @@ -85,17 +85,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:07 GMT", - "mise-correlation-id": "796370b9-eb3f-432d-97c9-d5e1aa8f03ad", + "Date": "Wed, 25 Jan 2023 11:39:05 GMT", + "mise-correlation-id": "94b75bf8-2add-4aaa-b8f6-f4d146a69a3a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "cd09b555-7c64-4150-be61-71640ee55402" + "x-ms-correlation-request-id": "c0fd2cad-a1da-49ca-ac3d-fe5e40746785" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:07.4375319", + "expireDateTime": "2023-01-25T11:49:05.9458689", "validationStatus": "VALIDATION_INITIATED" } }, @@ -108,7 +108,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "9f29d139-bbed-4281-825b-03c716fac30a" + "x-ms-client-request-id": "09eb528f-9e06-44b8-a968-58e21f50af5b" }, "RequestBody": null, "StatusCode": 200, @@ -117,17 +117,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:09 GMT", - "mise-correlation-id": "c10da02e-d748-468c-8fb0-52ce3146d3d4", + "Date": "Wed, 25 Jan 2023 11:39:08 GMT", + "mise-correlation-id": "faf5e2d6-3558-4919-b8be-d83684482776", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "bc062c62-1927-46b4-ba54-73dba9df6054" + "x-ms-correlation-request-id": "f7e06c35-b02a-4f7b-a9a4-98d5ec905977" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:09.8540153", + "expireDateTime": "2023-01-25T11:49:08.3284099", "validationStatus": "VALIDATION_INITIATED" } }, @@ -140,7 +140,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "61ffd0b8-4ffc-4a68-acc5-a2ccaeb02a0a" + "x-ms-client-request-id": "80edaab7-5bec-4735-ba10-df5ad72d8b46" }, "RequestBody": null, "StatusCode": 200, @@ -149,17 +149,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:12 GMT", - "mise-correlation-id": "c25de1e7-8b4c-4370-b2ee-6250e3027b6b", + "Date": "Wed, 25 Jan 2023 11:39:10 GMT", + "mise-correlation-id": "721614b0-896c-427f-9c3f-9dab17ffbfc1", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b0b579b1-929e-4b18-9569-29dc6c939e3d" + "x-ms-correlation-request-id": "bfc78f24-2093-4b69-8fe6-a35534eafe2d" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:12.3046203", + "expireDateTime": "2023-01-25T11:49:10.7829935", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json index a5bb916b332d..ba1ea65382ed 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_be_able_to_create_a_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "60", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "bd1208a1-721b-426d-90c3-65d7fdb4504b" + "x-ms-client-request-id": "19b1c1b3-e533-47df-96ed-18ab560a0a68" }, "RequestBody": { "testId": "abc", @@ -24,12 +24,12 @@ "Connection": "keep-alive", "Content-Length": "1287", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:36 GMT", + "Date": "Wed, 25 Jan 2023 11:39:28 GMT", "Location": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "mise-correlation-id": "11314e55-1e78-48b8-bfae-8d03a38b6f05", + "mise-correlation-id": "ff295f72-be14-4855-b10a-833995a503cf", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "15963d40-f143-4e0c-a317-9abda373bad7" + "x-ms-correlation-request-id": "eae20eda-2aff-4ddf-94c7-3a43c2fb383a" }, "ResponseBody": { "loadTestConfiguration": { @@ -50,7 +50,7 @@ "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:35.0977217", + "expireDateTime": "2023-01-25T12:39:27.2353894", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { @@ -69,10 +69,10 @@ "displayName": "sample123", "testId": "abc", "status": "ACCEPTED", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:36.856Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:28.062Z" } }, { @@ -84,20 +84,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "58626759-fc82-4fcb-8ea8-7be99a24523a" + "x-ms-client-request-id": "37f8219f-8773-4df7-83cc-1a75d62cf906" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1350", + "Content-Length": "1349", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:37 GMT", - "mise-correlation-id": "45210f02-c88e-4745-b817-6dca83230016", + "Date": "Wed, 25 Jan 2023 11:39:28 GMT", + "mise-correlation-id": "5ca0c605-41c6-4cac-978e-669895192091", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "9e9bb722-a488-4d9f-a665-e19fd178db1e" + "x-ms-correlation-request-id": "879a9d54-f6c7-4bed-94ae-caf58c791523" }, "ResponseBody": { "loadTestConfiguration": { @@ -111,21 +111,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:37.2499718", + "expireDateTime": "2023-01-25T12:39:28.5370968", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:37.2498714", + "expireDateTime": "2023-01-25T12:39:28.5369896", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:37.2499956", + "expireDateTime": "2023-01-25T12:39:28.5371191", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -137,11 +137,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:37.211Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:28.353Z" } }, { @@ -153,20 +153,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "5763101f-919c-4168-9cf9-c7474db9feab" + "x-ms-client-request-id": "bdc17532-39f5-4653-b997-c9b93b6fb442" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1350", + "Content-Length": "1349", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:39 GMT", - "mise-correlation-id": "e51e4921-b590-4b16-af0e-43787a9e90ca", + "Date": "Wed, 25 Jan 2023 11:39:32 GMT", + "mise-correlation-id": "4bc80721-1739-4e64-9d41-fcd5abcd20ed", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4c5ed63a-864e-45e5-b990-cec934446041" + "x-ms-correlation-request-id": "a2c3416d-1108-426d-8bf4-b2debecc71f2" }, "ResponseBody": { "loadTestConfiguration": { @@ -180,21 +180,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:39.6239037", + "expireDateTime": "2023-01-25T12:39:32.0313892", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:39.6238043", + "expireDateTime": "2023-01-25T12:39:32.0312569", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:39.6239258", + "expireDateTime": "2023-01-25T12:39:32.0314206", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -206,11 +206,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:37.211Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:28.353Z" } }, { @@ -222,20 +222,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "b8d2cb02-6323-414c-9cba-ada928c6c376" + "x-ms-client-request-id": "a682dfea-639e-4c2c-ad36-cea371e51d7e" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1350", + "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:41 GMT", - "mise-correlation-id": "bc76c40d-674c-4407-950f-fe7e7b70752a", + "Date": "Wed, 25 Jan 2023 11:39:37 GMT", + "mise-correlation-id": "97f72ada-e6cf-4217-a59b-136b220caf27", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "45bd115a-a2bc-4580-8e64-ab5ef80a93cf" + "x-ms-correlation-request-id": "41eb4899-8802-44a0-bb2d-3dda6a4dced4" }, "ResponseBody": { "loadTestConfiguration": { @@ -249,21 +249,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:41.9892097", + "expireDateTime": "2023-01-25T12:39:37.2170228", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:41.9890845", + "expireDateTime": "2023-01-25T12:39:37.216917", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:41.9892346", + "expireDateTime": "2023-01-25T12:39:37.217054", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -275,11 +275,11 @@ "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:37.211Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:28.353Z" } }, { @@ -291,89 +291,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "b40a2549-e8ac-4e6b-8928-3ecf0cc2d240" + "x-ms-client-request-id": "72ad8bef-1611-45db-a802-a3be152b7fa5" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1349", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:44 GMT", - "mise-correlation-id": "5ee95503-16bb-4fef-b9f4-f103765cb105", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5fb66f27-61ed-41cd-b541-ec10a08567c5" - }, - "ResponseBody": { - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false, - "quickStartTest": false - }, - "testArtifacts": { - "inputArtifacts": { - "configFileInfo": { - "url": "https://storageurl.com/", - "fileName": "config.yaml", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:44.4603246", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "sample.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:44.4602229", - "validationStatus": "VALIDATION_SUCCESS" - }, - "inputArtifactsZipFileInfo": { - "url": "https://storageurl.com/", - "fileName": "inputartifacts.zip", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:44.4603467", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "additionalFileInfo": [] - }, - "outputArtifacts": {} - }, - "testResult": "NOT_APPLICABLE", - "testRunId": "abcde", - "displayName": "sample123", - "testId": "abc", - "status": "PROVISIONED", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:44.431Z" - } - }, - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c8336b9d-eb91-46d5-970e-e3c2af6ef7cb" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "1349", + "Content-Length": "1347", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:46 GMT", - "mise-correlation-id": "f791f3e3-ac22-4cf6-b599-7fd55a9b09b0", + "Date": "Wed, 25 Jan 2023 11:39:39 GMT", + "mise-correlation-id": "149ddd02-7efd-406d-9028-164d61828736", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "cbb8ea63-cb52-453d-8d8f-269b12057000" + "x-ms-correlation-request-id": "0a91efc8-b234-4a62-aea0-4b62b9e0b749" }, "ResponseBody": { "loadTestConfiguration": { @@ -387,21 +318,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:46.8332468", + "expireDateTime": "2023-01-25T12:39:39.6647803", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:46.8331476", + "expireDateTime": "2023-01-25T12:39:39.664654", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:46.8332684", + "expireDateTime": "2023-01-25T12:39:39.6648044", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -413,11 +344,11 @@ "displayName": "sample123", "testId": "abc", "status": "CONFIGURING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:44.509Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:36.823Z" } }, { @@ -429,7 +360,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "d10e6b42-ff26-4675-be1b-241db97ff827" + "x-ms-client-request-id": "3ba6a171-1124-468f-9dc4-045823c82d00" }, "RequestBody": null, "StatusCode": 200, @@ -438,11 +369,11 @@ "Connection": "keep-alive", "Content-Length": "1348", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:49 GMT", - "mise-correlation-id": "e5f97a28-25b8-436c-8482-bafc702018fa", + "Date": "Wed, 25 Jan 2023 11:39:43 GMT", + "mise-correlation-id": "861bf1d7-0272-42dc-a249-f21da5e8c55b", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "63bfd602-e0e4-4128-8e18-3ea428e98494" + "x-ms-correlation-request-id": "c953479b-28a0-49bc-ba75-fe7a711082f6" }, "ResponseBody": { "loadTestConfiguration": { @@ -456,21 +387,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:49.2668773", + "expireDateTime": "2023-01-25T12:39:43.0278118", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:49.2667373", + "expireDateTime": "2023-01-25T12:39:43.0277027", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:49.266916", + "expireDateTime": "2023-01-25T12:39:43.0278335", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -482,11 +413,11 @@ "displayName": "sample123", "testId": "abc", "status": "CONFIGURING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:44.509Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:36.823Z" } }, { @@ -498,89 +429,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a4bf4e62-a482-4cda-ab76-ed99ecdfb850" + "x-ms-client-request-id": "57de5585-6207-4704-a6bb-eca7cf582181" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1349", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:51 GMT", - "mise-correlation-id": "9b2f6d9b-6a6c-45a0-a510-8545bf28c9d5", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "4dc5e9b4-380b-4305-ad39-cacfe63d7b5c" - }, - "ResponseBody": { - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false, - "quickStartTest": false - }, - "testArtifacts": { - "inputArtifacts": { - "configFileInfo": { - "url": "https://storageurl.com/", - "fileName": "config.yaml", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:51.6515598", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "sample.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:51.6514573", - "validationStatus": "VALIDATION_SUCCESS" - }, - "inputArtifactsZipFileInfo": { - "url": "https://storageurl.com/", - "fileName": "inputartifacts.zip", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:51.6515816", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "additionalFileInfo": [] - }, - "outputArtifacts": {} - }, - "testResult": "NOT_APPLICABLE", - "testRunId": "abcde", - "displayName": "sample123", - "testId": "abc", - "status": "CONFIGURING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:44.509Z" - } - }, - { - "RequestUri": "https://endpoint/test-runs/abcde?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "1d15ec86-a2ce-465e-a0bd-c4817d20636d" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "1345", + "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:54 GMT", - "mise-correlation-id": "0be1bf31-fc64-431a-962a-925e2e14c6be", + "Date": "Wed, 25 Jan 2023 11:39:45 GMT", + "mise-correlation-id": "013cdfb9-1359-4dfb-996d-18268d436ff8", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ded2f000-59bd-451e-b704-bd6a2f7c9867" + "x-ms-correlation-request-id": "42d821f1-3ced-4292-bdbd-b641dd34ab63" }, "ResponseBody": { "loadTestConfiguration": { @@ -594,21 +456,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:54.0408337", + "expireDateTime": "2023-01-25T12:39:45.4989762", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:54.04072", + "expireDateTime": "2023-01-25T12:39:45.4988697", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:54.0408564", + "expireDateTime": "2023-01-25T12:39:45.4989985", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -620,11 +482,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:45.218Z" } }, { @@ -636,20 +498,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "cedb64f2-ab9a-4a8b-82b5-09e82042f03f" + "x-ms-client-request-id": "fa6f48b1-94a2-49b7-945c-d824d368e68f" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1344", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:56 GMT", - "mise-correlation-id": "48facd6e-5369-4671-bf2e-bbb548e90fe7", + "Date": "Wed, 25 Jan 2023 11:39:47 GMT", + "mise-correlation-id": "caac7554-9e6c-489d-a0ca-c6d78ba8636b", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "de2538ee-24dd-4b03-ac1c-bf39e95ff331" + "x-ms-correlation-request-id": "d9e6d0c9-5d89-40a1-80ca-416e7aa993b6" }, "ResponseBody": { "loadTestConfiguration": { @@ -663,21 +525,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:56.4250023", + "expireDateTime": "2023-01-25T12:39:47.9202384", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:56.4248466", + "expireDateTime": "2023-01-25T12:39:47.9201202", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:56.4250254", + "expireDateTime": "2023-01-25T12:39:47.92026", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -689,11 +551,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:45.218Z" } }, { @@ -705,7 +567,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "4ce47903-a181-4d15-99e5-fbe9fbf24f33" + "x-ms-client-request-id": "a349c368-d6ae-4a26-9c1e-4efd1c7656f7" }, "RequestBody": null, "StatusCode": 200, @@ -714,11 +576,11 @@ "Connection": "keep-alive", "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:58 GMT", - "mise-correlation-id": "874374dd-b8cc-4703-8a21-a0b83a946235", + "Date": "Wed, 25 Jan 2023 11:39:50 GMT", + "mise-correlation-id": "cd0327e8-3be4-4649-959d-eff5cc3adbc1", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "37cafbd1-1e2a-4eeb-9139-2fc541b9fbc5" + "x-ms-correlation-request-id": "ca9a99d0-0c8c-46a6-9d6c-5434d6922882" }, "ResponseBody": { "loadTestConfiguration": { @@ -732,21 +594,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:58.789472", + "expireDateTime": "2023-01-25T12:39:50.3389368", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:58.7893733", + "expireDateTime": "2023-01-25T12:39:50.3388312", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:58.7894956", + "expireDateTime": "2023-01-25T12:39:50.3389614", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -758,11 +620,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:45.218Z" } }, { @@ -774,20 +636,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ec5b3be0-190a-4daa-872a-31cc4df236e5" + "x-ms-client-request-id": "52c30873-ae5f-44c0-a961-56365dea157b" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1345", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:01 GMT", - "mise-correlation-id": "b83eb0c4-fd83-451d-9836-f4b970643cef", + "Date": "Wed, 25 Jan 2023 11:39:52 GMT", + "mise-correlation-id": "2e8cb6c9-c618-4510-92dd-e98b84b5dfd5", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ed9595b2-be10-43a4-8312-210e988c9323" + "x-ms-correlation-request-id": "bf8e3db9-45ec-4bce-97c8-c1f28d99e0e6" }, "ResponseBody": { "loadTestConfiguration": { @@ -801,21 +663,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:01.2224407", + "expireDateTime": "2023-01-25T12:39:52.8668091", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:46:01.2222698", + "expireDateTime": "2023-01-25T12:39:52.8667109", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:01.2224748", + "expireDateTime": "2023-01-25T12:39:52.866833", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -827,11 +689,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:45.218Z" } }, { @@ -843,20 +705,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "c3cc5d48-6109-4a47-a021-670950995973" + "x-ms-client-request-id": "63fdd62b-70aa-4d3e-becb-e705891569a6" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:03 GMT", - "mise-correlation-id": "1c9b057a-3087-4d09-88dc-a9b76b20e1ca", + "Date": "Wed, 25 Jan 2023 11:39:55 GMT", + "mise-correlation-id": "f9e9af38-05a5-456c-9ed8-9a53827b82e6", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "725373a1-a58a-4111-b5d4-732ef47b88c7" + "x-ms-correlation-request-id": "10bfad3b-8779-4692-b46f-1ac4ee6f6c1d" }, "ResponseBody": { "loadTestConfiguration": { @@ -870,21 +732,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:03.6920444", + "expireDateTime": "2023-01-25T12:39:55.3391171", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:46:03.6919414", + "expireDateTime": "2023-01-25T12:39:55.3389797", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:03.6920673", + "expireDateTime": "2023-01-25T12:39:55.3391529", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -896,11 +758,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:45.218Z" } }, { @@ -912,20 +774,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "6dfb3934-5977-4f9c-a03a-afabd72cdbb8" + "x-ms-client-request-id": "c58c3cb3-dd12-4435-93f1-0ff72a7b070c" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:06 GMT", - "mise-correlation-id": "d0637888-1014-4be2-9993-1ab9402fd55f", + "Date": "Wed, 25 Jan 2023 11:39:57 GMT", + "mise-correlation-id": "29a4dffa-2b79-49b0-8fe1-e2d1eae35680", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a1905ef4-53bd-4ffc-ae32-f64e208298e3" + "x-ms-correlation-request-id": "1817e761-b50a-47e9-955c-a465269f67ee" }, "ResponseBody": { "loadTestConfiguration": { @@ -939,21 +801,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:06.1339151", + "expireDateTime": "2023-01-25T12:39:57.7232245", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:46:06.1338106", + "expireDateTime": "2023-01-25T12:39:57.7231041", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:06.1339378", + "expireDateTime": "2023-01-25T12:39:57.7232573", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -965,11 +827,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:45.218Z" } }, { @@ -981,20 +843,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "1af19e51-7ab9-44ff-bd72-0ca231789a3e" + "x-ms-client-request-id": "dbdf6040-a487-4903-8593-401989e14dd8" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1346", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:08 GMT", - "mise-correlation-id": "a66d5506-b83d-4913-8f22-1661afa25137", + "Date": "Wed, 25 Jan 2023 11:40:00 GMT", + "mise-correlation-id": "8299884b-3f39-4956-a1e2-ff73a057d5c0", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "a1ff205c-3839-478c-ae50-57c7a35b9765" + "x-ms-correlation-request-id": "c18e393a-d111-457e-91ea-fdf880a65273" }, "ResponseBody": { "loadTestConfiguration": { @@ -1008,21 +870,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:08.5311241", + "expireDateTime": "2023-01-25T12:40:00.2471015", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:46:08.5310211", + "expireDateTime": "2023-01-25T12:40:00.2470029", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:08.5311479", + "expireDateTime": "2023-01-25T12:40:00.2471246", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1034,11 +896,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:45.218Z" } }, { @@ -1050,20 +912,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ec2d1ba0-4390-4d3f-9d43-dcb72abfaa6d" + "x-ms-client-request-id": "988fb22d-97b0-4555-b26e-381e8259e4bf" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1347", + "Content-Length": "1345", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:10 GMT", - "mise-correlation-id": "8b18ecc8-3b1d-4e0b-86fe-345f75d636c2", + "Date": "Wed, 25 Jan 2023 11:40:04 GMT", + "mise-correlation-id": "9ead394a-2c53-4cdc-a392-361f969813dc", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1d243ade-ed5f-487e-abcb-44cd151567cd" + "x-ms-correlation-request-id": "6507e8b2-67b5-4f37-beae-d9da85eb16d6" }, "ResponseBody": { "loadTestConfiguration": { @@ -1077,21 +939,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:10.9004086", + "expireDateTime": "2023-01-25T12:40:04.8806946", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:46:10.9003066", + "expireDateTime": "2023-01-25T12:40:04.880546", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:10.9004309", + "expireDateTime": "2023-01-25T12:40:04.8807253", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1103,11 +965,11 @@ "displayName": "sample123", "testId": "abc", "status": "EXECUTING", - "startDateTime": "2023-01-24T04:45:36.997Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:45:52.905Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:39:45.218Z" } }, { @@ -1119,20 +981,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "4dd8f830-5494-4bf8-8f25-01de1efcfbb8" + "x-ms-client-request-id": "c1bd27fc-de78-4427-83d2-285c0ffd75e5" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1579", + "Content-Length": "1577", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:13 GMT", - "mise-correlation-id": "5cd77d86-708d-453f-b510-baae79aa9350", + "Date": "Wed, 25 Jan 2023 11:40:07 GMT", + "mise-correlation-id": "8cde61ff-8c73-4294-a09c-da182695c315", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5fd8e922-b37b-4787-af00-c3e0ba8ec892" + "x-ms-correlation-request-id": "98201c29-5fed-461b-82ed-1e560f18cad1" }, "ResponseBody": { "loadTestConfiguration": { @@ -1146,21 +1008,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:13.3118267", + "expireDateTime": "2023-01-25T12:40:07.4098952", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:46:13.3117207", + "expireDateTime": "2023-01-25T12:40:07.4097825", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:13.3118481", + "expireDateTime": "2023-01-25T12:40:07.4099181", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -1170,7 +1032,7 @@ "url": "https://storageurl.com/", "fileName": "logs.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:13.3118696", + "expireDateTime": "2023-01-25T12:40:07.4099401", "validationStatus": "VALIDATION_NOT_REQUIRED" } } @@ -1180,12 +1042,12 @@ "displayName": "sample123", "testId": "abc", "status": "DONE", - "startDateTime": "2023-01-24T04:45:36.997Z", - "endDateTime": "2023-01-24T04:46:12.948Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "endDateTime": "2023-01-25T11:40:05.31Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:46:13.301Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:40:06.356Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json index f96b6f91a327..184913fc44fe 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_app_component_for_test_run.json @@ -11,7 +11,7 @@ "Content-Length": "412", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "d58a0aab-9ba8-47f5-9a74-10eb687d0c67" + "x-ms-client-request-id": "a973699d-70e4-4362-8e35-e9605aa9ec7c" }, "RequestBody": { "components": { @@ -27,14 +27,14 @@ "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "566", + "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:14 GMT", + "Date": "Wed, 25 Jan 2023 11:40:09 GMT", "Location": "https://endpoint/test-runs/abcde/app-components?api-version=2022-11-01", - "mise-correlation-id": "c547b326-b1b8-4763-9d91-f621e46a89a9", + "mise-correlation-id": "06c622ff-97e8-4792-8dcd-968890a75545", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "ce725733-6e41-4cb6-854a-f5e27aa25ed1" + "x-ms-correlation-request-id": "868e80c1-1d25-432f-a5c2-ab4de1120d5a" }, "ResponseBody": { "components": { @@ -47,8 +47,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-24T04:46:14.38Z", - "lastModifiedDateTime": "2023-01-24T04:46:14.38Z" + "createdDateTime": "2023-01-25T11:40:09.228Z", + "lastModifiedDateTime": "2023-01-25T11:40:09.228Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json index 16c49edeb6d8..4af0b4ff883d 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_create_a_loadtest.json @@ -11,7 +11,7 @@ "Content-Length": "113", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "ca12c0dc-afe7-4a47-b510-86e60b6b762a" + "x-ms-client-request-id": "a3d89763-3520-432d-9fd7-36cc27bbc0b6" }, "RequestBody": { "displayName": "sample_test", @@ -27,12 +27,12 @@ "Connection": "keep-alive", "Content-Length": "289", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:16 GMT", + "Date": "Wed, 25 Jan 2023 11:39:15 GMT", "Location": "https://endpoint/tests/abc?api-version=2022-11-01", - "mise-correlation-id": "bc2e6e06-770c-44c1-b58f-ee25ce1d2d89", + "mise-correlation-id": "9f840422-58b2-4429-87ae-7fb0421d2fdd", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "31825575-1b0a-41c1-afd0-7366ae50a92e" + "x-ms-correlation-request-id": "85a118c0-04c1-4c4c-8457-662a5e14d197" }, "ResponseBody": { "loadTestConfiguration": { @@ -46,8 +46,8 @@ "testId": "abc", "description": "", "displayName": "sample_test", - "createdDateTime": "2023-01-24T04:45:16.676Z", - "lastModifiedDateTime": "2023-01-24T04:45:16.676Z" + "createdDateTime": "2023-01-25T11:39:15.473Z", + "lastModifiedDateTime": "2023-01-25T11:39:15.473Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json index 1bb6343d7951..a7899b264c1b 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_a_test_run.json @@ -9,18 +9,18 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "bdc10933-d752-400c-8215-51644cf5a9ae" + "x-ms-client-request-id": "ece0fb28-bc55-44f1-870a-5a5211a32d13" }, "RequestBody": null, "StatusCode": 204, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Date": "Tue, 24 Jan 2023 04:46:15 GMT", - "mise-correlation-id": "5125b40e-ff02-43ee-8e57-500a3a7ebd56", + "Date": "Wed, 25 Jan 2023 11:40:10 GMT", + "mise-correlation-id": "636c63d2-0b60-4356-8e1e-9413cbb73db7", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5a123690-796b-45b8-8f6b-95a37d573105" + "x-ms-correlation-request-id": "5e7996f1-dd96-4d1b-a64e-c3bb942d2d34" }, "ResponseBody": null } diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_the_test.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_the_test.json new file mode 100644 index 000000000000..e7c94f2f635a --- /dev/null +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_delete_the_test.json @@ -0,0 +1,29 @@ +{ + "Entries": [ + { + "RequestUri": "https://endpoint/tests/abc?api-version=2022-11-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Accept-Encoding": "gzip,deflate", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", + "x-ms-client-request-id": "1574e3a1-e2d1-4461-9dc6-d0c957c56491" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", + "Connection": "keep-alive", + "Date": "Wed, 25 Jan 2023 11:40:11 GMT", + "mise-correlation-id": "30b8cf57-2917-47b4-894f-c4e4ba5e9ab4", + "Strict-Transport-Security": "max-age=15724800; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "67dcb410-6ad3-43ca-b7e1-d899dcdc82ca" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json index 057f812c8010..9d43240b4d49 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7219e1b0-a4b7-465b-8743-932b8fb8165e" + "x-ms-client-request-id": "8820322a-9fb1-47e2-8144-2f41f7cd3bd5" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1578", + "Content-Length": "1577", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:13 GMT", - "mise-correlation-id": "a31308e6-2cf1-4505-aba5-14417deca692", + "Date": "Wed, 25 Jan 2023 11:40:08 GMT", + "mise-correlation-id": "ba1b532d-30f0-46f4-ad68-8716d4ac0793", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "3c1bafe6-7a9e-4a58-b363-5c1aeedd884c" + "x-ms-correlation-request-id": "3eb16cfc-e035-4983-a2f5-95ace5420f3f" }, "ResponseBody": { "loadTestConfiguration": { @@ -36,21 +36,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:13.8669874", + "expireDateTime": "2023-01-25T12:40:08.6143487", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:46:13.8668854", + "expireDateTime": "2023-01-25T12:40:08.6142475", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:13.8670095", + "expireDateTime": "2023-01-25T12:40:08.6143709", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -60,7 +60,7 @@ "url": "https://storageurl.com/", "fileName": "logs.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:46:13.867032", + "expireDateTime": "2023-01-25T12:40:08.6143928", "validationStatus": "VALIDATION_NOT_REQUIRED" } } @@ -70,12 +70,12 @@ "displayName": "sample123", "testId": "abc", "status": "DONE", - "startDateTime": "2023-01-24T04:45:36.997Z", - "endDateTime": "2023-01-24T04:46:12.948Z", - "executedDateTime": "2023-01-24T04:45:35.099Z", + "startDateTime": "2023-01-25T11:39:28.18Z", + "endDateTime": "2023-01-25T11:40:05.31Z", + "executedDateTime": "2023-01-25T11:39:27.235Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcde", - "createdDateTime": "2023-01-24T04:45:36.856Z", - "lastModifiedDateTime": "2023-01-24T04:46:13.499Z" + "createdDateTime": "2023-01-25T11:39:28.062Z", + "lastModifiedDateTime": "2023-01-25T11:40:06.356Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json index 9f85c3108c8b..35889565dc09 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_app_components.json @@ -9,20 +9,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "56004997-9704-4d7e-b6ed-8d0c81d60b0f" + "x-ms-client-request-id": "9092d5c4-5fe0-492a-bd31-053be7772cc8" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "566", + "Content-Length": "568", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:14 GMT", - "mise-correlation-id": "51336adb-1866-4de9-afce-961eeb34dfe6", + "Date": "Wed, 25 Jan 2023 11:40:09 GMT", + "mise-correlation-id": "0c93b726-f671-4626-9e2c-fcda63f3ee20", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "84849a3e-65da-432f-8123-e9e2829f9a8c" + "x-ms-correlation-request-id": "62816651-ff7b-4d2e-b03a-85963f36834c" }, "ResponseBody": { "components": { @@ -35,8 +35,8 @@ } }, "testRunId": "abcde", - "createdDateTime": "2023-01-24T04:46:14.38Z", - "lastModifiedDateTime": "2023-01-24T04:46:14.38Z" + "createdDateTime": "2023-01-25T11:40:09.228Z", + "lastModifiedDateTime": "2023-01-25T11:40:09.228Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json index 3921326fc379..210f280a2513 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_get_a_test_run_server_metrics_config.json @@ -9,7 +9,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "2ab4b126-8386-455a-a2ee-fee2a01c72c2" + "x-ms-client-request-id": "c48e87f9-248d-473c-8118-6019f53c65ea" }, "RequestBody": null, "StatusCode": 200, @@ -18,11 +18,11 @@ "Connection": "keep-alive", "Content-Length": "2077", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:46:15 GMT", - "mise-correlation-id": "566defea-2672-48ca-b5bd-a1463f961862", + "Date": "Wed, 25 Jan 2023 11:40:10 GMT", + "mise-correlation-id": "ae682c45-49d3-4b77-bd4b-f9b8adef02e1", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "caf0326b-40e2-46b1-8846-c8bc149b2fd2" + "x-ms-correlation-request-id": "e6de49dc-557e-48fc-ac51-b1b18341cbc2" }, "ResponseBody": { "testRunId": "abcde", @@ -52,8 +52,8 @@ "resourceType": "microsoft.web/sites" } }, - "createdDateTime": "2023-01-24T04:46:14.397Z", - "lastModifiedDateTime": "2023-01-24T04:46:14.397Z" + "createdDateTime": "2023-01-25T11:40:09.244Z", + "lastModifiedDateTime": "2023-01-25T11:40:09.244Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json index 2450ef3cf51f..f9d19676473b 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_not_be_able_to_create_a_test_run404.json @@ -11,27 +11,108 @@ "Content-Length": "60", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "401f077b-1c58-45de-a6fc-29c5d51ef9ce" + "x-ms-client-request-id": "212edda9-40b1-439e-9bb6-490852be2ccf" }, "RequestBody": { "testId": "abc", "displayName": "sample123", "virtualUsers": 10 }, - "StatusCode": 201, + "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1287", + "Content-Length": "3287", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:28 GMT", - "Location": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", - "mise-correlation-id": "8169c94c-3a9d-46c3-ac14-cc04399dfa9b", + "Date": "Wed, 25 Jan 2023 11:39:24 GMT", + "mise-correlation-id": "fa560287-e029-45e3-92c8-877f194c166d", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f51ae026-ee36-40b1-b2d7-f7054600bcea" + "x-ms-correlation-request-id": "aaa7394a-ba9a-45e7-a4cf-b3483f09c0ec" }, "ResponseBody": { + "testRunStatistics": { + "Sample": { + "transaction": "Sample", + "sampleCount": 10.0, + "errorCount": 0.0, + "errorPct": 0.0, + "meanResTime": 273.8, + "medianResTime": 193.0, + "maxResTime": 584.0, + "minResTime": 157.0, + "pct1ResTime": 400.0, + "pct2ResTime": 584.0, + "pct3ResTime": 584.0, + "throughput": 5.0, + "receivedKBytesPerSec": 0.0, + "sentKBytesPerSec": 0.0 + }, + "Sample-0": { + "transaction": "Sample-0", + "sampleCount": 10.0, + "errorCount": 0.0, + "errorPct": 0.0, + "meanResTime": 69.8, + "medianResTime": 59.0, + "maxResTime": 124.0, + "minResTime": 59.0, + "pct1ResTime": 99.0, + "pct2ResTime": 124.0, + "pct3ResTime": 124.0, + "throughput": 5.0, + "receivedKBytesPerSec": 0.0, + "sentKBytesPerSec": 0.0 + }, + "Sample-1": { + "transaction": "Sample-1", + "sampleCount": 10.0, + "errorCount": 0.0, + "errorPct": 0.0, + "meanResTime": 53.0, + "medianResTime": 37.0, + "maxResTime": 135.0, + "minResTime": 18.0, + "pct1ResTime": 83.0, + "pct2ResTime": 135.0, + "pct3ResTime": 135.0, + "throughput": 5.0, + "receivedKBytesPerSec": 0.0, + "sentKBytesPerSec": 0.0 + }, + "Sample-2": { + "transaction": "Sample-2", + "sampleCount": 10.0, + "errorCount": 0.0, + "errorPct": 0.0, + "meanResTime": 150.1, + "medianResTime": 111.0, + "maxResTime": 406.0, + "minResTime": 77.0, + "pct1ResTime": 189.0, + "pct2ResTime": 406.0, + "pct3ResTime": 406.0, + "throughput": 5.0, + "receivedKBytesPerSec": 0.0, + "sentKBytesPerSec": 0.0 + }, + "Total": { + "transaction": "Total", + "sampleCount": 40.0, + "errorCount": 0.0, + "errorPct": 0.0, + "meanResTime": 136.675, + "medianResTime": 99.0, + "maxResTime": 584.0, + "minResTime": 18.0, + "pct1ResTime": 269.0, + "pct2ResTime": 400.0, + "pct3ResTime": 584.0, + "throughput": 20.0, + "receivedKBytesPerSec": 0.0, + "sentKBytesPerSec": 0.0 + } + }, "loadTestConfiguration": { "engineInstances": 1, "splitAllCSVs": false, @@ -43,36 +124,55 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "0001-01-01T00:00:00", + "expireDateTime": "2023-01-25T12:39:24.5221744", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:26.6808045", + "expireDateTime": "2023-01-25T12:39:24.5220021", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "0001-01-01T00:00:00", + "expireDateTime": "2023-01-25T12:39:24.5222042", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] }, - "outputArtifacts": {} + "outputArtifacts": { + "resultFileInfo": { + "url": "https://storageurl.com/", + "fileName": "csv.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-25T12:39:24.5222544", + "validationStatus": "VALIDATION_NOT_REQUIRED" + }, + "logsFileInfo": { + "url": "https://storageurl.com/", + "fileName": "logs.zip", + "fileType": "ADDITIONAL_ARTIFACTS", + "expireDateTime": "2023-01-25T12:39:24.5222841", + "validationStatus": "VALIDATION_NOT_REQUIRED" + } + } }, "testResult": "NOT_APPLICABLE", + "virtualUsers": 1, "testRunId": "abcjad", "displayName": "sample123", "testId": "abc", - "status": "ACCEPTED", - "executedDateTime": "2023-01-24T04:45:26.683Z", + "status": "DONE", + "startDateTime": "2023-01-24T21:23:26Z", + "endDateTime": "2023-01-24T21:23:29Z", + "executedDateTime": "2023-01-24T21:23:05.791Z", "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-24T04:45:28.19Z", - "lastModifiedDateTime": "2023-01-24T04:45:28.19Z" + "duration": 3000, + "createdDateTime": "2023-01-24T21:23:06.517Z", + "lastModifiedDateTime": "2023-01-25T11:39:24.51Z" } }, { @@ -84,7 +184,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "acf26c03-2956-4f47-b3aa-432d71929581" + "x-ms-client-request-id": "b7d67aee-8e74-4d1d-ae5f-9192a8309f15" }, "RequestBody": null, "StatusCode": 404, @@ -93,11 +193,11 @@ "Connection": "keep-alive", "Content-Length": "99", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:28 GMT", - "mise-correlation-id": "dbde731f-33bf-44ab-8c0f-d29fa22d91eb", + "Date": "Wed, 25 Jan 2023 11:39:25 GMT", + "mise-correlation-id": "3f7af4be-954f-4bde-ba48-89248d12193a", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "8bba7f6f-84c3-43b8-9dba-0c8c8e9f403b" + "x-ms-correlation-request-id": "945ef0fe-6157-4513-a0f5-f783b93e2a3a" }, "ResponseBody": { "error": { diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json index 0221bfd7e469..1c65bb0da6fd 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_timeout_the_test_run.json @@ -1,7 +1,7 @@ { "Entries": [ { - "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", + "RequestUri": "https://endpoint/test-runs/randomtestrun4?api-version=2022-11-01", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", @@ -11,93 +11,25 @@ "Content-Length": "60", "Content-Type": "application/merge-patch\u002Bjson", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "aad1c619-a170-4914-b7d8-e1bfc74fb580" + "x-ms-client-request-id": "9f16850c-8003-41d2-81dc-f721e4ceb6f8" }, "RequestBody": { "testId": "abc", "displayName": "sample123", "virtualUsers": 10 }, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "1350", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:29 GMT", - "mise-correlation-id": "6de95233-aec3-4019-9d1c-9ed804ead104", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "fc7e3cb4-e77f-4c10-b2fd-ac1c560fa314" - }, - "ResponseBody": { - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false, - "quickStartTest": false - }, - "testArtifacts": { - "inputArtifacts": { - "configFileInfo": { - "url": "https://storageurl.com/", - "fileName": "config.yaml", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:29.1650869", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "sample.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:29.1649756", - "validationStatus": "VALIDATION_SUCCESS" - }, - "inputArtifactsZipFileInfo": { - "url": "https://storageurl.com/", - "fileName": "inputartifacts.zip", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:29.165109", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "additionalFileInfo": [] - }, - "outputArtifacts": {} - }, - "testResult": "NOT_APPLICABLE", - "testRunId": "abcjad", - "displayName": "sample123", - "testId": "abc", - "status": "PROVISIONING", - "startDateTime": "2023-01-24T04:45:28.314Z", - "executedDateTime": "2023-01-24T04:45:26.683Z", - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-24T04:45:28.19Z", - "lastModifiedDateTime": "2023-01-24T04:45:29.158Z" - } - }, - { - "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "7544344c-35ee-411d-aa82-ef5d1edc9ee6" - }, - "RequestBody": null, - "StatusCode": 200, + "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1351", + "Content-Length": "1302", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:29 GMT", - "mise-correlation-id": "a0fc8c65-45af-41ba-9aef-c3eb54bb1d0d", + "Date": "Wed, 25 Jan 2023 11:39:26 GMT", + "Location": "https://endpoint/test-runs/randomtestrun4?api-version=2022-11-01", + "mise-correlation-id": "529b50ee-c68e-4957-90f2-73b64824a4aa", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "1a987d0e-0710-489a-a7c4-a015dad2f423" + "x-ms-correlation-request-id": "4b96dd90-8a96-4549-b929-1d94ff9e94f3" }, "ResponseBody": { "loadTestConfiguration": { @@ -111,21 +43,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:29.6565117", + "expireDateTime": "0001-01-01T00:00:00", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:29.6564095", + "expireDateTime": "2023-01-25T12:39:25.4505572", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:29.6565352", + "expireDateTime": "0001-01-01T00:00:00", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -133,88 +65,18 @@ "outputArtifacts": {} }, "testResult": "NOT_APPLICABLE", - "testRunId": "abcjad", + "testRunId": "randomtestrun4", "displayName": "sample123", "testId": "abc", - "status": "PROVISIONING", - "startDateTime": "2023-01-24T04:45:28.314Z", - "executedDateTime": "2023-01-24T04:45:26.683Z", - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-24T04:45:28.19Z", - "lastModifiedDateTime": "2023-01-24T04:45:29.158Z" - } - }, - { - "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", - "RequestMethod": "GET", - "RequestHeaders": { - "Accept": "application/json", - "Accept-Encoding": "gzip,deflate", - "Authorization": "Sanitized", - "Connection": "keep-alive", - "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "3a6da3fa-fb09-4d3e-8346-733dc33f35dc" - }, - "RequestBody": null, - "StatusCode": 200, - "ResponseHeaders": { - "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", - "Connection": "keep-alive", - "Content-Length": "1351", - "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:32 GMT", - "mise-correlation-id": "801ca016-702d-424e-8853-17b3c4a03c28", - "Strict-Transport-Security": "max-age=15724800; includeSubDomains", - "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "5c66b3c4-bb43-496f-a8bd-85516f377fdd" - }, - "ResponseBody": { - "loadTestConfiguration": { - "engineInstances": 1, - "splitAllCSVs": false, - "quickStartTest": false - }, - "testArtifacts": { - "inputArtifacts": { - "configFileInfo": { - "url": "https://storageurl.com/", - "fileName": "config.yaml", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:32.0618593", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "testScriptFileInfo": { - "url": "https://storageurl.com/", - "fileName": "sample.jmx", - "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:32.0617547", - "validationStatus": "VALIDATION_SUCCESS" - }, - "inputArtifactsZipFileInfo": { - "url": "https://storageurl.com/", - "fileName": "inputartifacts.zip", - "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:32.0618837", - "validationStatus": "VALIDATION_NOT_REQUIRED" - }, - "additionalFileInfo": [] - }, - "outputArtifacts": {} - }, - "testResult": "NOT_APPLICABLE", - "testRunId": "abcjad", - "displayName": "sample123", - "testId": "abc", - "status": "PROVISIONING", - "startDateTime": "2023-01-24T04:45:28.314Z", - "executedDateTime": "2023-01-24T04:45:26.683Z", - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-24T04:45:28.19Z", - "lastModifiedDateTime": "2023-01-24T04:45:29.158Z" + "status": "ACCEPTED", + "executedDateTime": "2023-01-25T11:39:25.45Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/randomtestrun4", + "createdDateTime": "2023-01-25T11:39:26.26Z", + "lastModifiedDateTime": "2023-01-25T11:39:26.26Z" } }, { - "RequestUri": "https://endpoint/test-runs/abcjad?api-version=2022-11-01", + "RequestUri": "https://endpoint/test-runs/randomtestrun4?api-version=2022-11-01", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", @@ -222,20 +84,20 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "09719c61-2f25-43f8-9251-5f50782e3791" + "x-ms-client-request-id": "65ae38c5-2692-4057-bb00-5bf9ddf63d66" }, "RequestBody": null, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-07-01-preview, 2022-06-01-preview, 2022-11-01", "Connection": "keep-alive", - "Content-Length": "1351", + "Content-Length": "1364", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:34 GMT", - "mise-correlation-id": "7864caae-5e5d-4396-b757-d4b8343f3e61", + "Date": "Wed, 25 Jan 2023 11:39:26 GMT", + "mise-correlation-id": "67e66984-f4ea-498f-91de-4efeee670f39", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2eeb5194-6f70-421a-9865-f257e3acd03f" + "x-ms-correlation-request-id": "101be2c7-90b4-48b6-ad91-b582e6c03aa0" }, "ResponseBody": { "loadTestConfiguration": { @@ -249,21 +111,21 @@ "url": "https://storageurl.com/", "fileName": "config.yaml", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:34.4972587", + "expireDateTime": "2023-01-25T12:39:26.7020258", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "testScriptFileInfo": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T05:45:34.4971482", + "expireDateTime": "2023-01-25T12:39:26.701878", "validationStatus": "VALIDATION_SUCCESS" }, "inputArtifactsZipFileInfo": { "url": "https://storageurl.com/", "fileName": "inputartifacts.zip", "fileType": "ADDITIONAL_ARTIFACTS", - "expireDateTime": "2023-01-24T05:45:34.4972885", + "expireDateTime": "2023-01-25T12:39:26.7020609", "validationStatus": "VALIDATION_NOT_REQUIRED" }, "additionalFileInfo": [] @@ -271,15 +133,15 @@ "outputArtifacts": {} }, "testResult": "NOT_APPLICABLE", - "testRunId": "abcjad", + "testRunId": "randomtestrun4", "displayName": "sample123", "testId": "abc", "status": "PROVISIONING", - "startDateTime": "2023-01-24T04:45:28.314Z", - "executedDateTime": "2023-01-24T04:45:26.683Z", - "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/abcjad", - "createdDateTime": "2023-01-24T04:45:28.19Z", - "lastModifiedDateTime": "2023-01-24T04:45:29.158Z" + "startDateTime": "2023-01-25T11:39:26.37Z", + "executedDateTime": "2023-01-25T11:39:25.45Z", + "portalUrl": "https://portal.azure.com/#blade/Microsoft_Azure_CloudNativeTesting/NewReport//resourceId/%2fsubscriptions%2fazure_subscription_id%2fresourcegroups%2fmrinal%2fproviders%2fmicrosoft.loadtestservice%2floadtests%2fmrgautam-auseast/testId/abc/testRunId/randomtestrun4", + "createdDateTime": "2023-01-25T11:39:26.26Z", + "lastModifiedDateTime": "2023-01-25T11:39:26.556Z" } } ], diff --git a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json index 8a2ac5c97e2e..c2449ae2c6e5 100644 --- a/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json +++ b/sdk/loadtestservice/load-testing-rest/recordings/node/test_run_creation/recording_should_upload_the_test_file_with_lro.json @@ -11,7 +11,7 @@ "Content-Type": "application/octet-stream", "Transfer-Encoding": "chunked", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "a0ca235b-3a09-4c23-a807-d529abb3f57a" + "x-ms-client-request-id": "c27a6e8a-6a5a-4daa-b9b1-8c6a056c384e" }, "RequestBody": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGptZXRlclRlc3RQbGFuIHZlcnNpb249IjEuMiIgcHJvcGVydGllcz0iNS4wIiBqbWV0ZXI9IjUuMyI\u002BCiAgPGhhc2hUcmVlPgogICAgPFRlc3RQbGFuIGd1aWNsYXNzPSJUZXN0UGxhbkd1aSIgdGVzdGNsYXNzPSJUZXN0UGxhbiIgdGVzdG5hbWU9IlRlc3QgUGxhbiIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRlc3RQbGFuLmNvbW1lbnRzIj48L3N0cmluZ1Byb3A\u002BCiAgICAgIDxib29sUHJvcCBuYW1lPSJUZXN0UGxhbi5mdW5jdGlvbmFsX21vZGUiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGJvb2xQcm9wIG5hbWU9IlRlc3RQbGFuLnNlcmlhbGl6ZV90aHJlYWRncm91cHMiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRlc3RQbGFuLnVzZXJfZGVmaW5lZF92YXJpYWJsZXMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJBcmd1bWVudHNQYW5lbCIgdGVzdGNsYXNzPSJBcmd1bWVudHMiIHRlc3RuYW1lPSJVc2VyIERlZmluZWQgVmFyaWFibGVzIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICA8Y29sbGVjdGlvblByb3AgbmFtZT0iQXJndW1lbnRzLmFyZ3VtZW50cyIvPgogICAgICA8L2VsZW1lbnRQcm9wPgogICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUZXN0UGxhbi51c2VyX2RlZmluZV9jbGFzc3BhdGgiPjwvc3RyaW5nUHJvcD4KICAgIDwvVGVzdFBsYW4\u002BCiAgICA8aGFzaFRyZWU\u002BCiAgICAgIDxUaHJlYWRHcm91cCBndWljbGFzcz0iVGhyZWFkR3JvdXBHdWkiIHRlc3RjbGFzcz0iVGhyZWFkR3JvdXAiIHRlc3RuYW1lPSJUaHJlYWQgR3JvdXAiIGVuYWJsZWQ9InRydWUiPgogICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm9uX3NhbXBsZV9lcnJvciI\u002BY29udGludWU8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPGVsZW1lbnRQcm9wIG5hbWU9IlRocmVhZEdyb3VwLm1haW5fY29udHJvbGxlciIgZWxlbWVudFR5cGU9Ikxvb3BDb250cm9sbGVyIiBndWljbGFzcz0iTG9vcENvbnRyb2xQYW5lbCIgdGVzdGNsYXNzPSJMb29wQ29udHJvbGxlciIgdGVzdG5hbWU9Ikxvb3AgQ29udHJvbGxlciIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIuY29udGludWVfZm9yZXZlciI\u002BZmFsc2U8L2Jvb2xQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iTG9vcENvbnRyb2xsZXIubG9vcHMiPjEwPC9zdHJpbmdQcm9wPgogICAgICAgIDwvZWxlbWVudFByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAubnVtX3RocmVhZHMiPjE8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAucmFtcF90aW1lIj4yPC9zdHJpbmdQcm9wPgogICAgICAgIDxsb25nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zdGFydF90aW1lIj4xNTE1MDYzNjUwMDAwPC9sb25nUHJvcD4KICAgICAgICA8bG9uZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZW5kX3RpbWUiPjE1MTUwNjM2NTAwMDA8L2xvbmdQcm9wPgogICAgICAgIDxib29sUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5zY2hlZHVsZXIiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJUaHJlYWRHcm91cC5kdXJhdGlvbiI\u002BMTA8L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iVGhyZWFkR3JvdXAuZGVsYXkiPjwvc3RyaW5nUHJvcD4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iVGhyZWFkR3JvdXAuc2FtZV91c2VyX29uX25leHRfaXRlcmF0aW9uIj50cnVlPC9ib29sUHJvcD4KICAgICAgPC9UaHJlYWRHcm91cD4KICAgICAgPGhhc2hUcmVlPgogICAgICAgIDxIVFRQU2FtcGxlclByb3h5IGd1aWNsYXNzPSJIdHRwVGVzdFNhbXBsZUd1aSIgdGVzdGNsYXNzPSJIVFRQU2FtcGxlclByb3h5IiB0ZXN0bmFtZT0iU2FtcGxlIiBlbmFibGVkPSJ0cnVlIj4KICAgICAgICAgIDxlbGVtZW50UHJvcCBuYW1lPSJIVFRQc2FtcGxlci5Bcmd1bWVudHMiIGVsZW1lbnRUeXBlPSJBcmd1bWVudHMiIGd1aWNsYXNzPSJIVFRQQXJndW1lbnRzUGFuZWwiIHRlc3RjbGFzcz0iQXJndW1lbnRzIiB0ZXN0bmFtZT0iVXNlciBEZWZpbmVkIFZhcmlhYmxlcyIgZW5hYmxlZD0idHJ1ZSI\u002BCiAgICAgICAgICAgIDxjb2xsZWN0aW9uUHJvcCBuYW1lPSJBcmd1bWVudHMuYXJndW1lbnRzIi8\u002BCiAgICAgICAgICA8L2VsZW1lbnRQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuZG9tYWluIj5taWNyb3NvZnQuY29tPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucG9ydCI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucHJvdG9jb2wiPjwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmNvbnRlbnRFbmNvZGluZyI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIucGF0aCI\u002BLzwvc3RyaW5nUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLm1ldGhvZCI\u002BR0VUPC9zdHJpbmdQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmZvbGxvd19yZWRpcmVjdHMiPnRydWU8L2Jvb2xQcm9wPgogICAgICAgICAgPGJvb2xQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmF1dG9fcmVkaXJlY3RzIj5mYWxzZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIudXNlX2tlZXBhbGl2ZSI\u002BdHJ1ZTwvYm9vbFByb3A\u002BCiAgICAgICAgICA8Ym9vbFByb3AgbmFtZT0iSFRUUFNhbXBsZXIuRE9fTVVMVElQQVJUX1BPU1QiPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICAgIDxzdHJpbmdQcm9wIG5hbWU9IkhUVFBTYW1wbGVyLmVtYmVkZGVkX3VybF9yZSI\u002BPC9zdHJpbmdQcm9wPgogICAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iSFRUUFNhbXBsZXIuY29ubmVjdF90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgICA8c3RyaW5nUHJvcCBuYW1lPSJIVFRQU2FtcGxlci5yZXNwb25zZV90aW1lb3V0Ij48L3N0cmluZ1Byb3A\u002BCiAgICAgICAgPC9IVFRQU2FtcGxlclByb3h5PgogICAgICAgIDxoYXNoVHJlZS8\u002BCiAgICAgIDwvaGFzaFRyZWU\u002BCiAgICAgIDxSZXN1bHRDb2xsZWN0b3IgZ3VpY2xhc3M9IlZpZXdSZXN1bHRzRnVsbFZpc3VhbGl6ZXIiIHRlc3RjbGFzcz0iUmVzdWx0Q29sbGVjdG9yIiB0ZXN0bmFtZT0iVmlldyBSZXN1bHRzIFRyZWUiIGVuYWJsZWQ9ImZhbHNlIj4KICAgICAgICA8Ym9vbFByb3AgbmFtZT0iUmVzdWx0Q29sbGVjdG9yLmVycm9yX2xvZ2dpbmciPmZhbHNlPC9ib29sUHJvcD4KICAgICAgICA8b2JqUHJvcD4KICAgICAgICAgIDxuYW1lPnNhdmVDb25maWc8L25hbWU\u002BCiAgICAgICAgICA8dmFsdWUgY2xhc3M9IlNhbXBsZVNhdmVDb25maWd1cmF0aW9uIj4KICAgICAgICAgICAgPHRpbWU\u002BdHJ1ZTwvdGltZT4KICAgICAgICAgICAgPGxhdGVuY3k\u002BdHJ1ZTwvbGF0ZW5jeT4KICAgICAgICAgICAgPHRpbWVzdGFtcD50cnVlPC90aW1lc3RhbXA\u002BCiAgICAgICAgICAgIDxzdWNjZXNzPnRydWU8L3N1Y2Nlc3M\u002BCiAgICAgICAgICAgIDxsYWJlbD50cnVlPC9sYWJlbD4KICAgICAgICAgICAgPGNvZGU\u002BdHJ1ZTwvY29kZT4KICAgICAgICAgICAgPG1lc3NhZ2U\u002BdHJ1ZTwvbWVzc2FnZT4KICAgICAgICAgICAgPHRocmVhZE5hbWU\u002BdHJ1ZTwvdGhyZWFkTmFtZT4KICAgICAgICAgICAgPGRhdGFUeXBlPnRydWU8L2RhdGFUeXBlPgogICAgICAgICAgICA8ZW5jb2Rpbmc\u002BZmFsc2U8L2VuY29kaW5nPgogICAgICAgICAgICA8YXNzZXJ0aW9ucz50cnVlPC9hc3NlcnRpb25zPgogICAgICAgICAgICA8c3VicmVzdWx0cz50cnVlPC9zdWJyZXN1bHRzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhPmZhbHNlPC9yZXNwb25zZURhdGE\u002BCiAgICAgICAgICAgIDxzYW1wbGVyRGF0YT5mYWxzZTwvc2FtcGxlckRhdGE\u002BCiAgICAgICAgICAgIDx4bWw\u002BZmFsc2U8L3htbD4KICAgICAgICAgICAgPGZpZWxkTmFtZXM\u002BdHJ1ZTwvZmllbGROYW1lcz4KICAgICAgICAgICAgPHJlc3BvbnNlSGVhZGVycz5mYWxzZTwvcmVzcG9uc2VIZWFkZXJzPgogICAgICAgICAgICA8cmVxdWVzdEhlYWRlcnM\u002BZmFsc2U8L3JlcXVlc3RIZWFkZXJzPgogICAgICAgICAgICA8cmVzcG9uc2VEYXRhT25FcnJvcj5mYWxzZTwvcmVzcG9uc2VEYXRhT25FcnJvcj4KICAgICAgICAgICAgPHNhdmVBc3NlcnRpb25SZXN1bHRzRmFpbHVyZU1lc3NhZ2U\u002BdHJ1ZTwvc2F2ZUFzc2VydGlvblJlc3VsdHNGYWlsdXJlTWVzc2FnZT4KICAgICAgICAgICAgPGFzc2VydGlvbnNSZXN1bHRzVG9TYXZlPjA8L2Fzc2VydGlvbnNSZXN1bHRzVG9TYXZlPgogICAgICAgICAgICA8Ynl0ZXM\u002BdHJ1ZTwvYnl0ZXM\u002BCiAgICAgICAgICAgIDxzZW50Qnl0ZXM\u002BdHJ1ZTwvc2VudEJ5dGVzPgogICAgICAgICAgICA8dXJsPnRydWU8L3VybD4KICAgICAgICAgICAgPHRocmVhZENvdW50cz50cnVlPC90aHJlYWRDb3VudHM\u002BCiAgICAgICAgICAgIDxpZGxlVGltZT50cnVlPC9pZGxlVGltZT4KICAgICAgICAgICAgPGNvbm5lY3RUaW1lPnRydWU8L2Nvbm5lY3RUaW1lPgogICAgICAgICAgPC92YWx1ZT4KICAgICAgICA8L29ialByb3A\u002BCiAgICAgICAgPHN0cmluZ1Byb3AgbmFtZT0iZmlsZW5hbWUiPjwvc3RyaW5nUHJvcD4KICAgICAgPC9SZXN1bHRDb2xsZWN0b3I\u002BCiAgICAgIDxoYXNoVHJlZS8\u002BCiAgICA8L2hhc2hUcmVlPgogIDwvaGFzaFRyZWU\u002BCjwvam1ldGVyVGVzdFBsYW4\u002BCg==", "StatusCode": 201, @@ -20,18 +20,18 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:18 GMT", + "Date": "Wed, 25 Jan 2023 11:39:16 GMT", "Location": "https://endpoint/tests/abc/files/sample.jmx?api-version=2022-11-01", - "mise-correlation-id": "d32c79ac-660a-4a5c-a39c-26eb022a7c2e", + "mise-correlation-id": "233aa558-7cbd-4949-81cc-1e3f14d591be", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "efaea1ae-f3cf-44d0-b0ab-93e28affa583" + "x-ms-correlation-request-id": "696c1727-0338-4db0-9efc-96bad1106fa8" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:18.3149886", + "expireDateTime": "2023-01-25T11:49:16.0920354", "validationStatus": "VALIDATION_INITIATED" } }, @@ -44,7 +44,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "db833e94-d2ff-4673-9434-48c87ca6d6e7" + "x-ms-client-request-id": "06ecf097-4447-4c51-b6bb-6eaf517b17c9" }, "RequestBody": null, "StatusCode": 200, @@ -53,17 +53,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:18 GMT", - "mise-correlation-id": "51e1ab55-d8d2-41af-8042-e3b08a1674ab", + "Date": "Wed, 25 Jan 2023 11:39:16 GMT", + "mise-correlation-id": "25a1e236-9f19-40be-a1da-347e4575091f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "f1d444dc-2afc-444d-82ef-735571bfd269" + "x-ms-correlation-request-id": "e0ab631e-557d-465a-99c5-63b7567bede1" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:18.7422997", + "expireDateTime": "2023-01-25T11:49:16.5192176", "validationStatus": "VALIDATION_INITIATED" } }, @@ -76,7 +76,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "8ed9fe7e-10e5-4902-bca3-78f24b565397" + "x-ms-client-request-id": "aeb1343e-1658-4e39-9c0b-a877151a471f" }, "RequestBody": null, "StatusCode": 200, @@ -85,17 +85,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:21 GMT", - "mise-correlation-id": "1675eb19-148c-4741-ad38-6cfe3103175e", + "Date": "Wed, 25 Jan 2023 11:39:19 GMT", + "mise-correlation-id": "3716ce52-bc1e-4ef6-888c-5ffbc3f2789f", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "b2fe942f-d9f3-48de-895a-fa5f9b38ce2a" + "x-ms-correlation-request-id": "3d13fb4d-7707-4f77-8cd8-78f5dd230f07" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:21.1955218", + "expireDateTime": "2023-01-25T11:49:19.0390685", "validationStatus": "VALIDATION_INITIATED" } }, @@ -108,7 +108,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "31eccfd0-75e3-494c-bb22-af2e6be67bdb" + "x-ms-client-request-id": "10767089-c479-47c5-a116-bc1b4bc5c6ce" }, "RequestBody": null, "StatusCode": 200, @@ -117,17 +117,17 @@ "Connection": "keep-alive", "Content-Length": "168", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:23 GMT", - "mise-correlation-id": "7b98f849-365e-4531-97a2-13cdc0172546", + "Date": "Wed, 25 Jan 2023 11:39:21 GMT", + "mise-correlation-id": "010e8607-e8e3-4016-a069-91be33b31075", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "92127ce0-21e8-4e7f-884a-1f394475dfb4" + "x-ms-correlation-request-id": "3c4ffa6e-391a-4b04-9c88-4a495e2366ea" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:23.8094385", + "expireDateTime": "2023-01-25T11:49:21.4902015", "validationStatus": "VALIDATION_INITIATED" } }, @@ -140,7 +140,7 @@ "Authorization": "Sanitized", "Connection": "keep-alive", "User-Agent": "azsdk-js-load-testing-rest/1.0.0-beta.2 core-rest-pipeline/1.10.0 Node/v16.18.0 OS/(x64-Windows_NT-10.0.22621)", - "x-ms-client-request-id": "68f8baca-79ec-4f0d-96a9-8b84e60adc3a" + "x-ms-client-request-id": "3df5fbe5-6f5f-4702-ad8e-89bc67d214a4" }, "RequestBody": null, "StatusCode": 200, @@ -149,17 +149,17 @@ "Connection": "keep-alive", "Content-Length": "166", "Content-Type": "application/json; charset=utf-8", - "Date": "Tue, 24 Jan 2023 04:45:26 GMT", - "mise-correlation-id": "25be5ad8-782e-4ac6-8ab6-f72b81c5fc24", + "Date": "Wed, 25 Jan 2023 11:39:23 GMT", + "mise-correlation-id": "ec3ce627-2433-4e66-9cf8-6872b387a9a2", "Strict-Transport-Security": "max-age=15724800; includeSubDomains", "X-Content-Type-Options": "nosniff", - "x-ms-correlation-request-id": "2c2a2c22-a805-45d5-9505-7b71b8a8fdcd" + "x-ms-correlation-request-id": "28588752-1eb3-40b5-a597-881ab047648a" }, "ResponseBody": { "url": "https://storageurl.com/", "fileName": "sample.jmx", "fileType": "JMX_FILE", - "expireDateTime": "2023-01-24T04:55:26.1956912", + "expireDateTime": "2023-01-25T11:49:23.9966937", "validationStatus": "VALIDATION_SUCCESS" } } diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 48a2e9055d53..681eee3543a0 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -109,16 +109,23 @@ async function main() { throw new Error("Test Run ID returned as undefined."); const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); + let testRunResult; + + try { + testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + } catch (ex: any) { + new Error("Error in polling test run completion" + ex.message); //polling timed out + } - if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) + if (testRunPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; - if (testRunId) { + if (testRunResult) { + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; + // get list of all metric namespaces and pick the first one const metricNamespaces = await client .path("/test-runs/{testRunId}/metric-namespaces", testRunId) diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index 3065a96138d4..27a7696ecd82 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -110,16 +110,23 @@ async function main() { throw new Error("Test Run ID returned as undefined."); const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); + let testRunResult; + + try { + testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + } catch (ex) { + new Error("Error in polling test run completion" + ex.message); //polling timed out + } - if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) + if (testRunPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; - if (testRunId) { + if (testRunResult) { + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; + // get list of all metric namespaces and pick the first one const metricNamespaces = await client .path("/test-runs/{testRunId}/metric-namespaces", testRunId) diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index ce57acceefb4..8d30cec43308 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -108,16 +108,23 @@ async function main() { throw new Error("Test Run ID returned as undefined."); const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); + let testRunResult; + + try { + testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + } catch (ex: any) { + new Error("Error in polling test run completion" + ex.message); //polling timed out + } - if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) + if (testRunPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + + if (testRunResult) { + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; - let testRunStarttime = testRunResult.body.startDateTime; - let testRunEndTime = testRunResult.body.endDateTime; - if (testRunId) { // get list of all metric namespaces and pick the first one const metricNamespaces = await client .path("/test-runs/{testRunId}/metric-namespaces", testRunId) diff --git a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts index 2410a1c034dd..adaf586b85b5 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getFileValidationPoller.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +import { AbortController, AbortError, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; import { FileUploadAndValidatePoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./clientDefinitions"; @@ -44,8 +44,7 @@ export async function getFileValidationPoller( const poller: SimplePollerLike, TestGetFile200Response> = { async poll(options?: { abortSignal?: AbortSignalLike }): Promise { if (options?.abortSignal?.aborted) { - state.error = new Error("The polling was aborted."); - return; + throw new AbortError("The polling was aborted."); } if (fileName) { @@ -101,11 +100,7 @@ export async function getFileValidationPoller( while (!poller.isDone()) { const delay = sleep(currentPollIntervalInMs, abortSignal); cancelJob = () => abortController.abort(); - try { - await delay; - } catch (ex: any) { - state.status = "canceled"; - } + await delay; await poller.poll({ abortSignal }); } } diff --git a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts index 76b5e1da9521..4566f025ce00 100644 --- a/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts +++ b/sdk/loadtestservice/load-testing-rest/src/getTestRunCompletionPoller.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AbortController, AbortSignalLike } from "@azure/abort-controller"; +import { AbortController, AbortError, AbortSignalLike } from "@azure/abort-controller"; import { CancelOnProgress, OperationState, SimplePollerLike } from "@azure/core-lro"; import { TestRunCompletionPoller, PolledOperationOptions } from "./models"; import { AzureLoadTestingClient } from "./clientDefinitions"; @@ -42,8 +42,7 @@ export async function getTestRunCompletionPoller( const poller: SimplePollerLike, TestRunGet200Response> = { async poll(options?: { abortSignal?: AbortSignalLike }): Promise { if (options?.abortSignal?.aborted) { - state.error = new Error("The polling was aborted."); - return; + throw new AbortError("The polling was aborted."); } if (testRunId) { @@ -86,11 +85,7 @@ export async function getTestRunCompletionPoller( while (!poller.isDone()) { const delay = sleep(currentPollIntervalInMs, abortSignal); cancelJob = () => abortController.abort(); - try { - await delay; - } catch (ex: any) { - state.status = "canceled"; - } + await delay; await poller.poll({ abortSignal }); } } diff --git a/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts b/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts index fe3dbd2a2873..b6df213724f6 100644 --- a/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts +++ b/sdk/loadtestservice/load-testing-rest/src/util/LROUtil.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { AbortSignalLike } from "@azure/abort-controller"; +import { AbortError, AbortSignalLike } from "@azure/abort-controller"; import { TestRunOutput } from "../outputModels"; -const REJECTED_ERR = new Error("The operation was aborted."); +const REJECTED_ERR = new AbortError("The polling was aborted."); export function sleep(ms: number, signal: AbortSignalLike): Promise { return new Promise((resolve, reject) => { diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts index 11056c5b3799..d1e0b164770b 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testAdministration.spec.ts @@ -62,7 +62,7 @@ describe("Test Creation", () => { assert.include(["201"], result.status); }); - it("should upload the test file with LRO", async () => { + it("should not upload the test file with LRO(timeout)", async () => { const fileUploadResult = await client .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") .put({ @@ -75,9 +75,31 @@ describe("Test Creation", () => { } const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - if (!fileValidatePoller) { - throw new Error("Missing poller"); + try { + await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(10), // timeout of 10 milliseconds + }); + } catch (ex: any) { + assert.equal(ex.message, "The polling was aborted."); + return; + } + + assert.fail(); + }); + + it("should upload the test file with LRO", async () => { + const fileUploadResult = await client + .path("/tests/{testId}/files/{fileName}", "abc", "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStreamTestFile, + }); + + if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; } + + const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); diff --git a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts index 2ec4c1969b72..cb4bcc59dd31 100644 --- a/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts +++ b/sdk/loadtestservice/load-testing-rest/test/public/testRun.spec.ts @@ -59,9 +59,6 @@ describe("Test Run Creation", () => { } const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - if (!fileValidatePoller) { - throw new Error("Missing poller"); - } await fileValidatePoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -84,9 +81,6 @@ describe("Test Run Creation", () => { testRunCreationResult.body.testRunId = "adjwfjsdmf"; const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - if (!testRunPoller) { - throw new Error("Missing poller"); - } await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -95,28 +89,32 @@ describe("Test Run Creation", () => { }); it("should timeout the test run", async () => { - const testRunCreationResult = await client.path("/test-runs/{testRunId}", "abcjad").patch({ - contentType: "application/merge-patch+json", - body: { - testId: "abc", - displayName: "sample123", - virtualUsers: 10, - }, - }); + const testRunCreationResult = await client + .path("/test-runs/{testRunId}", "randomtestrun4") + .patch({ + contentType: "application/merge-patch+json", + body: { + testId: "abc", + displayName: "sample123", + virtualUsers: 10, + }, + }); if (isUnexpected(testRunCreationResult)) { throw testRunCreationResult.body.error; } const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - if (!testRunPoller) { - throw new Error("Missing poller"); + try { + await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(10), // timeout of 10 millieconds + }); + } catch (ex: any) { + assert.equal(ex.name, "AbortError"); + return; } - await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(5000), // timeout of 5 seconds - }); - assert.equal("The operation was aborted.", testRunPoller.getOperationState().error?.message); + assert.fail(); }); it("should be able to create a test run", async () => { @@ -134,9 +132,6 @@ describe("Test Run Creation", () => { } const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - if (!testRunPoller) { - throw new Error("Missing poller"); - } await testRunPoller.pollUntilDone({ abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); @@ -186,4 +181,10 @@ describe("Test Run Creation", () => { assert.include(["204"], result.status); }); + + it("should delete the test", async () => { + const result = await client.path("/tests/{testId}", "abc").delete(); + + assert.include(["204"], result.status); + }); }); From 04caa77b810f311e8bb532ca9628b26c6aae8c5e Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 25 Jan 2023 17:19:03 +0530 Subject: [PATCH 57/60] Updated Sample --- .../samples/v1-beta/typescript/src/sample.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index 8d30cec43308..d8d33e16010e 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -115,12 +115,12 @@ async function main() { abortSignal: AbortController.timeout(60000), // timeout of 60 seconds }); } catch (ex: any) { - new Error("Error in polling test run completion" + ex.message); //polling timed out + new Error("Error in polling test run completion" + ex.message); //polling timed out } if (testRunPoller.getOperationState().status != "succeeded") throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - + if (testRunResult) { let testRunStarttime = testRunResult.body.startDateTime; let testRunEndTime = testRunResult.body.endDateTime; From 59a0d2596a61236889fa38325037b76c479ec8ed Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Wed, 25 Jan 2023 19:09:52 +0530 Subject: [PATCH 58/60] Updated API View --- .../load-testing-rest/review/load-testing.api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md index c734d10dd1b1..9d3dab82be1a 100644 --- a/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md +++ b/sdk/loadtestservice/load-testing-rest/review/load-testing.api.md @@ -137,10 +137,10 @@ export type FileUploadAndValidatePoller = SimplePollerLike = T extends Array ? TData : never; // @public (undocumented) -export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestUploadFileSuccessResponse): Promise; +export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestUploadFileSuccessResponse): Promise; // @public (undocumented) -export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestRunCreateOrUpdateSuccessResponse): Promise; +export function getLongRunningPoller(client: AzureLoadTestingClient, initialResponse: TestRunCreateOrUpdateSuccessResponse): Promise; // @public export type GetPage = (pageLink: string, maxPageSize?: number) => Promise<{ From 632644acbb23ca68820fdc5bf555c1fa07256aa2 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 26 Jan 2023 03:28:39 +0530 Subject: [PATCH 59/60] Updated package.json, Readme and Samples --- .../load-testing-rest/README.md | 156 ++++++++++-------- .../load-testing-rest/package.json | 8 +- .../load-testing-rest/samples-dev/sample.ts | 17 +- .../samples/v1-beta/javascript/package.json | 2 +- .../samples/v1-beta/javascript/sample.js | 17 +- .../samples/v1-beta/typescript/package.json | 2 +- .../samples/v1-beta/typescript/src/sample.ts | 17 +- 7 files changed, 124 insertions(+), 95 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/README.md b/sdk/loadtestservice/load-testing-rest/README.md index 7ebd7558558e..f7869585e071 100644 --- a/sdk/loadtestservice/load-testing-rest/README.md +++ b/sdk/loadtestservice/load-testing-rest/README.md @@ -126,7 +126,7 @@ await client.path("/tests/{testId}", TEST_ID).patch({ ### Uploading .jmx file to a Test ```javascript -import { AzureLoadTestingClient, beginUploadTestFile } from "@azure-rest/load-testing"; +import { AzureLoadTestingClient, getLongRunningPoller } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; import { createReadStream } from "fs"; @@ -136,32 +136,36 @@ var TEST_ID = "some-test-id"; const readStream = createReadStream("./sample.jmx"); const fileUploadResult = await client - .path("/tests/{testId}/files/{fileName}", TEST_ID, "sample.jmx") - .put({ - contentType: "application/octet-stream", - body: readStream, - }); + .path("/tests/{testId}/files/{fileName}", TEST_ID, "sample.jmx") + .put({ + contentType: "application/octet-stream", + body: readStream, + }); - if (isUnexpected(fileUploadResult)) { - throw fileUploadResult.body.error; - } +if (isUnexpected(fileUploadResult)) { + throw fileUploadResult.body.error; +} - const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - const fileValidateResult = await fileValidatePoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); +let fileValidateResult; +const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); +try{ +fileValidateResult = await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(120*1000), // timeout of 120 seconds +});} catch (ex: any) { +new Error("Error in polling file Validation" + ex.message); //polling timed out +} -if (fileUploadPoller.getOperationState().status != "succeeded") +if (fileUploadPoller.getOperationState().status != "succeeded" && fileValidateResult) throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + fileValidateResult.body.validationFailureDetails ); ``` -### Running a Test +### Running a Test and fetching Metrics ```javascript -import { AzureLoadTestingClient, beginCreateOrUpdateTestRun } from "@azure-rest/load-testing"; +import { AzureLoadTestingClient, getLongRunningPoller } from "@azure-rest/load-testing"; import { DefaultAzureCredential } from "@azure/identity"; const client: AzureLoadTestingClient = AzureLoadTesting(Endpoint, new DefaultAzureCredential()); @@ -171,78 +175,84 @@ var DISPLAY_NAME = "my-load-test"; var TEST_RUN_ID = "some-test-run-id"; // Creating/Updating the test run - const testRunCreationResult = await client.path("/test-runs/{testRunId}", TEST_RUN_ID).patch({ - contentType: "application/merge-patch+json", - body: { - testId: TEST_ID, - displayName: DISPLAY_NAME, - }, - }); +const testRunCreationResult = await client.path("/test-runs/{testRunId}", TEST_RUN_ID).patch({ + contentType: "application/merge-patch+json", + body: { + testId: TEST_ID, + displayName: DISPLAY_NAME, + }, +}); + +if (isUnexpected(testRunCreationResult)) { + throw testRunCreationResult.body.error; +} + +if (testRunCreationResult.body.testRunId === undefined) + throw new Error("Test Run ID returned as undefined."); - if (isUnexpected(testRunCreationResult)) { - throw testRunCreationResult.body.error; +const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); + let testRunResult; + + try { + testRunResult = await testRunPoller.pollUntilDone({ + abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + }); + } catch (ex: any) { + new Error("Error in polling test run completion" + ex.message); //polling timed out } - if (testRunCreationResult.body.testRunId === undefined) - throw new Error("Test Run ID returned as undefined."); + if (testRunPoller.getOperationState().status != "succeeded") + throw new Error("There is some issue in running the test, Error Response : " + testRunResult); - const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); - const testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); + if (testRunResult) { + let testRunStarttime = testRunResult.body.startDateTime; + let testRunEndTime = testRunResult.body.endDateTime; -if (testRunPoller.getOperationState().status != "succeeded" && testRunResult) - throw new Error("There is some issue in running the test, Error Response : " + testRunResult); + // get list of all metric namespaces and pick the first one + const metricNamespaces = await client + .path("/test-runs/{testRunId}/metric-namespaces", testRunId) + .get(); -let testRunStarttime = testRunResult.body.startDateTime; -let testRunEndTime = testRunResult.body.endDateTime; -let testRunId = testRunResult.body.testRunId; -if (testRunId) { - // get list of all metric namespaces and pick the first one - let metricNamespaces = await client - .path("/test-runs/{testRunId}/metric-namespaces", testRunId) - .get(); + if (isUnexpected(metricNamespaces)) { + throw metricNamespaces.body.error; + } - if (isUnexpected(metricNamespaces)) { - throw metricNamespaces.body.error; - } + const metricNamespace = metricNamespaces.body.value[0]; - let metricNamespace = metricNamespaces.body.value[0]; + if (metricNamespace.name === undefined) { + throw "No Metric Namespace name is defined."; + } - if (metricNamespace.name === undefined) { - throw "No Metric Namespace name is defined."; - } + // get list of all metric definitions and pick the first one + const metricDefinitions = await client + .path("/test-runs/{testRunId}/metric-definitions", testRunId) + .get({ + queryParameters: { + metricNamespace: metricNamespace.name, + }, + }); + + if (isUnexpected(metricDefinitions)) { + throw metricDefinitions.body.error; + } + + const metricDefinition = metricDefinitions.body.value[0]; + + if (metricDefinition.name === undefined) { + throw "No Metric Namespace name is defined."; + } - // get list of all metric definitions and pick the first one - let metricDefinitions = await client - .path("/test-runs/{testRunId}/metric-definitions", testRunId) - .get({ + // fetch client metrics using metric namespace and metric name + const metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ queryParameters: { + metricname: metricDefinition.name, metricNamespace: metricNamespace.name, + timespan: testRunStarttime + "/" + testRunEndTime, }, }); - if (isUnexpected(metricDefinitions)) { - throw metricDefinitions.body.error; - } - - let metricDefinition = metricDefinitions.body.value[0]; - - if (metricDefinition.name === undefined) { - throw "No Metric Namespace name is defined."; - } - - // fetch client metrics using metric namespace and metric name - let metricsResult = await client.path("/test-runs/{testRunId}/metrics", testRunId).post({ - queryParameters: { - metricname: metricDefinition.name, - metricNamespace: metricNamespace.name, - timespan: testRunStarttime + "/" + testRunEndTime, - }, - }); - - console.log(metricsResult); - console.log(testRunResult); + console.log(metricsResult); + console.log(testRunResult); } ``` diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index 612e805c1aba..ab6b4a01ab89 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -77,8 +77,8 @@ "@azure/logger": "^1.0.0", "tslib": "^2.2.0", "@azure/core-lro": "^2.4.1", - "@azure/core-util": "~1.1.2", - "@azure/abort-controller": "~1.1.1" + "@azure/core-util": "^1.1.2", + "@azure/abort-controller": "^1.1.1" }, "devDependencies": { "@azure-tools/test-credential": "~1.0.0", @@ -124,6 +124,10 @@ { "path": "swagger/README.md", "prefix": "package-version" + }, + { + "path": "src/azureLoadTesting.ts", + "prefix": "userAgentInfo" } ] }, diff --git a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts index 681eee3543a0..64517f65904d 100644 --- a/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples-dev/sample.ts @@ -57,12 +57,17 @@ async function main() { throw fileUploadResult.body.error; } + let fileValidateResult; const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - const fileValidateResult = await fileValidatePoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); + try { + fileValidateResult = await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(120 * 1000), // timeout of 120 seconds + }); + } catch (ex: any) { + new Error("Error in polling file Validation" + ex.message); //polling timed out + } - if (fileValidatePoller.getOperationState().status != "succeeded") + if (fileValidatePoller.getOperationState().status != "succeeded" && fileValidateResult) throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + fileValidateResult.body.validationFailureDetails @@ -108,12 +113,12 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); let testRunResult; + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); try { testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + abortSignal: AbortController.timeout(300 * 1000), // timeout of 5 minutes }); } catch (ex: any) { new Error("Error in polling test run completion" + ex.message); //polling timed out diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json index 9e4f2280e452..ba82aa85cf5d 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/package.json @@ -28,7 +28,7 @@ "dependencies": { "@azure-rest/load-testing": "next", "dotenv": "latest", - "@azure/abort-controller": "~1.1.1", + "@azure/abort-controller": "^1.1.1", "@azure/identity": "^2.0.1", "uuid": "^9.0.0" } diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js index 27a7696ecd82..953099a2e07c 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/javascript/sample.js @@ -57,12 +57,17 @@ async function main() { throw fileUploadResult.body.error; } + let fileValidateResult; const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - const fileValidateResult = await fileValidatePoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); + try { + fileValidateResult = await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(120 * 1000), // timeout of 120 seconds + }); + } catch (ex) { + new Error("Error in polling file Validation" + ex.message); //polling timed out + } - if (fileValidatePoller.getOperationState().status != "succeeded") + if (fileValidatePoller.getOperationState().status != "succeeded" && fileValidateResult) throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + fileValidateResult.body.validationFailureDetails @@ -109,12 +114,12 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); let testRunResult; + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); try { testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + abortSignal: AbortController.timeout(300 * 1000), // timeout of 5 minutes }); } catch (ex) { new Error("Error in polling test run completion" + ex.message); //polling timed out diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json index d689d27f31df..99ce7f8af62d 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/package.json @@ -32,7 +32,7 @@ "dependencies": { "@azure-rest/load-testing": "next", "dotenv": "latest", - "@azure/abort-controller": "~1.1.1", + "@azure/abort-controller": "^1.1.1", "@azure/identity": "^2.0.1", "uuid": "^9.0.0" }, diff --git a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts index d8d33e16010e..a85bc2dcbc2b 100644 --- a/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts +++ b/sdk/loadtestservice/load-testing-rest/samples/v1-beta/typescript/src/sample.ts @@ -56,12 +56,17 @@ async function main() { throw fileUploadResult.body.error; } + let fileValidateResult; const fileValidatePoller = await getLongRunningPoller(client, fileUploadResult); - const fileValidateResult = await fileValidatePoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds - }); + try { + fileValidateResult = await fileValidatePoller.pollUntilDone({ + abortSignal: AbortController.timeout(120 * 1000), // timeout of 120 seconds + }); + } catch (ex: any) { + new Error("Error in polling file Validation" + ex.message); //polling timed out + } - if (fileValidatePoller.getOperationState().status != "succeeded") + if (fileValidatePoller.getOperationState().status != "succeeded" && fileValidateResult) throw new Error( "There is some issue in validation, please make sure uploaded file is a valid JMX." + fileValidateResult.body.validationFailureDetails @@ -107,12 +112,12 @@ async function main() { if (testRunCreationResult.body.testRunId === undefined) throw new Error("Test Run ID returned as undefined."); - const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); let testRunResult; + const testRunPoller = await getLongRunningPoller(client, testRunCreationResult); try { testRunResult = await testRunPoller.pollUntilDone({ - abortSignal: AbortController.timeout(60000), // timeout of 60 seconds + abortSignal: AbortController.timeout(300 * 1000), // timeout of 5 minutes }); } catch (ex: any) { new Error("Error in polling test run completion" + ex.message); //polling timed out From e377544b66cb889976d6cf9f04d213ceda451216 Mon Sep 17 00:00:00 2001 From: Mrinal Gautam <69429426+mrinal2601@users.noreply.github.com> Date: Thu, 26 Jan 2023 09:48:20 +0530 Subject: [PATCH 60/60] Updated Release date and core-client version --- sdk/loadtestservice/load-testing-rest/CHANGELOG.md | 4 ++-- sdk/loadtestservice/load-testing-rest/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/loadtestservice/load-testing-rest/CHANGELOG.md b/sdk/loadtestservice/load-testing-rest/CHANGELOG.md index d2b22211dbe8..463433d343cb 100644 --- a/sdk/loadtestservice/load-testing-rest/CHANGELOG.md +++ b/sdk/loadtestservice/load-testing-rest/CHANGELOG.md @@ -1,12 +1,12 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.2 (2023-01-26) Second preview release of Azure Load Testing client library for Javascript. ### Features Added -- Added `LoadTestClient.beginUploadTestFile` and `LoadTestClient.beginCreateOrUpdateTestRun` Long-Running operation +- Added `LoadTestClient.getLongRunningPoller` Long-Running operation helper ### Breaking Changes diff --git a/sdk/loadtestservice/load-testing-rest/package.json b/sdk/loadtestservice/load-testing-rest/package.json index ab6b4a01ab89..bac42325c14d 100644 --- a/sdk/loadtestservice/load-testing-rest/package.json +++ b/sdk/loadtestservice/load-testing-rest/package.json @@ -70,7 +70,7 @@ "sideEffects": false, "autoPublish": false, "dependencies": { - "@azure-rest/core-client": "1.0.0-beta.10", + "@azure-rest/core-client": "^1.0.0", "@azure/core-auth": "^1.3.0", "@azure/core-paging": "^1.2.0", "@azure/core-rest-pipeline": "^1.8.0",