Runscope Integration

Runscope  is a SaaS-based company that provides solutions for API performance testing, monitoring and debugging.

OpsGenie is an alert and notification management solution that is highly complementary to Runscope.

What does OpsGenie offer Runscope users? 

OpsGenie has a webhook integration with Runscope. OpsGenie acts as a dispatcher for Runscope alerts, determining the right people to notify based on on-call schedules, using email, text messages (SMS), phone calls and iOS & Android push notifications, and escalating alerts until the alert is acknowledged or closed.


Functionality of the integration

  • When a test fails in Runscope, an alert is created in OpsGenie.
  • When the test passes in Runscope, the related alert is closed in OpsGenie.

Configuring OpsGenie side of the integration

  1. Please create an OpsGenie account if you haven't done already.
  2. Go to OpsGenie Runscope Integration page,
  3. Specify who should be notified for Runscope alerts using the "Teams" and "Recipients" fields. Auto-complete suggestions will be provided as you type. 
  4. Copy the API key by clicking on the copy button or selecting.
  5. Click on "Save Integration".

Configuration in Runscope

  1. Go to the Radar page and click on the name of an existing test, or create a new one.
  2. Select "Editor" on the left-navigation pane.
  3. Expand Test Settings collapsable.
  4. Paste the URL you copied from the OpsGenie AlertSite integration Configuration page into the Recipient field.
  5. Select "Notifications" on the left pane of the Test Settings collapsable window.
  6. Paste the API URL which you obtained when you configured OpsGenie side of the integration into the Callback URLs field.
  7. Click the Save.

Sample payload sent from Runscope

{
            "bucket_key": "twdf2fkje38x",
            "finished_at": 1389715076.373915,
            "team_id": "3ac6891f-a261-40a1-aafe-53f0bb7af84e",
            "bucket_name": "Bucket1",
            "environment_name": "Production DataSource SiteBased",
            "result": "fail",
            "test_name": "testci",
            "team_name": "opsgenie",
            "test_id": "6abb1082-3d66-49aa-89d1-616ec601e5b3",
            "started_at": 1389715074.918255,
            "test_url": "https://www.runscope.com/radar/twdf2fkje38x/6abb1082-3d66-49aa-89d1-616ec601e5b3",
             "test_run_url": "https://www.runscope.com/radar/twdf2fkje38x/6abb1082-3d66-49aa-89d1-616ec601e5b3/results/e7219c0e-9c83-4bcd-83f7-63e5ce186dcc",
              "test_run_id": "e7219c0e-9c83-4bcd-83f7-63e5ce186dcc",
              "trigger_url": "https://api.runscope.com/radar/e31fbf54-b2cd-4b46-b96a-29aeecf542ac/run",
              "requests": [
                {
                    "url": "https://api.opsgenie.com/",
                    "variables": {"fail": 0,"total": 0,"pass": 0},
                    "assertions": {"fail": 0,"total": 1,"pass": 1},
                    "result": "pass",
                    "method": "GET"
                },
                {
                    "url": "https://api.opsgenie.com/failurl1",
                    "variables": {"fail": 0,"total": 0,"pass": 0},
                    "assertions": {"fail": 1,"total": 1,"pass": 0},
                    "result": "fail",
                    "method": "GET"
                },
                {
                    "url": "https://api.opsgenie.com/failurl2",
                    "variables": {"fail": 0,"total": 0,"pass": 0},
                    "assertions": {"fail": 1,"total": 1,"pass": 0},
                    "result": "fail",
                    "method": "GET"
                }
            ]
}

Sample alert