Difference Between Assertion and Verification ?

Verify command will not stop execution of test case if verification fails. It will log an error and proceed with execution of rest of the test case. We use verify commands in Selenium IDE when we still want to proceed with execution of test case even if expected output is not matched for a test step. 

Assert command will stop execution of test case if verification fails. It will log an error and will not proceed with execution of rest of the test case. We use assertions in scenarios where there is no point proceeding further if expected output is not matched. 


It’s pretty simple. Use assertions when you want to stop execution of a test case if expected output is not matched and use verification when you still want to proceed execution of a test case if expected output is not matched.



To receive daily posted JOBS & Interview Questions
Just enter your email address below and click 'Submit'
Enter your email address:

Make sure to activate your subscription by clicking on the activation link sent to your email