JUnit "fail" method doesn't print to console

I am writing a very simple JUnit test and realized that my crash messages do not seem to be printed at all. The test does not work, but there is no way out. Where to failprint on?

@Test
public void testSimpleMethod() {
    fail("Test failed!");
}

If it faildoes not print the message that you give it to him, then what is the point of giving him a message in the first place?

+4
source share
1 answer

This question was answered in the comments, so I am posting the official answer here:

You can view the error message in the JUnit view in the Failure Tracking section.

0
source

Source: https://habr.com/ru/post/1681379/


All Articles