Lesstep
Azure Pipelines · test results · Checked November 10, 2026

Azure Pipelines: "No test result files matching ... were found"

The Publish Test Results task found no file that matches its pattern, so the run has no test results, and the task only warns: the run can be green with no tests reported. The pattern, the format or the folder doesn't match the file your test step wrote, or the test step wrote none.

What the task looks for by default

InputDefaultChange it when
testResultsFiles**/TEST-*.xmlYour file is named otherwise, for example **/*.trx or **/junit.xml
testResultsFormatJUnitThe file is TRX (VSTest), NUnit, xUnit or CTest
searchFolder$(System.DefaultWorkingDirectory)The file is written outside the sources, for example under $(Agent.TempDirectory)
failTaskOnMissingResultsFilefalseYou want a failed task instead of a warning

From Microsoft's reference for PublishTestResults@2.

When the tests run as a pull request's build validation: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in IntelliJ IDEA, Rider or PyCharm, and with Pro runs a failed build policy again once the tests are fixed. Its Pipelines tab (version 1.0.86 and later) lists the runs of the repositories you have open and opens a failed task's log in the editor, free to read.

The usual causes

Find the file

- bash: find "$(System.DefaultWorkingDirectory)" "$(Agent.TempDirectory)" -name "*.trx" -o -name "TEST-*.xml" -o -name "*.junit.xml"
  condition: succeededOrFailed()

Put it right after the test step, and copy the path it prints into searchFolder and testResultsFiles. Then set failTaskOnMissingResultsFile: true, so a missing file fails the run instead of passing quietly.

Similar pages

Azure DevOps pull requests in IntelliJ IDEA, Rider and PyCharm

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps and Azure Pipelines are trademarks of Microsoft Corporation; IntelliJ IDEA, Rider and PyCharm are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: Dotnet command failed with non-zero exit code · Bash exited with code · Build validation · 日本語