Skip to content

Conversation

@Oyster-zx
Copy link
Contributor

@Oyster-zx Oyster-zx commented Feb 12, 2025

Overview

Add new CLI options --redirect-stdout and --redirect-stderr to redirect stdout and stderr respectively to a file,
if both are set to the same file, stdout and stderr will be merged.

Issue: #3166

Credits to @mobounya for the initial PR.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for the separate/same file redirect cases to ConsoleLauncherIntegrationTests.

@Oyster-zx Oyster-zx force-pushed the feat-redirect_stderr_and_stdout branch 6 times, most recently from 8fada9f to 85d8577 Compare February 13, 2025 04:56
@Oyster-zx Oyster-zx force-pushed the feat-redirect_stderr_and_stdout branch 4 times, most recently from d013e56 to 48361ac Compare February 19, 2025 04:42
@Oyster-zx Oyster-zx force-pushed the feat-redirect_stderr_and_stdout branch 2 times, most recently from 13caf16 to 4a81bc9 Compare March 2, 2025 18:10
Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's almost complete. 👍

Sorry it took me so long to get back to you!

@Oyster-zx Oyster-zx force-pushed the feat-redirect_stderr_and_stdout branch from 0e2bc71 to 9bddb6d Compare March 6, 2025 04:44
@Oyster-zx Oyster-zx force-pushed the feat-redirect_stderr_and_stdout branch from 9bddb6d to 59c6e36 Compare March 6, 2025 04:45
@Oyster-zx
Copy link
Contributor Author

This looks like it's almost complete. 👍

Sorry it took me so long to get back to you!

Hi @marcphilipp
thank you for the review. I have updated the PR.

@Oyster-zx Oyster-zx requested a review from marcphilipp March 6, 2025 04:58
@marcphilipp marcphilipp merged commit f071de7 into junit-team:main Mar 10, 2025
15 checks passed
@marcphilipp
Copy link
Member

@Oyster-zx Thank you for your contribution! 👍

sbrannen added a commit that referenced this pull request Mar 10, 2025
…tion

Prior to this commit, the STDOUT/STDERR redirect documentation was
incorrectly displayed in the "Open Test Reporting" section.

See #3166
See #4311
@sbrannen
Copy link
Member

@Oyster-zx Thank you for your contribution! 👍

I second that! 👍

Please note that the documentation was in the wrong section, but I have already addressed that in 3d92bd6.

@Oyster-zx
Copy link
Contributor Author

@marcphilipp thank you for the review 😄
@sbrannen thank you for your fix 👍

@Vazhenston
Copy link

Vazhenston commented Mar 15, 2025

@Oyster-zx thank you for your contribution! I've been waiting for this feature for a while now.
I hope you’ll continue working on the feature that writes each test’s output to its own file.

@tomwhoiscontrary
Copy link

Legend! I see this is now in a milestone release, so i am looking forward to trying this out tomorrow!

@bolshakoff
Copy link

Really appreciate your work on this — I’ve been looking forward to this feature for a long time.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow ConsoleLauncher to redirect STDOUT and STDERR to files instead of the console

6 participants