Another QEngine play settings which will be useful to improve script efficiency is Exception Handling. Below i have briefed on QEngine Exception handling feature.
Exception Handling
There were four different exception that can occur during playback.
* Popup Exception - During playback, due to some error scenario some alert popup may be shown. The popup may not be shown during recording the script. Due to this playback may fail. In QEngine to handle such scenario Popup Exception handling can be used. In popup exception you have following options to handle error scenario,
Report & Coninut Play - This will report about the popup appeared in the reports and then proceed to play further action
Capture Screen & Continue Play - This will capture the screen shot when the popup appeared and show the same in the reports.
Stop Play - Stop the playback and generates report.
Close & Continue Play - This will close the popup and continue to play the script.
Accept popup & Continue Play - The "OK" button in the popup will be pressed and the playback will continue.
Cancel & Continue Play - The "Cancel" button in the popup will be pressed and the playback will continue.
Call Script - Another script in the suite can be called to handle the error scenario.
Close Error popup at the end of script execution - This will close any popup remain open at the end of script execution.
* Web Exception - During playback, due to some server error the required page may not be displayed. In such scenario, the playback on the particular page will fail. In QEngine to handle such scenario Web Exception handling can be used. Web Exception will be determined by matching the Response Code with the configured Error code OR matching the page url with the configured Error page URL OR matching the page title with the configured error page title. In web exception you have following options to handle the error scenario,
Stop Play - Stop the playback and generate reports.
Report & Continue Play - Report the Web Exception details and will proceed to play back the script.
Call Script - Another script in the suite can be called to handle the error scenario.
* Error Handling - During playback, if there is any failure in the script, then the Error Handling will be invoked. In QEngine you have following option to handle the Script Failures
Call Script - Another script in the suite can be called to handle the error scenario.
* JavaScript Errors - During playback, if there is any Java script error occurs, then the same can be made to notified in the report.
To configure Exception Handling goto Settings -> Exception Handling and choose any of the exception handling to handle the error scenario.
Exception handling will be useful in handling any unexpected application scenario.
Thanks
Raghavan
Post Comment