-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[BUG] no console logging output if using custom reporter #18945
Comments
@mstepin-edt There are two options to make
Let me know if this helps. |
@dgozman I did spot those before I logged the bug report, and added them to my reporter. That said, it seems extremely counter-intuitive for a standalone reporter class to influence terminal output and have to explicitly proxy the output stream, else risk affecting existing functionality. There probably aren't all too many use cases where one might want to completely suppress terminal output, and should there be a need to suppress terminal output, it makes more sense for that to be a config option rather than this convoluted reporter path. The reporter needs to be a standalone listener -> ie. "you'll receive the stdOut and stdErr events, do with it what you will, but we'll continue doing what we've always done until now". |
@mstepin-edt The reporters API is designed so that you can replace default stdio reporter with anything. For example, you can use a |
@dgozman agreed, if at the very least some improved documentation comes out of this discussion, that would be great. I still stand by my above comment in that a new standalone module such as a reporter should be a consumer and not a proxy for existing behaviour. |
Hello, This does not make sense if I want to keep the tests progress while printing some custom reporter extra info to console in the end of all tests. I believe the quick fix (though it will break the compatibility) might be to force existence of |
In my case, only the console.log from custom test reporter was working. Even after printsToStdio to true, the console.log from tests where not logged.
|
Is there a way to prevent console.log(chunk); from adding a new line in each log, I would like to have the default be 0 space and handle this myself Current output: Message 2 New section Message 1 The output I want: New section |
@luixo Could you please file a new issue by filling in either the "Bug Report" or the "Feature Request" template, so that we can handle it separately? |
Context:
When adding a custom reporter, the console.log output is no longer displayed in the console.
NOTE: The console stdOut attachment to the html reporter still shows the desired output.
Consider the following setup:
Custom reporter:
Now consider this test:
As per code snippets above, only the console logging from the custom reporter is output to the actual console.
When commenting out the code in playwright.config.js for the custom reporter, all lines are output in the console as expected.
The text was updated successfully, but these errors were encountered: