azure-devops-extension-api 4.242.0 → 4.245.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Alert/Alert.d.ts +3 -2
- package/Alert/AlertClient.d.ts +12 -0
- package/Alert/AlertClient.js +38 -2
- package/Alert/AlertClient.min.js +1 -1
- package/Build/BuildClient.js +1 -1
- package/Build/BuildClient.min.js +1 -1
- package/Contributions/Contributions.d.ts +5 -1
- package/Contributions/Contributions.js +4 -0
- package/Contributions/Contributions.min.js +1 -1
- package/ExtensionManagement/ExtensionManagement.d.ts +5 -1
- package/ExtensionManagement/ExtensionManagement.js +4 -0
- package/ExtensionManagement/ExtensionManagement.min.js +1 -1
- package/Management/Management.d.ts +0 -32
- package/Management/Management.js +0 -15
- package/Management/Management.min.js +1 -1
- package/Management/ManagementClient.d.ts +0 -25
- package/Management/ManagementClient.js +0 -81
- package/Management/ManagementClient.min.js +1 -1
- package/Pipelines/Pipelines.d.ts +1 -1
- package/Release/ReleaseClient.d.ts +2 -2
- package/Release/ReleaseClient.js +17 -30
- package/Release/ReleaseClient.min.js +1 -1
- package/ServiceEndpoint/ServiceEndpoint.d.ts +11 -0
- package/ServiceEndpoint/ServiceEndpoint.js +7 -0
- package/ServiceEndpoint/ServiceEndpoint.min.js +1 -1
- package/TaskAgent/TaskAgent.d.ts +5 -0
- package/Test/Test.d.ts +102 -5
- package/Test/Test.js +36 -0
- package/TestPlan/TestPlanClient.d.ts +7 -0
- package/TestPlan/TestPlanClient.js +37 -0
- package/TestPlan/TestPlanClient.min.js +1 -1
- package/TestResults/TestResultsClient.d.ts +34 -11
- package/TestResults/TestResultsClient.js +76 -25
- package/TestResults/TestResultsClient.min.js +1 -1
- package/package.json +1 -1
package/Test/Test.d.ts
CHANGED
|
@@ -737,38 +737,98 @@ export interface CreateTestRunRequest {
|
|
|
737
737
|
*/
|
|
738
738
|
export interface CustomTestField {
|
|
739
739
|
/**
|
|
740
|
-
* Field
|
|
740
|
+
* Name of the Custom Test Field
|
|
741
741
|
*/
|
|
742
742
|
fieldName: string;
|
|
743
743
|
/**
|
|
744
|
-
*
|
|
744
|
+
* 1. If the CustomTestField is registered as Bit data type, value should be sent as case insensitive string - either "true" or "false". 2. If the CustomTestField is registered as Datetime data type, value should be sent as string in the format of "YYYY-MM-DD hh:mm:ss" 3. If the CustomTestField is registered as Int data type, value should be sent as string representation of 32 bit signed integer. Ex: "5". 4. If the CustomTestField is registered as Float data type, value should be sent as string for example "4.237" 5. If the CustomTestField is registered as String data type, Any string up to 1kB is accepted. 6. If the CustomTestField is registered as Guid, value should be sent as case insensitive string representation of GUID in usual format "XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXX" where X can be either number 0-9 or letter A-F. For example "f88d6b84-3549-4af0-a4f4-58139cd0a14f".
|
|
745
745
|
*/
|
|
746
746
|
value: any;
|
|
747
747
|
}
|
|
748
|
+
/**
|
|
749
|
+
* Data structure which stores details for the customTestFields to be updated
|
|
750
|
+
*/
|
|
748
751
|
export interface CustomTestFieldDefinition {
|
|
752
|
+
/**
|
|
753
|
+
* ID assigned to the custom test field upon creation, should be left empty when creating.
|
|
754
|
+
*/
|
|
749
755
|
fieldId: number;
|
|
756
|
+
/**
|
|
757
|
+
* The name of custom field cannot be longer than 50 characters (spaces, numbers, and special characters are not allowed) and must be unique in the project. The names are case insensitive.
|
|
758
|
+
*/
|
|
750
759
|
fieldName: string;
|
|
760
|
+
/**
|
|
761
|
+
* Data type of the customTestField.
|
|
762
|
+
*/
|
|
751
763
|
fieldType: CustomTestFieldType;
|
|
764
|
+
/**
|
|
765
|
+
* Artifact to which customTestField will be set.
|
|
766
|
+
*/
|
|
752
767
|
scope: CustomTestFieldScope;
|
|
753
768
|
}
|
|
769
|
+
/**
|
|
770
|
+
* Type of the artifact applicable to CustomTestField.
|
|
771
|
+
*/
|
|
754
772
|
export declare enum CustomTestFieldScope {
|
|
755
773
|
None = 0,
|
|
774
|
+
/**
|
|
775
|
+
* Custom field can be used with TestRun artifact.
|
|
776
|
+
*/
|
|
756
777
|
TestRun = 1,
|
|
778
|
+
/**
|
|
779
|
+
* Custom field can be used with TestResult artifact.
|
|
780
|
+
*/
|
|
757
781
|
TestResult = 2,
|
|
782
|
+
/**
|
|
783
|
+
* Custom test field can be used with either TestRun or TestResult artifact.
|
|
784
|
+
*/
|
|
758
785
|
TestRunAndTestResult = 3,
|
|
786
|
+
/**
|
|
787
|
+
* Reserved for internal Azure DevOps functionality. Not to be used.
|
|
788
|
+
*/
|
|
759
789
|
System = 4,
|
|
760
790
|
All = 7
|
|
761
791
|
}
|
|
792
|
+
/**
|
|
793
|
+
* Data type of the custom test field
|
|
794
|
+
*/
|
|
762
795
|
export declare enum CustomTestFieldType {
|
|
796
|
+
/**
|
|
797
|
+
* Boolean data type.
|
|
798
|
+
*/
|
|
763
799
|
Bit = 2,
|
|
800
|
+
/**
|
|
801
|
+
* Datetime data type.
|
|
802
|
+
*/
|
|
764
803
|
DateTime = 4,
|
|
804
|
+
/**
|
|
805
|
+
* Integer data type.
|
|
806
|
+
*/
|
|
765
807
|
Int = 8,
|
|
808
|
+
/**
|
|
809
|
+
* Floating integer data type.
|
|
810
|
+
*/
|
|
766
811
|
Float = 6,
|
|
812
|
+
/**
|
|
813
|
+
* String data type.
|
|
814
|
+
*/
|
|
767
815
|
String = 12,
|
|
816
|
+
/**
|
|
817
|
+
* Unique identifier data type.
|
|
818
|
+
*/
|
|
768
819
|
Guid = 14
|
|
769
820
|
}
|
|
821
|
+
/**
|
|
822
|
+
* Data structure which stores details for the customTestField to be updated.
|
|
823
|
+
*/
|
|
770
824
|
export interface CustomTestFieldUpdateDefinition {
|
|
825
|
+
/**
|
|
826
|
+
* Custom test field id which is to be updated.
|
|
827
|
+
*/
|
|
771
828
|
fieldId: number;
|
|
829
|
+
/**
|
|
830
|
+
* The name of custom field cannot be longer than 50 characters(spaces, numbers, and special characters are not allowed) and must be unique in the project.CustomTestField name is case insensitive.
|
|
831
|
+
*/
|
|
772
832
|
fieldName: string;
|
|
773
833
|
}
|
|
774
834
|
export interface DatedTestFieldData {
|
|
@@ -1223,6 +1283,10 @@ export interface Machine {
|
|
|
1223
1283
|
* GUID identifier for the environment the machine was configured with
|
|
1224
1284
|
*/
|
|
1225
1285
|
environmentUid: string;
|
|
1286
|
+
/**
|
|
1287
|
+
* Machine instance id
|
|
1288
|
+
*/
|
|
1289
|
+
instanceId: number;
|
|
1226
1290
|
/**
|
|
1227
1291
|
* Name of the machine
|
|
1228
1292
|
*/
|
|
@@ -1928,7 +1992,7 @@ export interface RunCreateModel {
|
|
|
1928
1992
|
*/
|
|
1929
1993
|
controller: string;
|
|
1930
1994
|
/**
|
|
1931
|
-
*
|
|
1995
|
+
* List of custom data for additional categorization of the test run. Value of the CustomTestField cannot be more than 1KB.
|
|
1932
1996
|
*/
|
|
1933
1997
|
customTestFields: CustomTestField[];
|
|
1934
1998
|
/**
|
|
@@ -2173,7 +2237,7 @@ export interface RunUpdateModel {
|
|
|
2173
2237
|
*/
|
|
2174
2238
|
controller: string;
|
|
2175
2239
|
/**
|
|
2176
|
-
*
|
|
2240
|
+
* List of custom data for additional categorization of the test run. Value of the CustomTestField cannot be more than 1KB.
|
|
2177
2241
|
*/
|
|
2178
2242
|
customTestFields: CustomTestField[];
|
|
2179
2243
|
/**
|
|
@@ -2809,7 +2873,7 @@ export interface TestCaseResult {
|
|
|
2809
2873
|
*/
|
|
2810
2874
|
createdDate: Date;
|
|
2811
2875
|
/**
|
|
2812
|
-
*
|
|
2876
|
+
* Array of custom data for additional categorization of the test result. Value of the CustomTestField cannot be more than 1KB.
|
|
2813
2877
|
*/
|
|
2814
2878
|
customFields: CustomTestField[];
|
|
2815
2879
|
/**
|
|
@@ -3607,6 +3671,7 @@ export interface TestMessageLogEntry2 {
|
|
|
3607
3671
|
export interface TestMethod {
|
|
3608
3672
|
container: string;
|
|
3609
3673
|
name: string;
|
|
3674
|
+
testResult: TestCaseResult;
|
|
3610
3675
|
}
|
|
3611
3676
|
/**
|
|
3612
3677
|
* Class representing a reference to an operation.
|
|
@@ -4128,6 +4193,38 @@ export interface TestResultHistoryForGroup {
|
|
|
4128
4193
|
*/
|
|
4129
4194
|
results: TestCaseResult[];
|
|
4130
4195
|
}
|
|
4196
|
+
/**
|
|
4197
|
+
* Class to capture logs associated with a TestResultMachine
|
|
4198
|
+
*/
|
|
4199
|
+
export interface TestResultLog {
|
|
4200
|
+
/**
|
|
4201
|
+
* FileType of the log being attached to a TestResultMachine Valid values : AutomationLogFile, Screenshot, LogFolder, Other
|
|
4202
|
+
*/
|
|
4203
|
+
fileType: string;
|
|
4204
|
+
/**
|
|
4205
|
+
* Path to the log file. Max length: 300 characters
|
|
4206
|
+
*/
|
|
4207
|
+
path: string;
|
|
4208
|
+
/**
|
|
4209
|
+
* Type of the path for the log Valid values : AzureBlobStorage, UNC, URI
|
|
4210
|
+
*/
|
|
4211
|
+
type: string;
|
|
4212
|
+
}
|
|
4213
|
+
/**
|
|
4214
|
+
* Class to map TestCaseResult to Machine objects the test ran on
|
|
4215
|
+
*/
|
|
4216
|
+
export interface TestResultMachine {
|
|
4217
|
+
configurationName: string;
|
|
4218
|
+
isReportingMachine: boolean;
|
|
4219
|
+
machineName: string;
|
|
4220
|
+
processorArchitecture: string;
|
|
4221
|
+
properties: {
|
|
4222
|
+
[key: string]: any;
|
|
4223
|
+
};
|
|
4224
|
+
sessionMachineInstanceId: number;
|
|
4225
|
+
testResultId: number;
|
|
4226
|
+
testResultLogs: TestResultLog[];
|
|
4227
|
+
}
|
|
4131
4228
|
/**
|
|
4132
4229
|
* Represents a Meta Data of a test result.
|
|
4133
4230
|
*/
|
package/Test/Test.js
CHANGED
|
@@ -207,22 +207,58 @@ define(["require", "exports"], function (require, exports) {
|
|
|
207
207
|
*/
|
|
208
208
|
CoverageSummaryStatus[CoverageSummaryStatus["UpdateRequestQueued"] = 5] = "UpdateRequestQueued";
|
|
209
209
|
})(CoverageSummaryStatus = exports.CoverageSummaryStatus || (exports.CoverageSummaryStatus = {}));
|
|
210
|
+
/**
|
|
211
|
+
* Type of the artifact applicable to CustomTestField.
|
|
212
|
+
*/
|
|
210
213
|
var CustomTestFieldScope;
|
|
211
214
|
(function (CustomTestFieldScope) {
|
|
212
215
|
CustomTestFieldScope[CustomTestFieldScope["None"] = 0] = "None";
|
|
216
|
+
/**
|
|
217
|
+
* Custom field can be used with TestRun artifact.
|
|
218
|
+
*/
|
|
213
219
|
CustomTestFieldScope[CustomTestFieldScope["TestRun"] = 1] = "TestRun";
|
|
220
|
+
/**
|
|
221
|
+
* Custom field can be used with TestResult artifact.
|
|
222
|
+
*/
|
|
214
223
|
CustomTestFieldScope[CustomTestFieldScope["TestResult"] = 2] = "TestResult";
|
|
224
|
+
/**
|
|
225
|
+
* Custom test field can be used with either TestRun or TestResult artifact.
|
|
226
|
+
*/
|
|
215
227
|
CustomTestFieldScope[CustomTestFieldScope["TestRunAndTestResult"] = 3] = "TestRunAndTestResult";
|
|
228
|
+
/**
|
|
229
|
+
* Reserved for internal Azure DevOps functionality. Not to be used.
|
|
230
|
+
*/
|
|
216
231
|
CustomTestFieldScope[CustomTestFieldScope["System"] = 4] = "System";
|
|
217
232
|
CustomTestFieldScope[CustomTestFieldScope["All"] = 7] = "All";
|
|
218
233
|
})(CustomTestFieldScope = exports.CustomTestFieldScope || (exports.CustomTestFieldScope = {}));
|
|
234
|
+
/**
|
|
235
|
+
* Data type of the custom test field
|
|
236
|
+
*/
|
|
219
237
|
var CustomTestFieldType;
|
|
220
238
|
(function (CustomTestFieldType) {
|
|
239
|
+
/**
|
|
240
|
+
* Boolean data type.
|
|
241
|
+
*/
|
|
221
242
|
CustomTestFieldType[CustomTestFieldType["Bit"] = 2] = "Bit";
|
|
243
|
+
/**
|
|
244
|
+
* Datetime data type.
|
|
245
|
+
*/
|
|
222
246
|
CustomTestFieldType[CustomTestFieldType["DateTime"] = 4] = "DateTime";
|
|
247
|
+
/**
|
|
248
|
+
* Integer data type.
|
|
249
|
+
*/
|
|
223
250
|
CustomTestFieldType[CustomTestFieldType["Int"] = 8] = "Int";
|
|
251
|
+
/**
|
|
252
|
+
* Floating integer data type.
|
|
253
|
+
*/
|
|
224
254
|
CustomTestFieldType[CustomTestFieldType["Float"] = 6] = "Float";
|
|
255
|
+
/**
|
|
256
|
+
* String data type.
|
|
257
|
+
*/
|
|
225
258
|
CustomTestFieldType[CustomTestFieldType["String"] = 12] = "String";
|
|
259
|
+
/**
|
|
260
|
+
* Unique identifier data type.
|
|
261
|
+
*/
|
|
226
262
|
CustomTestFieldType[CustomTestFieldType["Guid"] = 14] = "Guid";
|
|
227
263
|
})(CustomTestFieldType = exports.CustomTestFieldType || (exports.CustomTestFieldType = {}));
|
|
228
264
|
var FlakyDetectionType;
|
|
@@ -254,6 +254,13 @@ export declare class TestPlanRestClient extends RestClientBase {
|
|
|
254
254
|
* @param testCaseId - Id of test case to be deleted.
|
|
255
255
|
*/
|
|
256
256
|
deleteTestCase(project: string, testCaseId: number): Promise<void>;
|
|
257
|
+
/**
|
|
258
|
+
* Get a list of deleted test plans
|
|
259
|
+
*
|
|
260
|
+
* @param project - Project ID or project name
|
|
261
|
+
* @param continuationToken - If the list of plans returned is not complete, a continuation token to query next batch of plans is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test plans.
|
|
262
|
+
*/
|
|
263
|
+
getDeletedTestPlans(project: string, continuationToken?: string): Promise<WebApi.PagedList<TestPlan.TestPlan>>;
|
|
257
264
|
/**
|
|
258
265
|
* Restores the deleted test plan
|
|
259
266
|
*
|
|
@@ -861,6 +861,43 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
861
861
|
});
|
|
862
862
|
});
|
|
863
863
|
};
|
|
864
|
+
/**
|
|
865
|
+
* Get a list of deleted test plans
|
|
866
|
+
*
|
|
867
|
+
* @param project - Project ID or project name
|
|
868
|
+
* @param continuationToken - If the list of plans returned is not complete, a continuation token to query next batch of plans is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test plans.
|
|
869
|
+
*/
|
|
870
|
+
TestPlanRestClient.prototype.getDeletedTestPlans = function (project, continuationToken) {
|
|
871
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
872
|
+
var queryValues;
|
|
873
|
+
var _this = this;
|
|
874
|
+
return __generator(this, function (_a) {
|
|
875
|
+
queryValues = {
|
|
876
|
+
continuationToken: continuationToken
|
|
877
|
+
};
|
|
878
|
+
return [2 /*return*/, this.beginRequest({
|
|
879
|
+
apiVersion: "7.2-preview.1",
|
|
880
|
+
routeTemplate: "{project}/_apis/testplan/recycleBin/TestPlan/{planId}",
|
|
881
|
+
routeValues: {
|
|
882
|
+
project: project
|
|
883
|
+
},
|
|
884
|
+
queryParams: queryValues,
|
|
885
|
+
returnRawResponse: true
|
|
886
|
+
}).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
|
887
|
+
var body;
|
|
888
|
+
return __generator(this, function (_a) {
|
|
889
|
+
switch (_a.label) {
|
|
890
|
+
case 0: return [4 /*yield*/, response.text().then(Serialization_1.deserializeVssJsonObject)];
|
|
891
|
+
case 1:
|
|
892
|
+
body = _a.sent();
|
|
893
|
+
body.continuationToken = response.headers.get("x-ms-continuationtoken");
|
|
894
|
+
return [2 /*return*/, body];
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
}); })];
|
|
898
|
+
});
|
|
899
|
+
});
|
|
900
|
+
};
|
|
864
901
|
/**
|
|
865
902
|
* Restores the deleted test plan
|
|
866
903
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(o=2&n[0]?i.return:n[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,n[1])).done)return o;switch(i=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,i=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){a.label=n[1];break}if(6===n[0]&&a.label<o[1]){a.label=o[1],o=n;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(n);break}o[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],i=0}finally{r=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}var r,i,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createTestConfiguration=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestConfguration=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){return n={testConfiguartionId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:e},queryParams:n})]})})},t.prototype.getTestConfigurationById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:e,testConfigurationId:t}})]})})},t.prototype.getTestConfigurations=function(e,t){return __awaiter(this,void 0,void 0,function(){var n,i=this;return __generator(this,function(o){return n={continuationToken:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:e},queryParams:n,returnRawResponse:!0}).then(function(e){return __awaiter(i,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestConfiguration=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={testConfiguartionId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.getTestEntityCountByPlanId=function(e,t,n,r,i,o,s,a){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={states:n,outcome:r,configurations:i,testers:o,assignedTo:s,entity:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Count/{planId}",routeValues:{project:e,planId:t},queryParams:u})]})})},t.prototype.createTestPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:e,planId:t}})]})})},t.prototype.getTestPlanById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:e,planId:t}})]})})},t.prototype.getTestPlans=function(e,t,n,i,o){return __awaiter(this,void 0,void 0,function(){var s,a=this;return __generator(this,function(u){return s={owner:t,continuationToken:n,includePlanDetails:i,filterActivePlans:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:e},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestPlan=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:t,planId:n},body:e})]})})},t.prototype.getSuiteEntries=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={suiteEntryType:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/SuiteEntry/{suiteId}",routeValues:{project:e,suiteId:t},queryParams:r})]})})},t.prototype.reorderSuiteEntries=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/SuiteEntry/{suiteId}",routeValues:{project:t,suiteId:n},body:e})]})})},t.prototype.createBulkTestSuites=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{parentSuiteId}/bulk",routeValues:{project:t,planId:n,parentSuiteId:r},body:e})]})})},t.prototype.createTestSuite=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:t,planId:n},body:e})]})})},t.prototype.deleteTestSuite=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t,suiteId:n}})]})})},t.prototype.getTestSuiteById=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={expand:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t,suiteId:n},queryParams:i})]})})},t.prototype.getTestSuitesForPlan=function(e,t,n,i,o){return __awaiter(this,void 0,void 0,function(){var s,a=this;return __generator(this,function(u){return s={expand:n,continuationToken:i,asTreeView:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestSuite=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:t,planId:n,suiteId:r},body:e})]})})},t.prototype.getSuitesByTestCaseId=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(n){return t={testCaseId:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/testplan/Suites",queryParams:t})]})})},t.prototype.addTestCasesToSuite=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:t,planId:n,suiteId:r},body:e})]})})},t.prototype.getTestCase=function(e,t,n,r,i,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={witFields:i,returnIdentityRef:o},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:e,planId:t,suiteId:n,testCaseId:r},queryParams:s})]})})},t.prototype.getTestCaseList=function(e,t,n,i,o,s,a,u,p,c,l){return __awaiter(this,void 0,void 0,function(){var d,_=this;return __generator(this,function(h){return d={testIds:i,configurationIds:o,witFields:s,continuationToken:a,returnIdentityRef:u,expand:p,excludeFlags:c,isRecursive:l},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:e,planId:t,suiteId:n},queryParams:d,returnRawResponse:!0}).then(function(e){return __awaiter(_,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.removeTestCasesFromSuite=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testCaseIds:r},[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:e,planId:t,suiteId:n},queryParams:i})]})})},t.prototype.removeTestCasesListFromSuite=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testIds:r},[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:e,planId:t,suiteId:n},queryParams:i})]})})},t.prototype.updateSuiteTestCases=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:t,planId:n,suiteId:r},body:e})]})})},t.prototype.cloneTestCase=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testplan/TestCases/CloneTestCaseOperation/{cloneOperationId}",routeValues:{project:t},body:e})]})})},t.prototype.getTestCaseCloneInformation=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/TestCases/CloneTestCaseOperation/{cloneOperationId}",routeValues:{project:e,cloneOperationId:t}})]})})},t.prototype.exportTestCases=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testplan/TestCases/TestCaseFile",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestCase=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/TestCases/{testCaseId}",routeValues:{project:e,testCaseId:t}})]})})},t.prototype.restoreDeletedTestPlan=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/recycleBin/TestPlan/{planId}",routeValues:{project:t,planId:n},body:e})]})})},t.prototype.cloneTestPlan=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={deepClone:n},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/CloneOperation/{cloneOperationId}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.getCloneInformation=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/Plans/CloneOperation/{cloneOperationId}",routeValues:{project:e,cloneOperationId:t}})]})})},t.prototype.getPoints=function(e,t,n,r,i,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={pointId:r,returnIdentityRef:i,includePointDetails:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",routeValues:{project:e,planId:t,suiteId:n},queryParams:s})]})})},t.prototype.getPointsList=function(e,t,n,i,o,s,a,u,p){return __awaiter(this,void 0,void 0,function(){var c,l=this;return __generator(this,function(d){return c={testPointIds:i,testCaseId:o,continuationToken:s,returnIdentityRef:a,includePointDetails:u,isRecursive:p},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",routeValues:{project:e,planId:t,suiteId:n},queryParams:c,returnRawResponse:!0}).then(function(e){return __awaiter(l,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestPoints=function(e,t,n,r,i,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={includePointDetails:i,returnIdentityRef:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",routeValues:{project:t,planId:n,suiteId:r},queryParams:s,body:e})]})})},t.prototype.restoreDeletedTestSuite=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/recycleBin/TestSuite/{suiteId}",routeValues:{project:t,suiteId:n},body:e})]})})},t.prototype.cloneTestSuite=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={deepClone:n},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testplan/Suites/CloneOperation/{cloneOperationId}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.getSuiteCloneInformation=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/Suites/CloneOperation/{cloneOperationId}",routeValues:{project:e,cloneOperationId:t}})]})})},t.prototype.createTestVariable=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestVariable=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:e,testVariableId:t}})]})})},t.prototype.getTestVariableById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:e,testVariableId:t}})]})})},t.prototype.getTestVariables=function(e,t){return __awaiter(this,void 0,void 0,function(){var n,i=this;return __generator(this,function(o){return n={continuationToken:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:e},queryParams:n,returnRawResponse:!0}).then(function(e){return __awaiter(i,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestVariable=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:t,testVariableId:n},body:e})]})})},t}(n.RestClientBase);t.TestPlanRestClient=i});
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),__awaiter=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(s,a)}u((r=r.apply(e,t||[])).next())})},__generator=this&&this.__generator||function(e,t){function n(n){return function(s){return function(n){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(o=2&n[0]?i.return:n[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,n[1])).done)return o;switch(i=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return a.label++,{value:n[1],done:!1};case 5:a.label++,i=n[1],n=[0];continue;case 7:n=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===n[0]||2===n[0])){a=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){a.label=n[1];break}if(6===n[0]&&a.label<o[1]){a.label=o[1],o=n;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(n);break}o[2]&&a.ops.pop(),a.trys.pop();continue}n=t.call(e,a)}catch(e){n=[6,e],i=0}finally{r=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,s])}}var r,i,o,s,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return s={next:n(0),throw:n(1),return:n(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s};define(["require","exports","../Common/RestClientBase","../Common/Util/Serialization"],function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.createTestConfiguration=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestConfguration=function(e,t){return __awaiter(this,void 0,void 0,function(){var n;return __generator(this,function(r){return n={testConfiguartionId:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:e},queryParams:n})]})})},t.prototype.getTestConfigurationById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:e,testConfigurationId:t}})]})})},t.prototype.getTestConfigurations=function(e,t){return __awaiter(this,void 0,void 0,function(){var n,i=this;return __generator(this,function(o){return n={continuationToken:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:e},queryParams:n,returnRawResponse:!0}).then(function(e){return __awaiter(i,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestConfiguration=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={testConfiguartionId:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Configurations/{testConfigurationId}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.getTestEntityCountByPlanId=function(e,t,n,r,i,o,s,a){return __awaiter(this,void 0,void 0,function(){var u;return __generator(this,function(p){return u={states:n,outcome:r,configurations:i,testers:o,assignedTo:s,entity:a},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Count/{planId}",routeValues:{project:e,planId:t},queryParams:u})]})})},t.prototype.createTestPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestPlan=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:e,planId:t}})]})})},t.prototype.getTestPlanById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:e,planId:t}})]})})},t.prototype.getTestPlans=function(e,t,n,i,o){return __awaiter(this,void 0,void 0,function(){var s,a=this;return __generator(this,function(u){return s={owner:t,continuationToken:n,includePlanDetails:i,filterActivePlans:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:e},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestPlan=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Plans/{planId}",routeValues:{project:t,planId:n},body:e})]})})},t.prototype.getSuiteEntries=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={suiteEntryType:n},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/SuiteEntry/{suiteId}",routeValues:{project:e,suiteId:t},queryParams:r})]})})},t.prototype.reorderSuiteEntries=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/SuiteEntry/{suiteId}",routeValues:{project:t,suiteId:n},body:e})]})})},t.prototype.createBulkTestSuites=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{parentSuiteId}/bulk",routeValues:{project:t,planId:n,parentSuiteId:r},body:e})]})})},t.prototype.createTestSuite=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:t,planId:n},body:e})]})})},t.prototype.deleteTestSuite=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t,suiteId:n}})]})})},t.prototype.getTestSuiteById=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={expand:r},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t,suiteId:n},queryParams:i})]})})},t.prototype.getTestSuitesForPlan=function(e,t,n,i,o){return __awaiter(this,void 0,void 0,function(){var s,a=this;return __generator(this,function(u){return s={expand:n,continuationToken:i,asTreeView:o},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:e,planId:t},queryParams:s,returnRawResponse:!0}).then(function(e){return __awaiter(a,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestSuite=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}",routeValues:{project:t,planId:n,suiteId:r},body:e})]})})},t.prototype.getSuitesByTestCaseId=function(e){return __awaiter(this,void 0,void 0,function(){var t;return __generator(this,function(n){return t={testCaseId:e},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"_apis/testplan/Suites",queryParams:t})]})})},t.prototype.addTestCasesToSuite=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:t,planId:n,suiteId:r},body:e})]})})},t.prototype.getTestCase=function(e,t,n,r,i,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={witFields:i,returnIdentityRef:o},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:e,planId:t,suiteId:n,testCaseId:r},queryParams:s})]})})},t.prototype.getTestCaseList=function(e,t,n,i,o,s,a,u,p,c,l){return __awaiter(this,void 0,void 0,function(){var d,_=this;return __generator(this,function(h){return d={testIds:i,configurationIds:o,witFields:s,continuationToken:a,returnIdentityRef:u,expand:p,excludeFlags:c,isRecursive:l},[2,this.beginRequest({apiVersion:"7.2-preview.3",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:e,planId:t,suiteId:n},queryParams:d,returnRawResponse:!0}).then(function(e){return __awaiter(_,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.removeTestCasesFromSuite=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testCaseIds:r},[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:e,planId:t,suiteId:n},queryParams:i})]})})},t.prototype.removeTestCasesListFromSuite=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){var i;return __generator(this,function(o){return i={testIds:r},[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:e,planId:t,suiteId:n},queryParams:i})]})})},t.prototype.updateSuiteTestCases=function(e,t,n,r){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(i){return[2,this.beginRequest({apiVersion:"7.2-preview.3",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestCase/{testCaseId}",routeValues:{project:t,planId:n,suiteId:r},body:e})]})})},t.prototype.cloneTestCase=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testplan/TestCases/CloneTestCaseOperation/{cloneOperationId}",routeValues:{project:t},body:e})]})})},t.prototype.getTestCaseCloneInformation=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/TestCases/CloneTestCaseOperation/{cloneOperationId}",routeValues:{project:e,cloneOperationId:t}})]})})},t.prototype.exportTestCases=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",httpResponseType:"application/octet-stream",routeTemplate:"{project}/_apis/testplan/TestCases/TestCaseFile",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestCase=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/TestCases/{testCaseId}",routeValues:{project:e,testCaseId:t}})]})})},t.prototype.getDeletedTestPlans=function(e,t){return __awaiter(this,void 0,void 0,function(){var n,i=this;return __generator(this,function(o){return n={continuationToken:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/recycleBin/TestPlan/{planId}",routeValues:{project:e},queryParams:n,returnRawResponse:!0}).then(function(e){return __awaiter(i,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.restoreDeletedTestPlan=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/recycleBin/TestPlan/{planId}",routeValues:{project:t,planId:n},body:e})]})})},t.prototype.cloneTestPlan=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={deepClone:n},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testplan/Plans/CloneOperation/{cloneOperationId}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.getCloneInformation=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/Plans/CloneOperation/{cloneOperationId}",routeValues:{project:e,cloneOperationId:t}})]})})},t.prototype.getPoints=function(e,t,n,r,i,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={pointId:r,returnIdentityRef:i,includePointDetails:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",routeValues:{project:e,planId:t,suiteId:n},queryParams:s})]})})},t.prototype.getPointsList=function(e,t,n,i,o,s,a,u,p){return __awaiter(this,void 0,void 0,function(){var c,l=this;return __generator(this,function(d){return c={testPointIds:i,testCaseId:o,continuationToken:s,returnIdentityRef:a,includePointDetails:u,isRecursive:p},[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",routeValues:{project:e,planId:t,suiteId:n},queryParams:c,returnRawResponse:!0}).then(function(e){return __awaiter(l,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestPoints=function(e,t,n,r,i,o){return __awaiter(this,void 0,void 0,function(){var s;return __generator(this,function(a){return s={includePointDetails:i,returnIdentityRef:o},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Plans/{planId}/Suites/{suiteId}/TestPoint/{pointIds}",routeValues:{project:t,planId:n,suiteId:r},queryParams:s,body:e})]})})},t.prototype.restoreDeletedTestSuite=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/recycleBin/TestSuite/{suiteId}",routeValues:{project:t,suiteId:n},body:e})]})})},t.prototype.cloneTestSuite=function(e,t,n){return __awaiter(this,void 0,void 0,function(){var r;return __generator(this,function(i){return r={deepClone:n},[2,this.beginRequest({apiVersion:"7.2-preview.2",method:"POST",routeTemplate:"{project}/_apis/testplan/Suites/CloneOperation/{cloneOperationId}",routeValues:{project:t},queryParams:r,body:e})]})})},t.prototype.getSuiteCloneInformation=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.2",routeTemplate:"{project}/_apis/testplan/Suites/CloneOperation/{cloneOperationId}",routeValues:{project:e,cloneOperationId:t}})]})})},t.prototype.createTestVariable=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"POST",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:t},body:e})]})})},t.prototype.deleteTestVariable=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"DELETE",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:e,testVariableId:t}})]})})},t.prototype.getTestVariableById=function(e,t){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(n){return[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:e,testVariableId:t}})]})})},t.prototype.getTestVariables=function(e,t){return __awaiter(this,void 0,void 0,function(){var n,i=this;return __generator(this,function(o){return n={continuationToken:t},[2,this.beginRequest({apiVersion:"7.2-preview.1",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:e},queryParams:n,returnRawResponse:!0}).then(function(e){return __awaiter(i,void 0,void 0,function(){var t;return __generator(this,function(n){switch(n.label){case 0:return[4,e.text().then(r.deserializeVssJsonObject)];case 1:return t=n.sent(),t.continuationToken=e.headers.get("x-ms-continuationtoken"),[2,t]}})})})]})})},t.prototype.updateTestVariable=function(e,t,n){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(r){return[2,this.beginRequest({apiVersion:"7.2-preview.1",method:"PATCH",routeTemplate:"{project}/_apis/testplan/Variables/{testVariableId}",routeValues:{project:t,testVariableId:n},body:e})]})})},t}(n.RestClientBase);t.TestPlanRestClient=i});
|
|
@@ -182,22 +182,30 @@ export declare class TestResultsRestClient extends RestClientBase {
|
|
|
182
182
|
*/
|
|
183
183
|
getTestRunCodeCoverage(project: string, runId: number, flags: number): Promise<Test.TestRunCoverage[]>;
|
|
184
184
|
/**
|
|
185
|
-
*
|
|
185
|
+
* Creates custom test fields based on the data provided.
|
|
186
|
+
*
|
|
187
|
+
* @param newFields - NewFields is an array of type CustomTestFieldDefinition.
|
|
186
188
|
* @param project - Project ID or project name
|
|
187
189
|
*/
|
|
188
190
|
addCustomFields(newFields: Test.CustomTestFieldDefinition[], project: string): Promise<Test.CustomTestFieldDefinition[]>;
|
|
189
191
|
/**
|
|
192
|
+
* Returns List of custom test fields for the given custom test field scope.
|
|
193
|
+
*
|
|
190
194
|
* @param project - Project ID or project name
|
|
191
|
-
* @param scopeFilter -
|
|
195
|
+
* @param scopeFilter - Scope of custom test fields which are to be returned.
|
|
192
196
|
*/
|
|
193
197
|
queryCustomFields(project: string, scopeFilter: Test.CustomTestFieldScope): Promise<Test.CustomTestFieldDefinition[]>;
|
|
194
198
|
/**
|
|
199
|
+
* Returns details of the custom test field for the specified testExtensionFieldId.
|
|
200
|
+
*
|
|
195
201
|
* @param project - Project ID or project name
|
|
196
|
-
* @param testExtensionFieldId -
|
|
202
|
+
* @param testExtensionFieldId - Custom test field id which has to be deleted.
|
|
197
203
|
*/
|
|
198
204
|
deleteCustomFieldById(project: string, testExtensionFieldId: number): Promise<void>;
|
|
199
205
|
/**
|
|
200
|
-
*
|
|
206
|
+
* Returns details of the custom test field which is updated.
|
|
207
|
+
*
|
|
208
|
+
* @param updateCustomTestField - Custom test field which has to be updated.
|
|
201
209
|
* @param project - Project ID or project name
|
|
202
210
|
*/
|
|
203
211
|
updateCustomField(updateCustomTestField: Test.CustomTestFieldUpdateDefinition, project: string): Promise<Test.CustomTestFieldDefinition>;
|
|
@@ -781,13 +789,6 @@ export declare class TestResultsRestClient extends RestClientBase {
|
|
|
781
789
|
* @param type - Default is GeneralAttachment, type of empty file to be created
|
|
782
790
|
*/
|
|
783
791
|
testLogStoreEndpointDetailsForRun(project: string, runId: number, testLogStoreOperationType: Test.TestLogStoreOperationType, filePath?: string, type?: Test.TestLogType): Promise<Test.TestLogStoreEndpointDetails>;
|
|
784
|
-
/**
|
|
785
|
-
* Retrieves Test runs associated to a session
|
|
786
|
-
*
|
|
787
|
-
* @param project - Project ID or project name
|
|
788
|
-
* @param sessionId - Id of TestResults session to obtain Test Runs for.
|
|
789
|
-
*/
|
|
790
|
-
getTestRunsBySessionId(project: string, sessionId: number): Promise<number[]>;
|
|
791
792
|
/**
|
|
792
793
|
* Creates TestResultsSession object in TCM data store
|
|
793
794
|
*
|
|
@@ -880,6 +881,28 @@ export declare class TestResultsRestClient extends RestClientBase {
|
|
|
880
881
|
* @param runId - RunId of test run
|
|
881
882
|
*/
|
|
882
883
|
updateTestResultsToTestRunSession(results: Test.TestCaseResult[], project: string, runId: number): Promise<number[]>;
|
|
884
|
+
/**
|
|
885
|
+
* Creates test result machines for the provided TestRunId
|
|
886
|
+
*
|
|
887
|
+
* @param testResultMachines - List of machines for test results in the run
|
|
888
|
+
* @param project - Project ID or project name
|
|
889
|
+
* @param runId - ID of the TestRun to add machines for
|
|
890
|
+
*/
|
|
891
|
+
createTestResultMachines(testResultMachines: Test.TestResultMachine[], project: string, runId: number): Promise<void>;
|
|
892
|
+
/**
|
|
893
|
+
* Gets test result machines for the provided TestRunId
|
|
894
|
+
*
|
|
895
|
+
* @param project - Project ID or project name
|
|
896
|
+
* @param runId - ID of the TestRun to add machines for
|
|
897
|
+
*/
|
|
898
|
+
getTestResultMachines(project: string, runId: number): Promise<Test.TestResultMachine[]>;
|
|
899
|
+
/**
|
|
900
|
+
* Retrieves Test runs associated to a session
|
|
901
|
+
*
|
|
902
|
+
* @param project - Project ID or project name
|
|
903
|
+
* @param sessionId - Id of TestResults session to obtain Test Runs for.
|
|
904
|
+
*/
|
|
905
|
+
getTestRunsBySessionId(project: string, sessionId: number): Promise<number[]>;
|
|
883
906
|
/**
|
|
884
907
|
* @param testSettings -
|
|
885
908
|
* @param project - Project ID or project name
|
|
@@ -634,7 +634,9 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
634
634
|
});
|
|
635
635
|
};
|
|
636
636
|
/**
|
|
637
|
-
*
|
|
637
|
+
* Creates custom test fields based on the data provided.
|
|
638
|
+
*
|
|
639
|
+
* @param newFields - NewFields is an array of type CustomTestFieldDefinition.
|
|
638
640
|
* @param project - Project ID or project name
|
|
639
641
|
*/
|
|
640
642
|
TestResultsRestClient.prototype.addCustomFields = function (newFields, project) {
|
|
@@ -653,8 +655,10 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
653
655
|
});
|
|
654
656
|
};
|
|
655
657
|
/**
|
|
658
|
+
* Returns List of custom test fields for the given custom test field scope.
|
|
659
|
+
*
|
|
656
660
|
* @param project - Project ID or project name
|
|
657
|
-
* @param scopeFilter -
|
|
661
|
+
* @param scopeFilter - Scope of custom test fields which are to be returned.
|
|
658
662
|
*/
|
|
659
663
|
TestResultsRestClient.prototype.queryCustomFields = function (project, scopeFilter) {
|
|
660
664
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -675,8 +679,10 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
675
679
|
});
|
|
676
680
|
};
|
|
677
681
|
/**
|
|
682
|
+
* Returns details of the custom test field for the specified testExtensionFieldId.
|
|
683
|
+
*
|
|
678
684
|
* @param project - Project ID or project name
|
|
679
|
-
* @param testExtensionFieldId -
|
|
685
|
+
* @param testExtensionFieldId - Custom test field id which has to be deleted.
|
|
680
686
|
*/
|
|
681
687
|
TestResultsRestClient.prototype.deleteCustomFieldById = function (project, testExtensionFieldId) {
|
|
682
688
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -694,7 +700,9 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
694
700
|
});
|
|
695
701
|
};
|
|
696
702
|
/**
|
|
697
|
-
*
|
|
703
|
+
* Returns details of the custom test field which is updated.
|
|
704
|
+
*
|
|
705
|
+
* @param updateCustomTestField - Custom test field which has to be updated.
|
|
698
706
|
* @param project - Project ID or project name
|
|
699
707
|
*/
|
|
700
708
|
TestResultsRestClient.prototype.updateCustomField = function (updateCustomTestField, project) {
|
|
@@ -2674,26 +2682,6 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
2674
2682
|
});
|
|
2675
2683
|
});
|
|
2676
2684
|
};
|
|
2677
|
-
/**
|
|
2678
|
-
* Retrieves Test runs associated to a session
|
|
2679
|
-
*
|
|
2680
|
-
* @param project - Project ID or project name
|
|
2681
|
-
* @param sessionId - Id of TestResults session to obtain Test Runs for.
|
|
2682
|
-
*/
|
|
2683
|
-
TestResultsRestClient.prototype.getTestRunsBySessionId = function (project, sessionId) {
|
|
2684
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2685
|
-
return __generator(this, function (_a) {
|
|
2686
|
-
return [2 /*return*/, this.beginRequest({
|
|
2687
|
-
apiVersion: "7.2-preview.2",
|
|
2688
|
-
routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/runs",
|
|
2689
|
-
routeValues: {
|
|
2690
|
-
project: project,
|
|
2691
|
-
sessionId: sessionId
|
|
2692
|
-
}
|
|
2693
|
-
})];
|
|
2694
|
-
});
|
|
2695
|
-
});
|
|
2696
|
-
};
|
|
2697
2685
|
/**
|
|
2698
2686
|
* Creates TestResultsSession object in TCM data store
|
|
2699
2687
|
*
|
|
@@ -2820,7 +2808,7 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
2820
2808
|
return [2 /*return*/, this.beginRequest({
|
|
2821
2809
|
apiVersion: "7.2-preview.2",
|
|
2822
2810
|
method: "POST",
|
|
2823
|
-
routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/
|
|
2811
|
+
routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/machines",
|
|
2824
2812
|
routeValues: {
|
|
2825
2813
|
project: project,
|
|
2826
2814
|
sessionId: sessionId
|
|
@@ -2971,6 +2959,69 @@ define(["require", "exports", "../Common/RestClientBase", "../Common/Util/Serial
|
|
|
2971
2959
|
});
|
|
2972
2960
|
});
|
|
2973
2961
|
};
|
|
2962
|
+
/**
|
|
2963
|
+
* Creates test result machines for the provided TestRunId
|
|
2964
|
+
*
|
|
2965
|
+
* @param testResultMachines - List of machines for test results in the run
|
|
2966
|
+
* @param project - Project ID or project name
|
|
2967
|
+
* @param runId - ID of the TestRun to add machines for
|
|
2968
|
+
*/
|
|
2969
|
+
TestResultsRestClient.prototype.createTestResultMachines = function (testResultMachines, project, runId) {
|
|
2970
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2971
|
+
return __generator(this, function (_a) {
|
|
2972
|
+
return [2 /*return*/, this.beginRequest({
|
|
2973
|
+
apiVersion: "7.2-preview.2",
|
|
2974
|
+
method: "POST",
|
|
2975
|
+
routeTemplate: "{project}/_apis/testresults/testsession/runs/{runId}/machines",
|
|
2976
|
+
routeValues: {
|
|
2977
|
+
project: project,
|
|
2978
|
+
runId: runId
|
|
2979
|
+
},
|
|
2980
|
+
body: testResultMachines
|
|
2981
|
+
})];
|
|
2982
|
+
});
|
|
2983
|
+
});
|
|
2984
|
+
};
|
|
2985
|
+
/**
|
|
2986
|
+
* Gets test result machines for the provided TestRunId
|
|
2987
|
+
*
|
|
2988
|
+
* @param project - Project ID or project name
|
|
2989
|
+
* @param runId - ID of the TestRun to add machines for
|
|
2990
|
+
*/
|
|
2991
|
+
TestResultsRestClient.prototype.getTestResultMachines = function (project, runId) {
|
|
2992
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2993
|
+
return __generator(this, function (_a) {
|
|
2994
|
+
return [2 /*return*/, this.beginRequest({
|
|
2995
|
+
apiVersion: "7.2-preview.2",
|
|
2996
|
+
routeTemplate: "{project}/_apis/testresults/testsession/runs/{runId}/machines",
|
|
2997
|
+
routeValues: {
|
|
2998
|
+
project: project,
|
|
2999
|
+
runId: runId
|
|
3000
|
+
}
|
|
3001
|
+
})];
|
|
3002
|
+
});
|
|
3003
|
+
});
|
|
3004
|
+
};
|
|
3005
|
+
/**
|
|
3006
|
+
* Retrieves Test runs associated to a session
|
|
3007
|
+
*
|
|
3008
|
+
* @param project - Project ID or project name
|
|
3009
|
+
* @param sessionId - Id of TestResults session to obtain Test Runs for.
|
|
3010
|
+
*/
|
|
3011
|
+
TestResultsRestClient.prototype.getTestRunsBySessionId = function (project, sessionId) {
|
|
3012
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3013
|
+
return __generator(this, function (_a) {
|
|
3014
|
+
return [2 /*return*/, this.beginRequest({
|
|
3015
|
+
apiVersion: "7.2-preview.2",
|
|
3016
|
+
routeTemplate: "{project}/_apis/testresults/testsession/{sessionId}/runs",
|
|
3017
|
+
routeValues: {
|
|
3018
|
+
project: project,
|
|
3019
|
+
sessionId: sessionId
|
|
3020
|
+
}
|
|
3021
|
+
})];
|
|
3022
|
+
});
|
|
3023
|
+
});
|
|
3024
|
+
};
|
|
2974
3025
|
/**
|
|
2975
3026
|
* @param testSettings -
|
|
2976
3027
|
* @param project - Project ID or project name
|