-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dotnet test - Output test results #6161
Comments
@Greg15153 can you provide some more details? Wouldn't /cc @livarcocc |
Outputting the result of the command and parsing out what I need isn't too big of a deal but it is a little lacking. Previously before switching over to dotnet core we would use VSTest.Console and had the option to output TRX files. To be able to know what tests were run and how long in an XML output would be great. Found this example of xunit results.
|
You can pass We use this in our Jenkins CI to determine what tests failed in a build. |
Thats perfect. Wish dotnet test --help showed me that :) |
It does not because that's a capability of the runner dotnet-test-xunit and not of dotnet test. Maybe we should do something to show the capabilities of your runner as well, when you do dotnet-test --help. I have created https://github.com/dotnet/cli/issues/3143 to consider this. |
We updated |
@brthor which Jenkins Plugin do you use? I need to run "donet test" and publish jenkins report |
This doesn't seem to work now msbuild is used for testing? Or have I missed something?
I'm guessing we'd now need to use a value for |
@tommed You should not expect to be able to use runner-specific features with In the world of project.json (that is DNX, and .NET Core SDK prior to Preview 3), In the world of MSBuild (that is, .NET Core Preview 3 and later), That means if you're using |
It will also be possible to create custom loggers that output in another format like xunit v2 xml. |
@piotrpMSFT But report file format is just one example of how unusable preview3's |
@plioi what would be your suggestion? |
Passing the command line arguments through, like before. In the earlier previews, everything after the special positional "--" argument was intended for the test framework to receive. Test frameworks were therefore allowed to have features, were allowed to skip throwing resources at output file formats the user wasn't asking for, etc. My understanding is that preview 3 does command line integration through the interfaces used to integrate with Test Explorer. That appears to be quite limiting. If those interfaces can't change to take on a Even if the preview 3 approach changes to allow args to pass through those interfaces, this whole approach seems needlessly costly at runtime. I'd expect every test framework team to have to give up and provide their own dotnet-test-framework-name-actual.exe while recommending users not use "dotnet test". |
Better yet, IDE mode test running and CLI mode test running are simply different things, and ought to be separate. Allowing CLI runs to be lean and featureful wouldn't have to cripple IDE running, and IDE running wouldn't have to cripple CLI running. |
@plioi thanks for the feedback, that is quite useful. |
I'll write up a proposal in a separate issue first thing tomorrow, for what the imagined dotnet test CLI would be if the IDE concerns were separate. |
@blackdwarf I've proposed a simplification in dotnet/cli#4921 that would restore this functionality. |
This is absurd and just solidifies the complaints of users that did not want to move to MSBuild wrapping everything and csproj. We had a well working unified ecosystem before, and now we're moving back to Microsoft vs. everyone else. It's been a huge step back going back on lessons learned from poor past performance. |
This comes as a huge surprise. Today I was updating my CI to move to VS2017 & csproj files and this issue is currently preventing me from doing so. I'm not sure why this is closed, because it's very much valid! |
@kubal5003 You can use the trx to get the output like this |
Maybe I am missing some nuance , but this seems like a breaking change to me from 1.0 ->1.1. It would be nice to have these things be a little more documented and clear up front. |
@jderus Presuming you mean 1.0 and 1.1 of .NET Core, there are no changes. The same runner binaries are used for both. |
Went ahead and opened a relevant ticket on the vstest project considering this is now part of Microsoft's new MSBuild task runners sitting in front of everything and causing unnecessary migraines. Ticket here: microsoft/vstest#786 |
Currently there is no way to output the test results from dotnet test. Our CI requires a file in order to determine if a job has failed or not plus it allows us to gather data from our builds.
Would be useful for dotnet test to accept a output path for test results.
The text was updated successfully, but these errors were encountered: