[ci] Use PublishTestResults@2 instead of DotNetCoreCLI@2 built-in publishing#1404
Merged
jonathanpeppers merged 4 commits intomainfrom Apr 15, 2026
Merged
Conversation
…lishing The DotNetCoreCLI@2 task's built-in test result publishing uploads TRX files through Azure Storage Data Movement library, which has been hitting SSL errors (RemoteCertificateNameMismatch) and timing out for ~11 minutes per test step. Switch to: - publishTestResults: false on each DotNetCoreCLI@2 test step - Explicit --logger trx --results-directory in arguments - A single PublishTestResults@2 step at the end to upload all TRX files Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Each test step now writes a named TRX file (e.g. generator.trx, Java.Base-jnimarshalmethod.trx) so PublishTestResults@2 creates separate test runs per assembly, preserving the per-test granularity that was previously provided by DotNetCoreCLI@2's testRunTitle. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates the CI test execution template to stop using DotNetCoreCLI@2’s built-in TRX publishing (which is encountering SSL/timeouts) and instead emit TRX files explicitly and publish them once via PublishTestResults@2.
Changes:
- Disabled built-in test result publishing on all
DotNetCoreCLI@2test steps (publishTestResults: false). - Added explicit TRX logging/output to
dotnet testarguments (--logger trx --results-directory $(Agent.TempDirectory)). - Added a final
PublishTestResults@2step to publish all.trxfiles in one pass.
The single bulk PublishTestResults@2 at the end produced generic names like "VSTest_TestResults_<buildId>_N". Switch to individual PublishTestResults@2 steps after each test, each with the original testRunTitle so the Azure DevOps test results tab shows meaningful per-assembly names. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
e4c0db8 to
59c5424
Compare
The repeated DotNetCoreCLI@2 + PublishTestResults@2 pair is now a reusable template. All original displayName and testRunTitle values are preserved exactly as they were on main. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
59c5424 to
ea62f62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
DotNetCoreCLI@2task's built-in test result publishing uploads TRX files through the Azure Storage Data Movement library, which has been hitting SSL errors (RemoteCertificateNameMismatch) and timing out for ~11 minutes per test step — adding over an hour to builds.Example: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1380182
Changes
publishTestResults: falseon eachDotNetCoreCLI@2test step--logger trx --results-directory $(Agent.TempDirectory)to test argumentsPublishTestResults@2step at the end to upload all.trxfiles in one batchThis uses the
PublishTestResults@2task's upload path instead of the old blob storage mechanism, which avoids the SSL issues entirely.