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

TextContext.Progress.Writeline does not work in 4.4.2 when running dotnet test #1089

Closed
tchengwhisker opened this issue Apr 26, 2023 · 4 comments

Comments

@tchengwhisker
Copy link

NUnit 3.13.3
NUnit3TestAdapter 4.4.2
Visual Studio Enterprise 2022 Version 17.4.4
dotnet --version is 7.0.102

Running dotnet test from CLI to execute code:
TestContext.Progress.WriteLine("project setup");

Outputs "project setup" in console when running NUnit3TestAdapter 4.3.1. Changing to version 4.4.2 in the same project, rebuilding, and running the same CLI yields no output for any TestContext.Progress.WriteLine calls.

@OsirisTerje
Copy link
Member

There have been several changes to this over time. Need to get this properly documented and checked. Thanks for reporting!

@jacobilsoe
Copy link

I am also seeing this issue. Are there any known workarounds?

@OsirisTerje
Copy link
Member

This was changed in 4.4 by #1037 .
In order to get the information out, you need to add the standard logger:

dotnet test --logger "Console;Verbosity=normal"

TL;DR;
The reason is that the Progress messages come out as Informational information, and that now requires a logger. We did earlier output it as Warning information, but the new Test Explorer now gives warnings when that happens, so that "workaround" doesn't work anymore.
This needs to be better documented of course.

@jacobilsoe
Copy link

Thanks a lot! This works for me.

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

No branches or pull requests

3 participants