Manage Workspace Webhooks

Webhooks allow NeoLoad Web to send notifications to external servers via an HTTP request.

Thanks to Webhooks, NeoLoad Web can send a notification when a NeoLoad Web event is triggered.

For example, a notification can be sent to your team collaboration tool when a test starts or ends.

Note: Creating Webhooks is only allowed to Administrator profiles. Also Webhooks are specific to the Account and the Workspace in which they are created.

Create/Add a Webhook

When no Webhooks are available in the Webhooks tab, creating one is an easy process with a click on the Create a Webhook button.

After creating your first Webhook, adding one is possible with a click on the Add a Webhook button.

NLW-WebhookCreation-1.4

The Event section allows defining if a notification must be sent when a test starts or ends. The Test started and Test ended option must be selected accordingly.

The Filters section makes it possible to define the conditions for which a notification is sent. If at least one filter condition is not met, no notification is sent

Caution: : Ticking several filters check box combines them.

Test Name: A click on the check box allows filtering the event notification by the name of the test setting. The selection options are "contains" and "does not contain". They apply to the facing field in which a character string must be entered.

Project Name: A click on the check box allows filtering the event notification by project name. The selection options are "contains" and "does not contain". They apply to the facing field in which a character string must be entered.

Scenario Name: A click on the check box allows filtering the event notification by scenario name. The selection options are "contains" and "does not contain". They apply to the facing field in which a character string must be entered.

Test Quality Status: This filter is only available for ended tests. The selection options are "is" and "is not". They apply to the facing field in which you can define to be notified for a passed or failed test.

Test Max Nb of VUs: A click on the check box allows filtering the event notification by the maximum number of VUs used in the test. For a test started notification, the value is an estimation of the max number of VUs which would be reached according to the load policy and initial test duration. For a notification of a test ended, the value is the exact maximum number of VUs reached during the test.
The selection options are "is greater than" and "is lower than". They apply to the facing field in which a numerical value must be entered.

Test Duration: A click on the check box allows filtering the event notification by the duration of the test. For a test started notification, if the test is defined with an undetermined duration, the filter is not applicable.
The selection options are "is longer than" and "is shorter than". They apply to the facing field in which a duration format value must be entered i.e. HH:MM:SS.

Name: The field must be filled in with the name to assign to the Webhook.

URL: The URL to the server where the notification is to be sent to. A valid URL is required.

Events: The radio buttons allow selecting the NeoLoad Web events that will trigger the sending of the payload to the URL specified above.

Payload: The text area must be filled in with the content to be sent in the notification. The payload content format is related to the server that receives the payload.

The payload content can include NeoLoad Web variables as described in the table below.

NLW-Webhooks-VariablesTable

Below is an example of a payload configured for sending a test end notification to Slack.

{
  "attachments": [
    {
      "fallback": "Required plain-text summary of the attachment.",
      "color": "#36a64f",
      "pretext": "A test just ended",
      "author_name": "NeoLoad Web",
      "author_link": "https://neoload.saas.neotys.com/",
      "title": "Details of test '$(test_result_name)'",
      "title_link": "$(url_test_result_overview)",
      "fields": [
        {
          "title": "Test Name",
          "value": "$(test_settings_name)",
          "short": true
        },
        {
          "title": "Project",
          "value": "$(test_result_project)",
          "short": true
        },
        {
          "title": "Scenario",
          "value": "$(test_result_scenario)",
          "short": true
        },
        {
          "title": "Author",
          "value": "$(test_result_author)",
          "short": true
        },
        {
          "title": "Start Date",
          "value": "$(test_result_start_date)",
          "short": true
        },
        {
          "title": "Duration",
          "value": "$(test_result_duration)",
          "short": true
        },
        {
          "title": "Status",
          "value": "$(test_result_status)",
          "short": true
        },
        {
          "title": "Quality Status",
          "value": "$(test_result_quality_status)",
          "short": true
        },
        {
          "title": "Max # of VUs",
          "value": "$(test_result_max_nb_vus)",
          "short": true
        },
        {
          "title": "Workspace ID",
          "value": "$(workspace_id)",
          "short": true
        },
        {
          "title": "Workspace Name",
          "value": "$(workspace_name)",
          "short": true
        }
      ],
      "footer": "Sent by NeoLoad Web",
      "footer_icon": "https://www.neotys.com/wp-content/uploads/2018/05/Picto_NL_64.png",
      "image_url": "$(url_graph_overview)"
    }
  ]
}

Content-Type: The field must be filled in with the payload format expected by the server.

A click on the TEST button allows checking if the URL is valid and the payload format supported.

Once created, the Webhook is listed in the Webhooks tab. By default, the Webhook is enabled. A click on the Enable icon allows enabling/disabling the Webhook.

NLW-WebhooksEnablebutton

To create a Webhook, follow these steps:

  1. In the left navigation panel, click Settings and select the Workspaces tab.

    All Workspaces of your Account are listed in the central panel.

  2. In the Workspace list, select the Workspace for which you want to create a Webhook.

  3. Select the Webhooks tab.

  4. Click the Create a Webhook button to create one or the Add a Webhook to add one when Webhooks are already available.

  5. In the Name field, enter the name to assign to the Webhook.

  6. In the URL field, enter a valid URL to the server the notification is sent to.

  7. If necessary, configure the required filters.

  8. Select the Test started option to send the payload when a test starts or the Test ended option when a test is finished.

  9. Fill in the Payload text area with the content to be included in the notification.

  10. Fill in the Content-Type field with the payload format expected by the server.

  11. Define the filter(s) for your Webhook if necessary.

  12. Click Test to check the configuration.

  13. Click Save to validate the Webhook creation.

Edit a Webhook

Each Webhook available in the Webhooks tab can be modified with a click on the Edit button.

NLW-WebhooksEditbutton

Editing a Webhook allows modifying the parameters entered at creation time.

To edit a Webhook, follow these steps:

  1. In the left navigation panel, click Settings and select the Workspaces tab.

    All Workspaces of your Account are listed in the central panel.

  2. In the Workspace list, select the Workspace for which you want to create a Webhook.

  3. Select the Webhooks tab.

  4. In the list of available Webhooks, click the Edit button facing the Webhook you want to modify.

  5. In the Webhook Configuration dialog box, modify the parameters as described in Create/Add a Webhook.

  6. Click Save to confirm the modifications.

Duplicate a Webhook

Each Webhook can be easily duplicated to help you gain time for Webhooks creation.

NLW-WebhooksDuplicatebutton

A click on the Duplicate icon duplicates the selected Webhook.

To duplicate a Webhook, follow these steps:

  1. In the left navigation panel, click Settings and select the Workspaces tab.

    All Workspaces of your Account are listed in the central panel.

  2. In the Workspace list, select the Workspace for which you want to create a Webhook.

  3. Select the Webhooks tab.

  4. In the list of available Webhooks, click the Duplicate icon facing the Webhook to duplicate.

Delete a Webhook

When a Webhook is not necessary any more, a click on the Delete button allows deleting it.

NLW-WebhooksDeleteButton

Also, all the Webhooks in the Webhooks list can be deleted at once with a click on the Delete button after clicking the Name check box.

NLW-WebhooksDeleteAll

To delete a Webhook, follow these steps:

  1. In the left navigation panel, click Settings and select the Workspaces tab.

    All Workspaces of your Account are listed in the central panel.

  2. In the Workspace list, select the Workspace for which you want to create a Webhook.

  3. Select the Webhooks tab.

  4. Click the Delete button facing the Webhook you want to delete.

  5. Confirm the deletion in the Deleting Webhook dialog box.