问题描述
我在测试项目中将dotnet核心rc2定位为dotnet-test-mstest": "1.0.1-preview
.
I'm targeting dotnet-test-mstest": "1.0.1-preview
on dotnet core rc2 in my test project.
修改:好的.我的目标是桌面.NET.但这应该没有任何区别.
Okay. I'm targeting the the desktop .NET. But this should not make any difference.
project.json
project.json
{
"version": "1.0.0-*",
"testRunner": "mstest",
"dependencies": {
"Betgame": "1.0.0-*",
"dotnet-test-mstest": "1.0.1-preview",
"MSTest.TestAdapter": "1.0.0-preview",
"MSTest.TestFramework": "1.0.0-preview",
"NETStandard.Library": "1.5.0-rc2-24027"
},
"frameworks": {
"net461": { }
}
}
运行dotnet test
时
的输出看起来还不错!
output when running dotnet test
looks quite good!
如何在构建过程中将输出作为xml文件获取以进行处理?有任何想法吗?还是不被支持?
How can i get the output as a xml file to process this in my build process? Any ideas? Or is it just not yet supported?
到目前为止,我尝试了dotnet test -xml test-results.xml
,但未生成任何输出.
So far i tried dotnet test -xml test-results.xml
but no output was generated.
推荐答案
感谢您试用MSTest版本.请使用以下内容生成trx报告(xml文件):
Thank you for trying out the MSTest release.Please use the following to generate a trx report (xml file):
vstest.console.exe project.json /UseVsixExtensions:true /logger:trx
该报告在TestResults文件夹中生成.
The report gets generated in a TestResults folder.
这篇关于.NET Core RC2上的MSTest没有xml输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!