-
Notifications
You must be signed in to change notification settings - Fork 418
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
Differences in TestMessage log output between xunit and mstest #1222
Comments
cc @akshita31 |
@alistair I tried this sample mstest project and am getting the required logs for the mstest project system. Can you try this project? Also, can you share the project where you are not getting the logs and also the output of |
FWIW, I was running into the same problem for this project : https://github.com/OmniSharp/omnisharp-roslyn/tree/master/test-assets/test-projects/MSTestProject. Then on checking the logs from OmniSharp I noticed the following:
Then on doing so and performing the restore, I am able to get the desired output. Can you check if this is the same case for you? |
Hi @akshita31 I was using just the template mstest project for .net sdk 2.0
|
This is the output if I run omnisharp from the command line and post in the command to run the tests.
It seems like the compile part outputs TestMessages but once the tests run we don't get any actual console output from the mstest. This is something which xunit provides. |
BTW here is the actual test class
|
I probably haven't explained what im after very well. Essentially I would like the console log output as if I had run dotnet test myself. It seems that xunit already outputs this from omnisharp in the form of TestMessage messages. for example the output from
|
@akshita31 I tried the other project you linked but im sorry I don't think I understand. I can't see that log message you provide and don't understand why it would be there anyway. These are netcoreapp2.0 test projects, why would they need netcoreapp1.1? Also it seems like the test execute as expected, but nothing is console logs for them. |
@alistair My apologies, I could not understand the problem previously and yes I can totally reproduce it now. I am investigating further into why is the difference coming up. |
To provide a more solid repro: Whereas for MSTest project: (Nit: I am using the vscode extension for the above screenshots) |
@DustinCampbell @rchande I checked in omnisharp and the TestManager has nothing that should imply different behaviors for xunit and mstest system. I think it is the Here is the code in question :
|
One should also probably ask if i can/should rely on the test output being available. The reason im relying on it is because it seems like a easy and effective way of supporting this within editors without codelens or other ways of displaying inline test statuses. Emacs for example has a compilation buffer functionality which i can use and which already supports goto file and line for a number of different output types. Including msbuild xbuild and other langs. |
@DustinCampbell Can you help with this one ? |
@akshita31 : What sort of help are you looking for? |
@DustinCampbell Can you confirm if I am thinking in the right direction: #1222 (comment) |
Maybe? It'd probably be better to reach out to some folks on the vs test team. @AbhitejJohn is the engineer who originally implemented MSTest support in OmniSharp (#856) and he sits down the hallway from @rchande. He might have some insight. |
Im implementing omnisharp-emacs:Run all tests in class and had planned to output the test logs into the compile buffer. ( 2 get go to file etc support ).
When running against xunit i get the following output
but it seems like mstest doesn't output these logs. and therefore I get the following output (which is just the compile output).
Im suspecting this is a due to vstest for mstest not outputing any console logs. Would this be correct?
Also would it be possible to affect this by passing
/logger:console
?The text was updated successfully, but these errors were encountered: