问题描述
我终于通过以下命令在bitbucket管道中报告了我的测试:
I finally managed to make reports of my tests in bitbucket pipeline by this command:
- dotnet test MyTests --logger "trx;LogFileName=test-reports/results.xml"
Build Teardown说:
Build Teardown says:
Found matching test report file MyPath/test-reports/results.xml
Finished scanning for test reports. Found 1 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.
但是,我在bitbucket中看不到这些测试结果文件。我知道管道窗口或类似的东西应该有一个新的标签。有没有建议如何在漂亮的显示窗口中查看它们?
However, I can't see these test results file in bitbucket. I know that there should be a new tab in pipeline window or something like it. Any suggestions how to see them in a nice display window?
找不到任何文档或文章。
Didn't find any documentation or articles.
推荐答案
Bitbucket管道仅接受JUnit xml格式。您需要添加并将命令更改为 dotnet test- -logger:junit; LogFilePath =。/ test-reports / results.xml
Bitbucket pipeline accepts only JUnit xml format. You need to add JUnitTestLogger and change command to dotnet test "--logger:junit;LogFilePath=./test-reports/results.xml"
这篇关于看不到.Net Core Bitbucket管道测试结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!