I want to publish xunit test results in an Azure Devops release pipeline using the "Publish test results" task Version 1.* and 2.*.
Although xunit test file is present and has content - I checked with ls
and cat
commands in the pipepline I get an error message like this:
2020-02-13T08:23:10.9093662Z Obtained XUnit Test Run Start Date: 2020-02-13T08:23:10.9092530Z and Completed Date: 2020-02-13T08:23:10.9092530Z
2020-02-13T08:23:10.9144214Z No Result Found to Publish '/home/vsts/work/r1/a/report/report.xml'.
2020-02-13T08:23:10.9149123Z Obtained XUnit Test Run Start Date: 2020-02-13T08:23:10.9148260Z and Completed Date: 2020-02-13T08:23:10.9148260Z
2020-02-13T08:23:10.9149993Z No Result Found to Publish '/home/vsts/work/r1/a/report/report1.xml'.
The two files report1.xml
and report2.xml
get discovered properly but Azure DevOps says No Result Found to Publish
and hesitates to publish them.
If you're using dotnet test
task in this way:
You may need to set VSTest
instead of Xunit
in Publish Test Result Task:
I met same message like yours and then resolve it by changing Xunit
to VSTest
. I think you may encounter similar issue.
In addition:
And as I know, built-in tasks such as Visual Studio Test task
and Dot NetCore CLI task
automatically publish test results to the pipeline, so you actually don't need a separate Publish Test Results task
in the pipeline. See this for more details.
E.g: Dotnet test task by default will generate and publish test results:
Hope it makes some help :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With