What is Exception Handling in WinRunner

Showing Answers 1 - 6 of 6 Answers

Exception Handling -- Supressing unexpected popups and error mesages, to run the win runner test scripts without any interrruption.

U can handle these exceptions by using recovery manager or web exception handling or u can define your own TSL exception handling function.

  Was this answer useful?  Yes

Anil Maurya

  • Feb 25th, 2007
 

Basically the exception handling is used in Winrunner to supress the run-time error which occurs while running the TSL script.And to handle these exceptions during runtime we use the Exception handling.....


And there r basically 3 Types of exception handling in Winrunner:=
1.TSl Exception
2.Pop-up Exception
3.object exception



  Was this answer useful?  Yes

Anil Maurya

  • Feb 25th, 2007
 

WinRunner provides these standard functions:

 

  • exception_off -- Deactivates handling for an exception.
  • exception_off_all -- Deactivates handling of all exceptions.
  • exception_on --- Enables detection and handling of a previously defined exception.

Exceptions can be defined from Tools> Exception Handling. However, I prefer to hard-code define_...exception commands for better maintainability at the sacrifice of run speed.

Trigger TSL function WRUN.INI key
window define_popup_exception( XR_EXCP_POPUP
object define_object_exception( XR_EXCP_OBJ
Return Code define_tsl_exception( XR_EXCP_TSL

In large applications with lots of different errors which can pop up, it many be handy to use a spreadsheet matrix (WR ddt table) to specify the exceptions which are expected from the exceptions which are not expected for each test case -- helpful for thorough testing of exception handling (a task usually too tedious for most developers and even many testers to manually perform diligently).

  Was this answer useful?  Yes

Exception Handling is to handle the runtime errors.
There are three types of exception handling techniques.
1. Object
2. Pop-up
3. Tsl

Object oriented exception handling is to handle the windows exceptions.
Pop-up is to handle the application exceptions.
Tsl is to handle the script exceptions.

  Was this answer useful?  Yes

Naveen Pathak

  • Mar 12th, 2007
 

Exception handling can be done by following 4 type of function:
Web_exception_handler_dialog_click_default activates the default button.*Web_exception_handler_fail_retry activates the default button and reloadsthe Web page.* Web_exception_enter_username_password uses the given user nameand password.*Web_exception_handler_dialog_click_yes activates the Yes button.

  Was this answer useful?  Yes

sudha_balu

  • Nov 24th, 2008
 

Handling unexpected errors during run time means Excepting Handling....
In winrunner it is explained as Recovery Scenario... there are 3 types of recovery scenario.
1. pop_up event : it used when unexpected pop-up window occurs during run time
2.object event : it used when changes happened in the object properties during execution.
3.TSL event: it occurs if any changes happened in the TSL language script.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions