Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSTest no xml output on .NET Core RC2

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.

like image 902
Daniel Avatar asked Mar 12 '23 22:03

Daniel


2 Answers

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.

like image 175
pvlakshm Avatar answered Mar 20 '23 14:03

pvlakshm


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.

like image 20
svick Avatar answered Mar 20 '23 14:03

svick