Skip to content

Commit

Permalink
LoadTest Service: new preview api version (#18169)
Browse files Browse the repository at this point in the history
* adding data plane apis for load test service

* adding custom words

* Azure load test api 2022-03-01-preview

* New API version for fetching client metrics

* validation fixes

* typo fix

* resolving comments

* prettier run

* updated new examples

* renamed all files

* updated all secrets fields

* updates examples reference in spec

* updated pf criteria examples

* updated resource id field

* updated subnet fields

* updated all examples

* added host and schemes

* fix file type value

* renamed file

* updated all the examples

* removed validate file api ref and examples

* adding back all the params left out by oav tool

* resolve comments

* updated jmx filetype to be 0

* Improve descriptions

* updated nextlink

* resolving comments

* added filetype description

* update filetype enum

* Custom words

* Typo fixes

* Modify FileUrl description

* description "ISO 8601"

* matching regex for semantics

* move testId from params to inline - fix semantics

* moved api version def to inline

* added apiversion type string

* temp change dele app component

* semantics fix

* fixing testId and apiversion semantic

* added oneOf for schema

* testId query and path param changes

* appcomponent spec and example updates

* fix required type definition

* added readonly to testArtifacts

* removing required from resultUrl and logsUrl

* temp changes apiversion inline

* reverting temp changes

* fix lint validation

* adding required value in fileUrlList

* order testID param, refactor error, security scope

* file put api returns fileUrl model

* updated examples

* File api changes

* prettier fix

* adhering error model to rest api guidelines

* added next link in file url list

* updated example for nextlink fileUrlList

* added continuation token for get all files

* updated secret description

Co-authored-by: Krishna Chandak <krchanda@microsoft.com>
Co-authored-by: Venkat Ragavan <mail2venkat21@gmail.com>
Co-authored-by: Harshan B <harshan01@gmail.com>
Co-authored-by: harshan-b <101398067+harshan-b@users.noreply.github.com>
  • Loading branch information
5 people authored May 24, 2022
1 parent 0ea2274 commit d7216e4
Show file tree
Hide file tree
Showing 29 changed files with 5,142 additions and 1 deletion.
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1959,6 +1959,7 @@ SPDX
specversion
speechservicesmanagement
speechtotext
splitAllCSVs
SQLAG
sqldatabase
SQLDB
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
{
"parameters": {
"testRunId": "12316678-1234-1234-1234-122451189012",
"oldTestRunId": "12345678-1234-1234-1234-123456789012",
"api-version": "2022-06-01-preview",
"body": {
"displayName": "Performance_LoadTest_Run1",
"testId": "12345678-1234-1234-1234-123456789012",
"description": "sample description",
"loadTestConfig": {
"engineInstances": 6,
"splitAllCSVs": true
},
"passFailCriteria": {
"passFailMetrics": {
"fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": {
"clientmetric": "response_time_ms",
"aggregate": "percentage",
"condition": ">",
"value": 20,
"action": "continue"
}
}
},
"secrets": {
"secret1": {
"value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827",
"type": "AKV_SECRET_URI"
}
},
"environmentVariables": {
"envvar1": "sampletext"
}
}
},
"responses": {
"200": {
"body": {
"testRunId": "12316678-1234-1234-1234-122451189012",
"displayName": "Performance_LoadTest_Run1",
"testId": "12345678-1234-1234-1234-123456789012",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.loadtestservice/sampleresourcetype/sampleresourcename",
"description": "sample description",
"status": "ACCEPTED",
"startDateTime": "2021-12-05T16:43:48.125Z",
"endDateTime": "2021-12-05T16:43:48.125Z",
"loadTestConfig": {
"engineInstances": 6,
"splitAllCSVs": true
},
"testResult": "Passed",
"passFailCriteria": {
"passFailMetrics": {
"fefd759d-7fe8-4f83-8b6d-aeebe0f491fe": {
"clientmetric": "response_time_ms",
"aggregate": "percentage",
"condition": ">",
"value": 20,
"action": "continue",
"actualValue": 10,
"result": "passed"
}
}
},
"testArtifacts": {
"inputArtifacts": {
"configUrl": {
"url": "https://dummyurl.com/configresource",
"fileId": "92345678-1234-1111-1234-123456789012",
"filename": "config.yaml",
"fileType": 2,
"expireTime": "2021-12-05T16:43:46.072Z",
"validationStatus": ""
},
"testScriptUrl": {
"url": "https://dummyurl.com/testscriptresource",
"fileId": "92345678-1234-1111-1234-123456789011",
"filename": "sample.jmx",
"fileType": 0,
"expireTime": "2021-12-05T16:43:46.072Z",
"validationStatus": "VALIDATION_SUCCESS"
},
"userPropUrl": {
"url": "https://dummyurl.com/userpropresource",
"fileId": "92345678-1234-1111-1234-123456789013",
"filename": "user.properties",
"fileType": 1,
"expireTime": "2021-12-05T16:43:46.072Z",
"validationStatus": ""
},
"inputArtifactsZipFileurl": {
"url": "https://dummyurl.com/inputartifactzipresource",
"fileId": "92345678-1234-1111-1234-123456789012",
"filename": "inputartifacts.zip",
"fileType": 2,
"expireTime": "2021-12-05T16:43:46.072Z",
"validationStatus": ""
},
"additionalUrls": []
},
"outputArtifacts": {
"resultUrl": {
"url": "https://dummyurl.com/dummyresourceresult",
"fileId": "92345678-1234-1111-1234-123456789012",
"filename": "sample.jmx",
"fileType": 0,
"expireTime": "2021-12-05T16:43:46.072Z",
"validationStatus": "VALIDATION_SUCCESS"
},
"logsUrl": {
"url": "https://dummyurl.com/logresource",
"fileId": "abb846a7-63af-4d63-bb3d-a7aa4caff55c",
"filename": "worker.log",
"fileType": 2,
"expireTime": "2022-05-16T09:14:46.0411793+00:00",
"validationStatus": ""
}
}
},
"executedDateTime": "2021-12-05T16:43:48.125Z",
"vusers": 4,
"testRunStatistics": {
"Total": {
"transaction": "Total",
"sampleCount": 18,
"errorCount": 19,
"errorPct": 17,
"meanResTime": 13,
"medianResTime": 10,
"maxResTime": 16,
"minResTime": 18,
"pct1ResTime": 27,
"pct2ResTime": 20,
"pct3ResTime": 3,
"throughput": 5,
"receivedKBytesPerSec": 13,
"sentKBytesPerSec": 4
}
},
"createdDateTime": "2021-12-05T16:43:46.072Z",
"createdBy": "elon-musk@microsoft.com",
"lastModifiedDateTime": "2021-12-05T16:43:46.072Z",
"lastModifiedBy": "elon-musk@microsoft.com",
"portalUrl": "https://portal.azure.com/dummyresource",
"secrets": {
"secret1": {
"value": "https://samplevault.vault.azure.net/secrets/samplesecret/f113f91fd4c44a368049849c164db827",
"type": "AKV_SECRET_URI"
}
},
"environmentVariables": {
"envvar1": "sampletext"
},
"duration": 18,
"subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/Microsoft.Network/virtualNetworks/samplenetworkresource/subnets/AAAAA0A0A0"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parameters": {
"name": "ee843bd9-a6d4-4364-a45c-427a03c39fa7",
"api-version": "2022-06-01-preview",
"body": {
"testId": "12345678-1234-1234-1234-123456789012",
"testRunId": "12316678-1234-1234-1234-122451189012",
"value": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
"resourceType": "microsoft.insights/components",
"resourceName": "appcomponentresource",
"displayName": "Performance_LoadTest_Insights",
"kind": "web"
}
}
}
},
"responses": {
"200": {
"body": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.loadtestservice/sampleresourcetype/sampleresourcename",
"testId": "12345678-1234-1234-1234-123456789012",
"testRunId": "12316678-1234-1234-1234-122451189012",
"name": "ee843bd9-a6d4-4364-a45c-427a03c39fa7",
"value": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
"resourceType": "microsoft.insights/components",
"resourceName": "appcomponentresource",
"displayName": "Performance_LoadTest_Insights",
"resourceGroup": "samplerg",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"kind": "web"
}
}
}
},
"201": {
"body": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.loadtestservice/sampleresourcetype/sampleresourcename",
"testId": "12345678-1234-1234-1234-123456789012",
"testRunId": "12316678-1234-1234-1234-122451189012",
"name": "ee843bd9-a6d4-4364-a45c-427a03c39fa7",
"value": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
"resourceType": "microsoft.insights/components",
"resourceName": "appcomponentresource",
"displayName": "Performance_LoadTest_Insights",
"resourceGroup": "samplerg",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"kind": "web"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"parameters": {
"name": "edc6e529-d009-4b99-b763-ca492e3a2823",
"api-version": "2022-06-01-preview",
"body": {
"testId": "12345678-1234-1234-1234-123456789012",
"testRunId": "12316678-1234-1234-1234-122451189012",
"metrics": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
"metricnamespace": "microsoft.insights/components",
"displayDescription": "sample description",
"name": {
"value": "requests/duration",
"localizedValue": "Server Response Time"
},
"aggregation": "Average",
"unit": null,
"resourceType": "microsoft.insights/components"
}
}
}
},
"responses": {
"200": {
"body": {
"name": "edc6e529-d009-4b99-b763-ca492e3a2823",
"testId": "12345678-1234-1234-1234-123456789012",
"testRunId": "12316678-1234-1234-1234-122451189012",
"metrics": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
"metricnamespace": "microsoft.insights/components",
"displayDescription": "sample description",
"name": {
"value": "requests/duration",
"localizedValue": "Server Response Time"
},
"aggregation": "Average",
"unit": null,
"resourceType": "microsoft.insights/components"
}
}
}
},
"201": {
"body": {
"name": "edc6e529-d009-4b99-b763-ca492e3a2823",
"testId": "12345678-1234-1234-1234-123456789012",
"testRunId": "12316678-1234-1234-1234-122451189012",
"metrics": {
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration": {
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource/providers/microsoft.insights/metricdefinitions/requests/duration",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/samplerg/providers/microsoft.insights/components/appcomponentresource",
"metricnamespace": "microsoft.insights/components",
"displayDescription": "sample description",
"name": {
"value": "requests/duration",
"localizedValue": "Server Response Time"
},
"aggregation": "Average",
"unit": null,
"resourceType": "microsoft.insights/components"
}
}
}
}
}
}
Loading

0 comments on commit d7216e4

Please sign in to comment.