Intellij not shows test results in console

Viewed 25546

Howto set the output in test console? When i run test by default the output is replaced by the summary of the test, and System.outs are lost.

7 Answers

I got it! There is an configuration option in bottom run panel, and by default "Track running test" is checked, when I unchecked it the output stays and is no more replaced by summary.

Another possibility is that your logging is maybe configured to be written to a file. If this is the case, you can uncheck the 'Save console output to file' option.

enter image description here

What version of IntelliJ are you using? Normally when running a unit test, you have a Run tab at the bottom of your application and you see appear your test logging (System.outs) in there...

If your test output disappear when the test finish to run (and failing),

Disable "Select First Failed test When Finished" in order to see all prints

enter image description here

It's different for tests that failed and tests that works.

If no test fails you'll have to click the top level of all tests that ran you'll see the output.

If you click on any specific working test they'll be empty, even if they printed something. If you click on any specific failing test they'll show the output from all previous tests, including the one that failed.

Related