MSTest no xml output on .NET Core RC2

醉酒当歌 提交于 2019-12-23 12:32:45

问题


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!

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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/37983495/mstest-no-xml-output-on-net-core-rc2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!