Export (0) Print
Expand All
Expand Minimize

HandlerFunctions Property

Microsoft Dynamics Nav 2009

NoteNote

The content in this topic only applies to Microsoft Dynamics NAV 2009 SP1. For Microsoft Dynamics NAV 2009 content, see Developer and IT Pro Help for Microsoft Dynamics NAV 2009.

Specifies the handler functions that are used by the test function.

C/AL test functions on test codeunits. A test function is a function that has the FunctionType Property set to Test.

NoteNote

The HandlerFunctions property is only visible when the Show C/AL Testability properties option of the Classic client is set to Yes. To change this setting, on the Tools menu, click Options.

The handler function name as specified on the Functions tab of the C/AL Global window for the test codeunit.

NoteNote

If the test function uses more than one handler function, then you should separate the handler function names by a comma.

You use test codeunits and test functions to test your application. A handler function allows you to automate tests by handling instances when user interaction is required by the code that is being tested. In these instances, the test function calls the handler function, which is run instead of the user interface.

The following is some important information about handler functions:

  • To be a handler function, the FunctionType Property must set to one of the handler types: MessageHandler, ConfirmHandler, StrMenuHandler, FormHandler, ModalFormHandler, ReportHandler.

  • A test function can only call handler functions that are defined in the same test codeunit as the test function.

  • A test function can call MessageHandler, ConfirmHandler and StrMenuHandler type handlers only once. It can call FormHandler, ModalFormHandler, and ReportHandler type handlers multiple times but only once per application object ID.

  • Every handler function that you enter in the HandlerFunctions property must be called at least once in the test function. If you execute a test function that has a handler function listed that is not called, then the test fails.

For more information, see Testing the Application and How to: Create Handler Functions.

Community Additions

ADD
Show:
© 2014 Microsoft