“找不到与**/*.trx匹配的测试结果文件".在发布测试结果任务中 [英] "No test result files matching **/*.trx were found" in Publish Test Result Task
问题描述
我正在Azure管道中运行自动化测试,并使用NUnit VS测试适配器和Visual Studio测试任务. .trx
文件被附加到
测试运行摘要.但是在发布测试结果"任务中,我可以看到警告No test result files matching **/*.trx were found
.
I am running my automation Test in Azure pipeline and using NUnit VS Test adapter and Visual studio Test task. the .trx
file is getting attached in the
Test Run Summary. But in Publish test result task I could see the warning No test result files matching **/*.trx were found
.
构建成功,但是.trx
文件未显示在发布测试结果"任务中
Build was successful but .trx
file is not displayed in Publish test result task
您能帮我一些我想念的东西吗?
Can you some help me what I am missing?
推荐答案
由于.trx
文件不在发布任务中指定的位置,因此在D:\a\_temp\....
中指定在$(System.DefaultWorkingDirectory)
中搜索时生成的文件是D:\a\work\1\s
.
Because the .trx
file is not where you specified in the Publish task, the file generated in D:\a\_temp\....
while you specified to search in $(System.DefaultWorkingDirectory)
that is D:\a\work\1\s
.
因此,您可以删除此任务,并且仍将在Azure DevOps中显示测试结果.请参见此处
So you can remove this task and you still will show the test results in Azure DevOps. See the docs here.
这篇关于“找不到与**/*.trx匹配的测试结果文件".在发布测试结果任务中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!