MSTest no xml output on .NET Core RC2

2019-06-28 06:31发布

I'm targeting dotnet-test-mstest": "1.0.1-preview on dotnet core rc2 in my test project.

Edit: Okay. I'm targeting the the desktop .NET. But this should not make any difference.

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": { }
    }
}

output when running dotnet test looks quite good!

enter image description here

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?

So far i tried dotnet test -xml test-results.xml but no output was generated.

2条回答
仙女界的扛把子
2楼-- · 2019-06-28 07:00

Looking at the decompiled code of dotnet-test-mstest, I don't see any -xml option or anything similar. So I think it's not currently supported.

查看更多
神经病院院长
3楼-- · 2019-06-28 07:10

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

The report gets generated in a TestResults folder.

查看更多
登录 后发表回答