Creating Webhooks
  • 31 Mar 2022
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Creating Webhooks

  • Dark
    Light

Webhook

A webhook allows you to get notified when a certain event occurred. It allows you to integrate custom services like Zapier into your workflow. We made an example app written in Ruby (Sinatra) to illustrate how we can handle webhooks from Autify.

Setting up a Webhook

  1. Go to the Workspace settings page
  2. Click the Add button in the Webhook section
  3. Fill in the Webhook URL field, and the optional Webhook Secret Token field

Webhook URL

The Webhook URL is the URL of the server that will receive POST requests and content type is application/json.

Webhook Secrets

A webhook secret token enables you to verify the authenticity of the payload. When setting up, you will receive along with the request. To learn more, please refer"Securing your webhooks" document.

Webhook event payload

Test Plan result

Send an event at the end of the test plan.

Webhook payload example

{
    "action":"finished",
    "id":1,
    "started_at":"2020-07-14T06:37:39.598Z",
    "finished_at":"2020-07-14T06:37:59.456Z",
    "status":"passed",
    "url":"https://app.autify.com/projects/1/results/1",
    "scenarios":[{
        "action":"finished",
        "id":1,
        "started_at":"2020-07-14T06:37:39.598Z",
        "finished_at":"2020-07-14T06:37:59.456Z",
        "status":"passed",
        "url":"https://app.autify.com/projects/1/results/1/capabilities/1/scenarios/1",
        "scenario_id":1,
        "scenario_name":"New Scenario",
        "review_needed":false,
        "test_plan_id":1,
        "capability":{
            "os":"Linux",
            "os_version":null,
            "browser":"Chrome",
            "browser_version":"83.0",
            "device":null,
            "resolution":"1280x1024"
        }
    }]
}

Test Case result

Send an event at the end of the test case.

Webhook payload example

{
    "action":"finished",
    "id":1,
    "started_at":"2020-07-14T06:37:39.598Z",
    "finished_at":"2020-07-14T06:37:59.456Z", 
    "status":"passed",
    "url":"https://app.autify.com/projects/1/results/1/capabilities/1/scenarios/1",
    "scenario_id":1,
    "scenario_name":"New Scenario",
    "review_needed":false,
    "test_plan_id":1,
    "capability":{
        "os":"Linux",
        "os_version":null,
        "browser":"Chrome",
        "browser_version":"83.0",
        "device":null,
        "resolution":"1280x1024"
    }
}

First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.