-
Notifications
You must be signed in to change notification settings - Fork 263
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
Testing Platform overwriting/removing user console output #4425
Comments
I'm off for now so just dumping my thoughts for when I return. We need to try if the behavior is the same when using IOutput to display messages. |
@nohwnd What's your opinion and recommendations here? |
From what I saw the Before assembly happens really quickly, but then immediately after TUnit will pick up the first test and send a test node update with InProgressState, which is probably causing the output terminal to update and re-render. |
This is bound to happen when the progress is enabled, and we write to the screen from a different place, e.g from the test directly without capturing the output. There is no way around unless we substitute the Console.Out with one that is respecting the lock we have in progress reporting. Similarly this can happen when we run in child process and parent process (testhost controller writes to the screen). |
@nohwnd I didn't look into how the progress-aware terminal works, but I think at whatever point the position of writing is determined, to the end of writing, should be wrapped in In short, we can already lock on |
Using TUnit, I created this simple test suite:
If you just do a
dotnet run
on the CLI, you'll have to be quick, but when it starts to show "BeforeAssembly started", you'll see it render really quickly, but then it'll be removed and overwritten by the rendering of the[✓0/x0/↓0] ConsoleApp5.dll (net9.0|x64)
.I guess this is related to the new interactive output and showing running tests etc. But overwriting user output means they may lose visibility of important information.
The text was updated successfully, but these errors were encountered: