Intellij not shows test results in console

24,407

Solution 1

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.

Solution 2

In IDEA 12,13 and 14 (also maybe other versions), there is a button "Hide passed tests" and is pressed by default:

enter image description here

The console output is missing some of the printed strings (the last ones). When you uncheck the button and click on the test:

enter image description here

Then the output is shown in the console.

Solution 3

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.

Solution 4

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

Share:
24,407

Related videos on Youtube

user1085746
Author by

user1085746

Updated on March 09, 2020

Comments

  • user1085746
    user1085746 about 4 years

    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.

  • user1085746
    user1085746 over 10 years
    I have the middle option selected
  • mirelon
    mirelon about 10 years
    IDEA 13 now shows output when you click on a specific passed test. However, some of the output (the last printed) is not shown when the focus is on on specific test (ie. focus is on the package or on the class)
  • Ikthiander
    Ikthiander almost 10 years
    This is the actual answer, the accepted answer is a proper waste of time. i feel sorry for mirelon.
  • mirelon
    mirelon almost 10 years
    You just gave me the "Revival" badge. Just going for the "Populist Necromancer"
  • eis
    eis over 9 years
    the button is there for earlier versions as well, at least my IDEA 12 has it.
  • Bhushan
    Bhushan over 9 years
    Is there a way to disable this behavior? It causes a lot of trouble if you want to check some logs.. Also printing to log file doesn't print all the logs.
  • Line
    Line about 5 years
    where is it exactly?
  • specializt
    specializt about 5 years
    View -> tool window -> Run but that option does not fix the problem of having a large console output and intellij cutting off the majority of it