-
Notifications
You must be signed in to change notification settings - Fork 2.6k
/
Copy pathtask.json
179 lines (179 loc) · 6.56 KB
/
task.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
{
"id": "105e2492-460a-4da6-56d5-2fa9ab3f0174",
"name": "AzureTestPlan",
"friendlyName": "Azure Test Plan",
"description": "Run manual and automated tests in test plan in Java and python language",
"helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results",
"helpMarkDown": "[Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=613742)",
"category": "Test",
"visibility": [
"Build",
"Release"
],
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 241,
"Patch": 4
},
"preview": true,
"demands": [],
"minimumAgentVersion": "2.144.0",
"inputs": [
{
"name": "testSelector",
"type": "pickList",
"label": "Test cases to be executed",
"required": true,
"helpMarkDown": "<ul><li><b>Manual tests: </b>Use this option to trigger manual tests from your test plan.</li><li><b>Automated tests: </b>Use this option to run tests from your test plan that have automated test method associated with it.</li>",
"options": {
"manualTests": "Manual tests",
"automatedTests": "Automated tests"
},
"properties": {
"MultiSelectFlatList": "True"
}
},
{
"name": "testPlan",
"type": "pickList",
"label": "Test plan",
"defaultValue": "",
"required": true,
"helpMarkDown": "Select a test plan containing test suites with test cases.",
"properties": {
"DisableManageLink": "True",
"EditableOptions": "True"
}
},
{
"name": "testSuite",
"type": "pickList",
"label": "Test suite",
"defaultValue": "",
"helpMarkDown": "Select one or more test suites containing test cases.",
"required": true,
"properties": {
"MultiSelect": "True",
"DisableManageLink": "True",
"EditableOptions": "True"
}
},
{
"name": "testConfiguration",
"type": "pickList",
"label": "Test configuration",
"defaultValue": "",
"required": true,
"helpMarkDown": "Select Test Configuration.",
"properties": {
"DisableManageLink": "True",
"EditableOptions": "True"
}
},
{
"name": "testLanguageInput",
"type": "pickList",
"label": "Select Test framework language",
"helpMarkDown": "Test Framework Language of automated tests in test plan",
"options": {
"Java-Maven": "Java-Maven",
"Java-Gradle": "Java-Gradle",
"Python": "Python",
"Go": "Go"
}
},
{
"name": "mergeTestResults",
"type": "boolean",
"label": "Merge test results",
"defaultValue": "false",
"required": false,
"helpMarkDown": "A test run is created for each results file. Check this option to merge results into a single test run. To optimize for better performance, results will be merged into a single run if there are more than 100 result files, irrespective of this option."
},
{
"name": "publishRunAttachments",
"type": "boolean",
"label": "Upload test results files",
"defaultValue": "true",
"required": false,
"helpMarkDown": "Upload logs and other files containing diagnostic information collected when the tests were run.",
"groupName": "advanced"
},
{
"name": "failTaskOnFailedTests",
"type": "boolean",
"label": "Fail if there are test failures",
"defaultValue": "false",
"required": false,
"helpMarkDown": "Fail the task if there are any test failures. Check this option to fail the task if test failures are detected in the result files."
},
{
"name": "failTaskOnFailureToPublishResults",
"type": "boolean",
"label": "Fail if there is failure in publishing test results",
"defaultValue": false,
"required": false,
"helpMarkDown": "Fail if there is failure in publishing test results. Check this option to fail the task if publishing test results is failed partially."
},
{
"name": "failTaskOnMissingResultsFile",
"type": "boolean",
"label": "Fail if no result files are found",
"defaultValue": false,
"required": false,
"helpMarkDown": "Fail the task if no result files are found."
}
],
"dataSourceBindings": [
{
"target": "testPlan",
"endpointId": "tfs:teamfoundation",
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/plans?filterActivePlans=true&api-version=3.0-preview.2&$skip={{skip}}&$top=1000",
"resultSelector": "jsonpath:$.value[*]",
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{id}}} - {{{name}}}\" }",
"callbackContextTemplate": "{\"skip\": \"{{add skip 1000}}\"}",
"callbackRequiredTemplate": "{{isEqualNumber result.count 1000}}",
"initialContextTemplate": "{\"skip\": \"0\"}"
},
{
"target": "testConfiguration",
"endpointId": "tfs:teamfoundation",
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/configurations?api-version=3.0-preview.1",
"resultSelector": "jsonpath:$.value[*]",
"resultTemplate": "{ \"Value\" : \"{{{id}}}\", \"DisplayValue\" : \"{{{id}}} - {{{name}}}\" }"
},
{
"target": "testSuite",
"endpointId": "tfs:teamfoundation",
"endpointUrl": "{{endpoint.url}}/{{system.teamProject}}/_apis/test/plans/{{testPlan}}/suites?$asTreeView=true&api-version=3.0-preview.2",
"parameters": {
"testPlan": "$(testPlan)"
},
"resultSelector": "jsonpath:$.value[*]"
}
],
"instanceNameFormat": "Azure Test Plan - $(testSelector)",
"execution": {
"Node10": {
"target": "runTestPlan.js",
"argumentFormat": ""
},
"Node16": {
"target": "runTestPlan.js",
"argumentFormat": ""
}
},
"messages": {
"testPlanInput": "Test plan Id : %s",
"testplanConfigInput": "Test plan configuration Id : %s",
"testSuiteSelected": "Test suite Id selected: %s",
"automatedTestTriggered": "Triggering execution of Automated tests from test plan",
"ErrorFailTaskOnExecutingTests": "Error occured while executing test command",
"ErrorFailTaskOnAPIFailure": "Error occured while fetching automated tests from test plan inputs",
"ErrorFailTaskOnCreateRunFailure": "Error occured while creating manual test run from test plan inputs",
"chmodGradlew": "Used 'chmod' method for gradlew file to make it executable.",
"NoMatchingFilesFound": "No test result files matching '%s' were found.",
"MultipleMatchingGradlewFound": "Multiple gradlew files found. Selecting the first matched instance"
}
}