Skip to content
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

Run tests doesn't provide any output #2268

Closed
ghost opened this issue May 7, 2018 · 5 comments · Fixed by #2337
Closed

Run tests doesn't provide any output #2268

ghost opened this issue May 7, 2018 · 5 comments · Fixed by #2337

Comments

@ghost
Copy link

ghost commented May 7, 2018

We've been using mstest which works fine sa per [https://github.com/OmniSharp/omnisharp-vscode/wiki/How-to-run-and-debug-unit-tests]. However the output from the test doesn't appear to go to the terminal window.

i.e. when I run a test all I see is

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:13.84



Total tests: 1. Passed: 0. Failed: 1. Skipped: 0

If I run from from console i.e. >dotnet test then messages from the failed tests appear in the terminal window (and log messages as we have a console logger configured for our tests, i.e.

Starting test execution, please wait...
Failed   TestReports
Error Message:
 Assert.IsNull failed. items is not null

...

Total tests: 3. Passed: 2. Failed: 1. Skipped: 0.
Test Run Failed.
Test execution time: 3.1644 Seconds

Is there a way of capturing this output when running using the code lense links?

Regards
Dave

@rchande rchande self-assigned this May 8, 2018
@rchande
Copy link

rchande commented May 8, 2018

It looks like O# returns the output of individual unit tests but the C# extension doesn't print the output.
@david-waterworth Thanks for filing this, we will take a look.

@rchande rchande added this to the 1.16 milestone May 8, 2018
@akshita31 akshita31 self-assigned this May 19, 2018
@rchande
Copy link

rchande commented May 24, 2018

After further investigation, I'm not sure O# is actually sending along all the output.

@akshita31
Copy link
Contributor

@rchande I have added some more logging around the tests in the PR: #2337. We do need some more information from omnisharp and I have filed an issue here : OmniSharp/omnisharp-roslyn#1198

@rchande
Copy link

rchande commented May 24, 2018

@akshita31 Do we have a way to get console output produced by unit tests?

@akshita31
Copy link
Contributor

akshita31 commented May 24, 2018

@rchande I created a PR to omnisharp-roslyn to do so: OmniSharp/omnisharp-roslyn#1203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants