Browse - Programming Tips - How can I make jUnit print a message when a test fails?

Date: 2014dec2
Language: Java
Product: jUnit

Q.  How can I make jUnit print a message when a test fails?

A.  There are alternate version of most assert functions that will
to just that.  eg:

fail("Test didn't work with parameter=" + parameter); assertEquals("The things are not equal for parameter=" + parameter, thing1, thing2);