JUnit "fail" method is not printing to console

Viewed 1069

I'm writing a very simple JUnit test and realized that my failure messages don't seem to be printed at all. The test does fail, but there is no output. Where does fail print to?

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

If fail doesn't print the message you give it, what is the point of giving it a message in the first place?

1 Answers

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

The failure message can be viewed in the JUnit view under "Failure Trace".

Related