Webhook

Applies to ReadyAPI 3.52, last modified on April 18, 2024

About Webhook Runner test step

The Webhook Runner test step can be used to test async REST APIs. This is done by using it to receive async responses from a web server in return for REST requests made to that server.

Add Webhook Runner test step

You can add a Webhook Runner test step from your functional tests, by using one of the below methods.

  1. Click in the navigator and select the Webhook Runner test step.

    Add Webhook Runner Test Step

    Click the image to enlarge it.


    – or –
  2. In the test case editor, select the Webhook Runner test step from the toolbar.

Edit Webhook Runner Test Step

You can edit a Webhook Runner to specify the path on which the Webhook accepts async requests from a web server. The requests received on that path will be processed by Webhook.

To edit a Webhook Runner, click on its name within your Test Case Navigation panel. The editor will open and you can edit its path.

Edit Webhook Runner Test Step

Click the image to enlarge it.

Edit Webhook Runner using Property Expansion

You can also edit the Webhook Runner’s Path by using Property Expansions to specify a dynamic path that gets defined at runtime.

You can specify the property expansion manually, or by using the Get Data Dialog visual tool. To use the visual tool, click on the "..." button displayed at the right end of the Path field.

Edit Webhook Runner using Property Expansion

Click the image to enlarge it.

Running a Webhook Runner

You can run a Webhook Runner as a standard test step, as part of a Test Case. To do this, click on the corresponding Run button or the Run menu item.

The Webhook Runner can be run in different Test Cases, in Sequence or Parallel alongside those Test Cases.

Running a Webhook Runner

Click the image to enlarge it.

Verify Responses with Assertions

This capability is under development and will be included in one of the next ReadyAPI versions.

Configure Webhook Runner Test Step

You can configure your Webhook Runner by accessing the ReadyAPI Preferences screen.

Within ReadyAPI Preferences, select the Webhook server item. Once selected, the corresponding configuration panel will open on the screen. You can configure the Server port and Webhook step timeout

  • Server Port - The port on which the Webhook Runner is listening for a request/response from a server.

  • Webhook Step Timeout - The time (in seconds) for which the Webhook is waiting for a request/response. During this waiting time, the execution of your Test Case is blocked on the Webhook Runner test step.

    Once that time has elapsed, the Webhook Runner step will stop waiting and will pass execution to the next step in your Test Case.

Configure a Webhook Runner

Click the image to enlarge it.

Logging

The Webhook Runner’s activity is logged in the ReadyAPI logging panel so that you can trace it.

Logging

Click the image to enlarge it.

See Also

Test Steps

Highlight search results