MSTest 在 .NET Core RC2 上没有 xml 输出 [英] MSTest no xml output on .NET Core RC2

查看:35
本文介绍了MSTest 在 .NET Core RC2 上没有 xml 输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是 dotnet-test-mstest": "1.0.1-preview 在我的测试项目中的 dotnet core rc2 上.

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.

这篇关于MSTest 在 .NET Core RC2 上没有 xml 输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆