In previous versions tester could verify or assert something. Now we can only use assert and when the problem exists whole test is failed.
Please, help how to handle asserts so they don’t make test to fail.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can probably have your own verify methods, which would catch the AssertionErrors, append them to a list of errors and in the aftermethods, that TestNG provides list them and mark the tc as failed..if the list is not empty.
@Coretek : Asserts are the commands which make the whole test break instantly and not verify. Verify is supposed to continue execution even if the test fails. (in old Selenium way 🙂 )