Testing Notification Methods

How to test your notification methods before starting using them

Overview

Under Configuration > Notification Method, when you add or edit a method, you can check that is it setup properly in the 'Test' tab.
This section covers only a sub-set of notification methods, as examples.

Test Notification Method View

The user will be prompted to fill in the contact variables text fields on the form. Where appropriate, the user may have default contact variable values set.

The contact variables that the user is prompted for can be seen in the Notification Methods tab in the 'User Variable' text fields. The names can be seen to vary across the two screens. However, to distinguish which contact variable relates to which in the 'Notification Methods' tab, the user can hover over the question mark icon next to the text field to see it's corresponding name.

The final part of the 'Test' tab view to notice is the 'Message' text field and 'Send' button, both of which will only display to a user if they have either the TESTSOME or TESTALL permissions as well as having the CONFIGUREVIEW permission. The 'Message' text field will have the default message 'Test Message' that the user may choose to replace with their own.

Adding 'User Variables' To Test

On the 'Notification Method' tab seen adjacent to the 'Test' tab, the user can add another 'User Variable' to the text field list by typing at the end of the list ',TEST_VARIABLE'. The user can then click on the form in order to blur the 'User Variable' text field and then navigate back to the 'Test' tab.

The below example shows how the new contact variable will be added underneath the other user variables and above the 'Message' field.

Sending Test Notification Method

The user must fill in all of the user variable values before sending; if they do not, they will be prompted with an error message as seen below.

Given that the user has filled in all of the variables in the 'Test' tab, an output box will display with the data returned from the REST API call, including the stdout and the stderr (if this data is returned). For example, the output box below has only displayed the message "Notification Method Sent" as the return code was 0, stdout and stderr returned empty strings, hence not seeing that information.

The user can also test with global variables only. In the image below, there are no contact variables for the user to fill out. This means that the user can test with the global variables seen on the 'Notification Methods' tab.