问题
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