BLOG
BlogGuides

Send test results to Linear or Jira with webhooks

Testsy posts each finished run to your endpoint as signed JSON. Verify the signature, then open an issue with the failed check, what was seen and the link to the proof.

From a failed run to a ticket#

A failed release check is work for someone. If it lives only in a test dashboard, it competes with everything else for attention. Turning it into an issue in the tracker your team already works from puts it in the queue with an owner.

Testsy does not create the issue for you. It sends each finished run to an endpoint you control, as JSON, and your endpoint decides what to do: open a Linear issue, a Jira ticket, a page in your own dashboard.

Add an endpoint#

Administrators add endpoints under Connect → Webhooks: an https address on a public host name, whether to send every result or failures only, and for all projects or one. A workspace can have up to ten. The signing secret (whsec_…) is shown once. Webhooks are managed in the web app only; API keys and MCP cannot add or change them, so a leaked key cannot redirect your results. Details in the webhooks docs.

What arrives#

One POST per finished run, with the run's id, test, verdict, headline, each check with its outcome and reason, the values read and a link to the run:

{
  "event": "run.finished",
  "run": {
    "testTitle": "Checkout works", "verdict": "failed", "headline": "The total was wrong",
    "requirements": [{ "requirement": "The total is right", "outcome": "fail", "reason": "Saw 12.00, expected 10.00" }],
    "captures": [{ "name": "total", "value": "12.00" }],
    "link": "https://app.testsy.dev/o/o_…/runs/j_…"
  }
}

That is a shortened example. Messages the run received (emails, SMS) are never sent in a webhook.

Verify the signature#

Each request carries X-Testsy-Timestamp and X-Testsy-Signature. Compute an HMAC-SHA256 of <timestamp>.<raw body> with your secret, compare in constant time, and reject old timestamps:

import {createHmac, timingSafeEqual} from 'node:crypto';
export function verify(req, rawBody, secret) {
  const ts = req.headers['x-testsy-timestamp'], sig = req.headers['x-testsy-signature'] ?? '';
  if (!ts || Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
  const want = 'v1=' + createHmac('sha256', secret).update(`${ts}.${rawBody}`).digest('hex');
  return want.length === sig.length && timingSafeEqual(Buffer.from(want), Buffer.from(sig));
}

Make the issue useful#

Map the payload to the fields a developer needs: title from the test and the failed check, body from the reason ("Saw 12.00, expected 10.00"), the values read, and the link. Use the delivery id (X-Testsy-Delivery, the same across retries) to avoid opening the same issue twice.

For a person filing it by hand, Copy as an issue on any failed result copies the same facts as Markdown: the check, expected and seen, numbered steps to reproduce, and the link to the proof.

Retries and failures#

Answer with a 2xx within ten seconds. Anything else is retried after 1, 5 and 30 minutes with the same delivery id. An endpoint that fails 20 attempts in a row is turned off until you turn it on again under Connect.

This post is part of Release testing for product teams.

Filed underWebSharing and alertsCI, schedules and agents