|Difference Between Assert And Verify In Selenium|
Difference Between Assert And Verify In Selenium:
Here is a small effort to understand the difference between to technologies of selenium called..
|Assert* will fail the test if something is missing and execution will stop there||Verify* will report the missing item at last without stopping the execution|
|One can easily understand what went wrong during execution||One has to go through result files or log to understand why it got failed|
|Live visual display of error||Test engineer has to follow the script or result file to create such environment|
|Mostly used in debug mode,This can be used in releases or in production to make sure everything is ok and will not affect other user||Mostly used in test automation execution during release,UAT|
|Test coverage becomes lesser||Test coverage is higher|
|When an assert fails the test is immediately aborted||when a verify fails the test will continue till end|
Example of Asset Statement:
catch (AssertionException e)
Example of Verify Statement:
Hope you like this post . Please let me know about thought on this. Please post your comment below.