-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
Feature request: streaming output via console reporter AND junit/xml report written to file #627
Comments
It's indeed not possible yet. Maybe in the future, but no ETA can be promised. Indeed the use of multiple reporters is a bit ... nonsensical atm |
On second look, it's not really that much garbled. It's just that when using
It's consumable from stdout still, just a bit trickier to parse / split the console output from junit xml output... |
I tested both with 2.4.0 and 2.4.8, but behaves the same way in both cases, i.e. the XML declaration always comes first, then console output, then junit XML output. Looking at Line 5053 in 7b98851
Maybe this should happen later, e.g. implicitly upon first |
The junit reporter buffers everything (with the exception of the opening tag) and dumps everything else all at once at the end because it needs to report the number of Your observation regarding |
@onqtam regarding the I would definitely help me, and also sounds like it would be the "more correct / expected" behaviour, so I guess could be generally useful for others as well. |
…t reporter is dumped all at once if multiple reporters are used - as a workaround for issue #627
@tknerr just pushed a commit to the |
I'm interested in implementing this.
|
@srnwk hey, great that you're working on this! I've moved away from doctest and currently @Saalvage is the maintainer (and whoever decides to pitch in) and I won't have the capacity to review this. But as a quick take: I think the better way for the command line is |
…t reporter is dumped all at once if multiple reporters are used - as a workaround for issue doctest#627
Description
What I'm trying to achieve is to get immediate feedback / streaming output reported to the console, but at the same time a report in junit / xml format being written to a file.
Currently, the reporters we can choose from all write to stdout, but don't support writing to a file directly. In reporters.md I found that you can specify multiple reporters, e.g.
--reporters=console,junit
, however this produces only garbled output as both write tostdout
at the same time (I hoped the second reporter would write tostderr
for example, so we could redirect that separately, but it doesn't).So right now, if I want both streaming output to the console, but need a report file as well, I would need to run the tests twice (once with
--reporters=console
, and then again with--reporters=junit > report.xml
). Ideally we could have that in a single run.Is this currently indeed not possible, or am I missing something obvious here?
The text was updated successfully, but these errors were encountered: