Web Functional Testing > Handling Exceptions

Handling Exceptions

Tags:  

Overview

Exceptions are part of software engineering but we need to have efficient means to handle them so that the normal execution of the software continues with minimal effect on the code or the data.

Web testing also handles such situations and facilitates you with options so that you can decide what to do when exceptions are encountered.

Types of Exceptions

Web Test module allows you to handle the following types of exceptions.

PopUp Exceptions

  1. This refers to the unexpected popups that popup during the playback of the webscripts but were not encountered during the recording phase.

  2. For e.g. assume you are testing a page using which you create a new user account and the user related details are populated in the database. If the user account already exists, then an alert popup is displayed saying "User details already exist".

  3. During recording the first time, you enter a new user details and hence the alert popup is not displayed. But when the webscript is played back, the automated test script will try to add the same user details and the alert popup will be displayed.

Web Exceptions

This refers to exceptions such as Page/URL not found when trying to access a page in the internet. Assume you had recorded the page at http://www.abcd.com/index.html but that page does not exist anymore. Hence during playback, Page/URL not found exception is encountered.

Script Exceptions

This refers to the syntactical incorrectness in the webscript. For e.g. assume you are inserting a built in function manually and instead of linkGetInfo() you have typed linGetInfo().

Object Exceptions

This refers to a variety of exceptions related to the HTML objects in the page under recording. For e.g. during recording a HTML Text object named user_name was recorded but during playback it was not found as the page has been changed. In this case, ELEMENT_NOT_FOUND exception will be thrown.

 Handling Exceptions

Popup and Web Exceptions

To handle popup and Web execptions, Web Functional Test provides "Exception Handling" options which can be configured by choosing the Settings tab in the Web UI.

Refer to this link  details.

Script and Object Exceptions

You need not handle these explicitly. Web Functional Test takes care of logging these in the log files and continue the test case execution as appropriate. You will be able to see these in the log files. In case of object exceptions, you can use the callScript function to call another script to perform some specific operation based on the exception received.

Javascript Errors

Any javascript error in the web application occured during script execution will be reported to the Summary report for debugging.


0 Comments  Show recent to old
Post a comment


 RSS of this page

Copyright © 2009, Zoho Corporation. All Rights Reserved.