You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ouput pane does not show test output, seems to be happening since version 0.10.0 and/or the latest VSCode update, running in conjunction with the Microsoft Java Extension Pack 0.4.0.
Java: Show test output does not work.
It selects the Output pane and selects "Test Output" in the dropdown, but no test output is visible.
Java: Open Log works and shows that the test output has appeared in the log
This is reproducible from a Maven project built using the maven archetype-quickstart-jdk8 archetype.
I found it very wried because if I disable the Maven extension, the output will just be fine. But if the Maven extension is enabled, the test output cannot be shown in the output channel.
Could you please have a try and let me know if it is just the same as what I said on your side?
Reacted by 林业天, benliddicott, Francisco Javier Lario Giménez, Shang Yehua, lemrod, AlightYoung and Bruno Pastre
I do see the test output when I click on the red X for a failed test in the editor pane (at least the assertion message and stack trace) when I use junit 4.12. When I use org.junit.Jupiter 5.3.1 and org.junit.platform 1.3.1, no output is shown at all when I click on the red X.
I do see the test output when I click on the red X for a failed test in the editor pane (at least the assertion message and stack trace) when I use junit 4.12. When I use org.junit.Jupiter 5.3.1 and org.junit.platform 1.3.1, no output is shown at all when I click on the red X.
I'm using org.junit.Jupiter 5.3.1 and org.junit.platform 1.3.1 and I can see the test output in the "Test Output" window whether the test passes or fails, doesn't matter, but that is if I have disabled the "Maven for Java" extension just as Sheng Chen (@jdneo) said. If I don't disable that extension, "Test Output" window is always blank.
Definitely a bad interaction between these two extensions.
After disable maven I can see test logs in vscode output panel.
However, there are bunch of logs mixing of log from junit and user std output.
I am not sure of inside architecture of this extension( I love this thanks).
Why don't we separate the log data into junit log and std output from java code, System.out.print ?
So programmer can check test result quickly.
vsCode v1.51.1
Installed latest Java Extension Pack and disabled Maven for Java.
Without using JUnit I can "Run" my class and get the System.out.println() in the Java Process Console. Good.
If I run a test of the same class using JUnit "Run test" I see the test results "Passed" in the Java Test Report pane but nothing appears in the Java Process Console. :-(
It would be great if that was working. Am I missing something? (Pretty new to all this)
Thanks,
Murray
Murray Hopkins (@flowt-au) I cannot repro this on my machine. Please make sure you are checking the DEBUG CONSOLE for your program output (not the OUTPUT panel).
Could you share more details for this? If you don't mind, please share a sample project and the expected output in the debug console. I can take a look.
Reacted by samtoomer, Caleb Larsen, Markus Moltke, Sathvik Rao Poladi, cklee75, Donglinrui, Maciej, luke, CbcWestwolf and Jianheng Ma
Thanks. Sorry, my confusion as I am learning.
When running a java class (not in JUnit) the System.out.println(); shows in the Terminal Java Process Console.
When running in JUnit, the System.out.println(); shows in the Debug Console. As I was flipping between the two it did not display the debug console and I was expecting it to appear in the Terminal.
Apologies again and thanks for following up.
Go well,
Murray
Murray Hopkins (@flowt-au) I see. Thank you for your feedback. Actually I think this is a valid request since other users may encounter the same problem as well. I'll consider if it is possible to execute the test in terminal as well.
Activity
longooh commentedon Oct 17, 2018
The same issue, test output panel is not working.
IMEVER commentedon Oct 17, 2018
I have the same issue with version 1.27 and 1.28 under deepin linux
jdneo commentedon Oct 19, 2018
benliddicott @lwl19 林业天 (@IMEVER)
I found it very wried because if I disable the Maven extension, the output will just be fine. But if the Maven extension is enabled, the test output cannot be shown in the output channel.
Could you please have a try and let me know if it is just the same as what I said on your side?
IMEVER commentedon Oct 19, 2018
Sheng Chen (@jdneo) Yes, it works. When disable maven extension from workspace, reload vscode, run test, I can see test output right there.
jdneo commentedon Oct 19, 2018
Hmm, Don't know who to blame for now. 😵 Let me investigate.
cpdupuis commentedon Oct 20, 2018
I do see the test output when I click on the red X for a failed test in the editor pane (at least the assertion message and stack trace) when I use junit 4.12. When I use org.junit.Jupiter 5.3.1 and org.junit.platform 1.3.1, no output is shown at all when I click on the red X.
JustLitio commentedon Oct 21, 2018
I'm using org.junit.Jupiter 5.3.1 and org.junit.platform 1.3.1 and I can see the test output in the "Test Output" window whether the test passes or fails, doesn't matter, but that is if I have disabled the "Maven for Java" extension just as Sheng Chen (@jdneo) said. If I don't disable that extension, "Test Output" window is always blank.
Definitely a bad interaction between these two extensions.
xiaoxiaobingguai commentedon Oct 22, 2018
I have the same problem。How to resolve?
jdneo commentedon Oct 24, 2018
I'm refactoring the test runner extension these days. Hopefully, this issue could be resolved after the new version releases.
iamnogada commentedon Oct 31, 2018
Suggestion !
After disable maven I can see test logs in vscode output panel.
However, there are bunch of logs mixing of log from junit and user std output.
I am not sure of inside architecture of this extension( I love this thanks).
Why don't we separate the log data into junit log and std output from java code, System.out.print ?
So programmer can check test result quickly.
Thanks for your work done so far.
jdneo commentedon Oct 31, 2018
@myguddy That's a good suggestion. Adding a tracking issue here: #358
jdneo commentedon Nov 23, 2018
This should be fixed in
0.11.0spark889 commentedon Aug 30, 2019
Command palette:
java: open Test Runner log
zygimantus commentedon Oct 16, 2020
I don't think this is fixed.
flowt-au commentedon Nov 21, 2020
vsCode v1.51.1
Installed latest Java Extension Pack and disabled Maven for Java.
Without using JUnit I can "Run" my class and get the
System.out.println()in the Java Process Console. Good.If I run a test of the same class using JUnit "Run test" I see the test results "Passed" in the Java Test Report pane but nothing appears in the Java Process Console. :-(
It would be great if that was working. Am I missing something? (Pretty new to all this)
Thanks,
Murray
jdneo commentedon Nov 23, 2020
Murray Hopkins (@flowt-au) I cannot repro this on my machine. Please make sure you are checking the
DEBUG CONSOLEfor your program output (not theOUTPUTpanel).Could you share more details for this? If you don't mind, please share a sample project and the expected output in the debug console. I can take a look.
flowt-au commentedon Nov 23, 2020
Thanks. Sorry, my confusion as I am learning.
When running a java class (not in JUnit) the System.out.println(); shows in the Terminal Java Process Console.
When running in JUnit, the System.out.println(); shows in the Debug Console. As I was flipping between the two it did not display the debug console and I was expecting it to appear in the Terminal.
Apologies again and thanks for following up.
Go well,
Murray
jdneo commentedon Nov 23, 2020
Murray Hopkins (@flowt-au) I see. Thank you for your feedback. Actually I think this is a valid request since other users may encounter the same problem as well. I'll consider if it is possible to execute the test in terminal as well.
flowt-au commentedon Nov 23, 2020
Thanks! :-)