# HandlerFunctions attribute
> Version: _Available or changed with runtime version 1.0._
Specifies the handler methods that are used by the test method.
## Applies to
 Method
> NOTE
> The HandlerFunctions attribute can only be set inside codeunits with the SubType property set to Test.
## Syntax
```al
[HandlerFunctions(HandlerNames: Text)]
```
### Arguments
HandlerNames
Type: ../methods-auto/text/text-data-type
The names of the handler methods used by the test method.
> NOTE
> If the test method uses more than one handler method, separate the handler method names with commas.
## Remarks
You use test codeunits and test methods to test your application. A handler method 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 method calls the handler method, which is run instead of the user interface.
The following rules apply to handler methods:
 A handler method must have one of these attributes:
   devenv-messagehandler-attribute
   devenv-confirmhandler-attribute
   devenv-strmenuhandler-attribute
   devenv-pagehandler-attribute
   devenv-modalpagehandler-attribute
   devenv-reporthandler-attribute
   devenv-requestpagehandler-attribute
   devenv-sendnotificationhandler-attribute
   devenv-hyperlinkhandler-attribute
   devenv-recallnotificationhandler-attribute
   devenv-sessionsettingshandler-attribute
   devenv-filterpagehandler-attribute
   devenv-httpclienthandler-attribute
 A test method can only call handler methods that are defined in the same test codeunit as the test method.
 Every nonoptional handler method that you enter in the HandlerFunctions attribute must be called at least once in the test method. If you execute a test method that has a nonoptional handler method listed that isn't called, then the test fails. Send-notification and recall-notification handlers can be optional.
Learn more about handler methods in Create handler methods<../devenv-creating-handler-methods>.
## Example
```al
[Test]
[HandlerFunctions('SendNotificationHandler,MessageHandler')]
procedure MyTestFunction()
begin
    ...
end;
```
## Related information
Get Started with AL<../devenv-get-started>
Developing Extensions<../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/attributes/devenv-handlerfunctions-attribute, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/attributes/devenv-handlerfunctions-attribute/
