views:

102

answers:

1

hello I've write a junit test with eclipse , to check the Gui component status ,I use assert : textfield.assert("expected message") i'm searching how to get the error message printed by assert the message saying that the expected text doesn't match th typed text is printed in the eclipse console I like to get this message to generate a report is there an easy mean, my be a junit method ?

+1  A: 

It should work out as something like:

assert("Bad output", expectedResults);

I'd use:

assertEquals("Bad output for # attempt", expectedResults, obtainedResults);

though

Marcos Placona
thanks, where should I say print the message(displayed by assert in eclipse console) in this file(my created file) ?
please someone could give me an idea?