please find the code
Test(dataProvider = "User_login")
public void StatusForm_Verification(String uname, String pwd)
throws InterruptedException {
try {
NavigateToLogin();
Dashboard RD = LoginAs_user(uname, pwd);
Thread.sleep(2000);
if (Integer.parseInt(ReviewedStatuscount) >= 1) {
Assert.assertEquals("true",
revui.Btn_SaveReview.getAttribute("disabled"));
Assert.assertEquals("true",
revui.Btn_submitReview.getAttribute("disabled"));
Assert.assertEquals("true",
revui.Btn_Needmoreinfo.getAttribute("disabled"));
status = TestLinkAPIResults.PASSED;
} else {
throw new SkipException(
"Test Skipping - Reviewed count is Zero");
}
}catch((AssertionError ex) {
testlink_result = TestLinkAPIResults.TEST_FAILED;
msg = ex.getMessage();
}
}
while executed a above method if any Assertion Error thrown then in the TestNG report it should be an FAIL status - this is for correct
but if i use an Try catch block (catching the AssertionError) in the above method the TestNG report was always PASS status, why? How?