Skip to content

Commit 5fd36a6

Browse files
authored
undo the changes to have pagination for test plan and suite in task to unblock customers (#7329)
1 parent b00469e commit 5fd36a6

File tree

2 files changed

+25
-29
lines changed

2 files changed

+25
-29
lines changed

Tasks/VsTest/task.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"version": {
1818
"Major": 2,
1919
"Minor": 136,
20-
"Patch": 1
20+
"Patch": 2
2121
},
2222
"demands": [
2323
"vstest"
@@ -462,29 +462,27 @@
462462
"visibleRule": "rerunFailedTests = true"
463463
}
464464
],
465-
"dataSourceBindings": [
465+
"sourceDefinitions": [
466466
{
467467
"target": "testPlan",
468-
"endpointId": "tfs:teamfoundation",
469-
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/plans?filterActivePlans=true&api-version=3.0-preview.2&$skip={{skip}}&$top=1000",
470-
"resultSelector": "jsonpath:$.value[*]",
471-
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{id}}} - {{{name}}}\" }",
472-
"callbackContextTemplate": "{\"skip\": \"{{add skip 1000}}\"}",
473-
"callbackRequiredTemplate": "{{isEqualNumber result.count 1000}}",
474-
"initialContextTemplate": "{\"skip\": \"0\"}"
468+
"endpoint": "/$(system.teamProject)/_apis/test/plans?filterActivePlans=true&api-version=3.0-preview.2",
469+
"selector": "jsonpath:$.value[*].name",
470+
"keySelector": "jsonpath:$.value[*].id",
471+
"authKey": "tfs:teamfoundation"
475472
},
476473
{
477474
"target": "testConfiguration",
478475
"endpointId": "tfs:teamfoundation",
479-
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/configurations?api-version=3.0-preview.1",
480-
"resultSelector": "jsonpath:$.value[*]",
481-
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{id}}} - {{{name}}}\" }"
476+
"endpoint": "/$(system.teamProject)/_apis/test/configurations?api-version=3.0-preview.1",
477+
"selector": "jsonpath:$.value[*].name",
478+
"keySelector": "jsonpath:$.value[*].id",
479+
"authKey": "tfs:teamfoundation"
482480
},
483481
{
484482
"target": "testSuite",
485-
"endpointId": "tfs:teamfoundation",
486-
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/plans/{{testPlan}}/suites?$asTreeView=true&api-version=3.0-preview.2",
487-
"resultSelector": "jsonpath:$.value[*]"
483+
"endpoint": "/$(system.teamProject)/_apis/test/plans/$(testPlan)/suites?$asTreeView=true&api-version=3.0-preview.2",
484+
"selector": "jsonpath:$.value[*]",
485+
"authKey": "tfs:teamfoundation"
488486
}
489487
],
490488
"instanceNameFormat": "VsTest - $(testSelector)",

Tasks/VsTest/task.loc.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -462,29 +462,27 @@
462462
"visibleRule": "rerunFailedTests = true"
463463
}
464464
],
465-
"dataSourceBindings": [
465+
"sourceDefinitions": [
466466
{
467467
"target": "testPlan",
468-
"endpointId": "tfs:teamfoundation",
469-
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/plans?filterActivePlans=true&api-version=3.0-preview.2&$skip={{skip}}&$top=1000",
470-
"resultSelector": "jsonpath:$.value[*]",
471-
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{id}}} - {{{name}}}\" }",
472-
"callbackContextTemplate": "{\"skip\": \"{{add skip 1000}}\"}",
473-
"callbackRequiredTemplate": "{{isEqualNumber result.count 1000}}",
474-
"initialContextTemplate": "{\"skip\": \"0\"}"
468+
"endpoint": "/$(system.teamProject)/_apis/test/plans?filterActivePlans=true&api-version=3.0-preview.2",
469+
"selector": "jsonpath:$.value[*].name",
470+
"keySelector": "jsonpath:$.value[*].id",
471+
"authKey": "tfs:teamfoundation"
475472
},
476473
{
477474
"target": "testConfiguration",
478475
"endpointId": "tfs:teamfoundation",
479-
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/configurations?api-version=3.0-preview.1",
480-
"resultSelector": "jsonpath:$.value[*]",
481-
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{id}}} - {{{name}}}\" }"
476+
"endpoint": "/$(system.teamProject)/_apis/test/configurations?api-version=3.0-preview.1",
477+
"selector": "jsonpath:$.value[*].name",
478+
"keySelector": "jsonpath:$.value[*].id",
479+
"authKey": "tfs:teamfoundation"
482480
},
483481
{
484482
"target": "testSuite",
485-
"endpointId": "tfs:teamfoundation",
486-
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/plans/{{testPlan}}/suites?$asTreeView=true&api-version=3.0-preview.2",
487-
"resultSelector": "jsonpath:$.value[*]"
483+
"endpoint": "/$(system.teamProject)/_apis/test/plans/$(testPlan)/suites?$asTreeView=true&api-version=3.0-preview.2",
484+
"selector": "jsonpath:$.value[*]",
485+
"authKey": "tfs:teamfoundation"
488486
}
489487
],
490488
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",

0 commit comments

Comments
 (0)