Skip to content

Commit 6ee6bd0

Browse files
Added option to skip ptr in vstest (#20663)
* Added option to skip ptr in vstest * added changes in task.loc.json * fixed error * added changes in task.loc.json * updated dependency * updated dependency * added generated files * reverted dependency change * added release dependency * fixed test failures --------- Co-authored-by: Virender Kumar <[email protected]>
1 parent 6ff3756 commit 6ee6bd0

23 files changed

+369
-300
lines changed

Tasks/VsTestV3/Strings/resources.resjson/en-US/resources.resjson

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
"loc.input.label.rerunMaxAttempts": "Maximum # of attempts",
9191
"loc.input.help.rerunMaxAttempts": "Specify the maximum # of times a failed test should be retried. If a test passes before the maximum # of attempts is reached, it will not be rerun further.",
9292
"loc.messages.VstestLocationDoesNotExist": "The location of 'vstest.console.exe' specified '%s' does not exist.",
93+
"loc.input.label.donotPublishTestResults": "Disable publishing test results",
94+
"loc.input.help.donotPublishTestResults": "If this option is turned on, test results won't be published as part of this task. Use Publish Test Results task instead",
9395
"loc.messages.VstestFailedReturnCode": "VsTest task failed.",
9496
"loc.messages.VstestPassedReturnCode": "VsTest task succeeded.",
9597
"loc.messages.NoMatchingTestAssemblies": "No test assemblies found matching the pattern: %s.",

Tasks/VsTestV3/Tests/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/VsTestV3/inputdatacontract.ts

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export interface TestReportingSettings {
2727
TestRunSystem : string;
2828
TestSourceSettings : TestSourceSettings;
2929
ExecutionStatusSettings : ExecutionStatusSettings;
30+
DonotPublishTestResults : boolean;
3031
}
3132

3233
export interface TestSelectionSettings {

Tasks/VsTestV3/inputparser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function getTestReportingSettings(inputDataContract : idc.InputDataContract) : i
172172
inputDataContract.TestReportingSettings.TestResultsDirectory = resultsDir;
173173
tl.debug("TestResultsFolder: " + resultsDir);
174174
addResultsDirectoryToTelemetry(resultsDir);
175-
175+
inputDataContract.TestReportingSettings.DonotPublishTestResults = tl.getBoolInput('donotPublishTestResults');
176176
inputDataContract.TestReportingSettings.TestSourceSettings = <idc.TestSourceSettings>{};
177177
inputDataContract.TestReportingSettings.TestSourceSettings.PullRequestTargetBranchName = tl.getVariable('System.PullRequest.TargetBranch');
178178
inputDataContract.TestReportingSettings.ExecutionStatusSettings = <idc.ExecutionStatusSettings>{};

Tasks/VsTestV3/make.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dest": "./"
77
},
88
{
9-
"url": "https://testmanagementstore.z13.web.core.windows.net/testmanagementcontainer/28213918/TestAgent.zip",
9+
"url": "https://testmanagementstore.z13.web.core.windows.net/testmanagementcontainer/29341948/TestAgent.zip",
1010
"dest": "./Modules"
1111
},
1212
{

Tasks/VsTestV3/package-lock.json

+135-135
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/VsTestV3/task.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"author": "Microsoft Corporation",
1818
"version": {
1919
"Major": 3,
20-
"Minor": 248,
21-
"Patch": 2
20+
"Minor": 249,
21+
"Patch": 0
2222
},
2323
"demands": [
2424
"vstest"
@@ -427,6 +427,16 @@
427427
"helpMarkDown": "Opt in/out of publishing run level attachments.",
428428
"groupName": "reportingOptions"
429429
},
430+
{
431+
"name": "donotPublishTestResults",
432+
"type": "boolean",
433+
"label": "Disable publishing test results",
434+
"defaultValue": "false",
435+
"required": false,
436+
"helpMarkDown": "If this option is turned on, test results won't be published as part of this task. Use Publish Test Results task instead",
437+
"groupName": "reportingOptions",
438+
"visibleRule": "runInParallel = false"
439+
},
430440
{
431441
"name": "failOnMinTestsNotRun",
432442
"type": "boolean",

Tasks/VsTestV3/task.loc.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"author": "Microsoft Corporation",
1818
"version": {
1919
"Major": 3,
20-
"Minor": 248,
21-
"Patch": 2
20+
"Minor": 249,
21+
"Patch": 0
2222
},
2323
"demands": [
2424
"vstest"
@@ -427,6 +427,16 @@
427427
"helpMarkDown": "ms-resource:loc.input.help.publishRunAttachments",
428428
"groupName": "reportingOptions"
429429
},
430+
{
431+
"name": "donotPublishTestResults",
432+
"type": "boolean",
433+
"label": "ms-resource:loc.input.label.donotPublishTestResults",
434+
"defaultValue": "false",
435+
"required": false,
436+
"helpMarkDown": "ms-resource:loc.input.help.donotPublishTestResults",
437+
"groupName": "reportingOptions",
438+
"visibleRule": "runInParallel = false"
439+
},
430440
{
431441
"name": "failOnMinTestsNotRun",
432442
"type": "boolean",

_generated/VsTestV3.versionmap.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Default|3.248.2
2-
Node20_229_4|3.248.3
1+
Default|3.249.0
2+
Node20_229_4|3.249.1

_generated/VsTestV3/Strings/resources.resjson/en-US/resources.resjson

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@
7373
"loc.input.help.configuration": "Build configuration against which the tests should be reported. If you have defined a variable for configuration in your build task, use that here.",
7474
"loc.input.label.publishRunAttachments": "Upload test attachments",
7575
"loc.input.help.publishRunAttachments": "Opt in/out of publishing run level attachments.",
76+
"loc.input.label.donotPublishTestResults": "Disable publishing test results",
77+
"loc.input.help.donotPublishTestResults": "If this option is turned on, test results won't be published as part of this task. Use Publish Test Results task instead",
7678
"loc.input.label.failOnMinTestsNotRun": "Fail the task if a minimum number of tests are not run.",
7779
"loc.input.help.failOnMinTestsNotRun": "Selecting this option will fail the task if specified minimum number of tests is not run.",
7880
"loc.input.label.minimumExpectedTests": "Minimum # of tests",

_generated/VsTestV3/Tests/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_generated/VsTestV3/inputdatacontract.ts

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export interface TestReportingSettings {
2727
TestRunSystem : string;
2828
TestSourceSettings : TestSourceSettings;
2929
ExecutionStatusSettings : ExecutionStatusSettings;
30+
DonotPublishTestResults : boolean;
3031
}
3132

3233
export interface TestSelectionSettings {

_generated/VsTestV3/inputparser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function getTestReportingSettings(inputDataContract : idc.InputDataContract) : i
172172
inputDataContract.TestReportingSettings.TestResultsDirectory = resultsDir;
173173
tl.debug("TestResultsFolder: " + resultsDir);
174174
addResultsDirectoryToTelemetry(resultsDir);
175-
175+
inputDataContract.TestReportingSettings.DonotPublishTestResults = tl.getBoolInput('donotPublishTestResults');
176176
inputDataContract.TestReportingSettings.TestSourceSettings = <idc.TestSourceSettings>{};
177177
inputDataContract.TestReportingSettings.TestSourceSettings.PullRequestTargetBranchName = tl.getVariable('System.PullRequest.TargetBranch');
178178
inputDataContract.TestReportingSettings.ExecutionStatusSettings = <idc.ExecutionStatusSettings>{};

_generated/VsTestV3/make.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dest": "./"
77
},
88
{
9-
"url": "https://testmanagementstore.z13.web.core.windows.net/testmanagementcontainer/28213918/TestAgent.zip",
9+
"url": "https://testmanagementstore.z13.web.core.windows.net/testmanagementcontainer/29341948/TestAgent.zip",
1010
"dest": "./Modules"
1111
},
1212
{

0 commit comments

Comments
 (0)