Thanks for quick reply,
But i want to print all the three Line 1,CONDITION FAILED and Line 2
So i am using below code
System.out.println("Line 1");
Assert.assertTrue(5>6, "condition fails" );
System.out.println("Line 2");
Then output is
Line 1
Exception in thread "main" java.lang.AssertionError: condition fails expected [true] but found [false]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertTrue(Assert.java:42)
at niit.expWait.main(expWait.java:15).
It is not even printing CONDITION FAILED.
Hi Ashish,
Gentle reminder
Thanks for quick reply,
But i want to print all the three Line 1,CONDITION FAILED and Line 2
So i am using below code
System.out.println("Line 1");
Assert.assertTrue(5>6, "condition fails" );
System.out.println("Line 2");
Then output is
Line 1
Exception in thread "main" java.lang.AssertionError: condition fails expected [true] but found [false]
at org.testng.Assert.fail(Assert.java:94)
at org.testng.Assert.failNotEquals(Assert.java:494)
at org.testng.Assert.assertTrue(Assert.java:42)
at niit.expWait.main(expWait.java:15).
It is not even printing CONDITION FAILED.
Exception in thread "main" java.lang.AssertionError: [color=#FF0000:7e7purbj]condition fails [/color:7e7purbj]expected [true] but found [false]"
condition fails is written.
Hi,
But i want to print all the three, i.e
Line 1
CONDITION FAILED and
Line 2
Just like VERIFY,
Verify: If verify is used then the test case will not abort even if the
verify fails. It will continue executing and log the failure for the failed
conditions.
Pls help me