Skip to content

CI/CD Webhooks

A webhook lets your pipeline start saved test cases after a deploy. Your pipeline sends one POST request to your webhook address; InsightJet answers at once and runs the tests in the background.

  1. Open Settings → Integrations → Webhook.

  2. Enter the Primary URL to check (your app’s address) and, if you like, a Business context (general, ecommerce, dashboard or news_platform).

  3. Click Create webhook. The page shows your Webhook URL:

    https://insightjet.ai/api/webhooks/trigger/<your-token>

    The token is the last part of the address. There is no separate header: the address itself is the secret.

  4. Store the full address as a secret in your CI platform (for example GitHub Actions secrets or GitLab CI variables).

Each person has one webhook. Only a team admin can create it, rotate its token or turn it off; other members see the address with the token hidden.

Send one of these two bodies as JSON.

Run specific test cases by their ids:

Terminal window
curl -X POST "$INSIGHTJET_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{"testCaseIds": [101, 102, 103]}'

Only test cases from your own crawls run. A request with neither testCaseIds nor runId with runAllForRun: true is refused.

FieldWhat it does
recordVideofalse turns off the video recording (on by default).
urlThe address to start from when a test does not name one. Defaults to the webhook’s primary URL.
businessContextOverrides the webhook’s business context for this call.
timeoutMsHow long each test may take, in milliseconds. Default 180000 (3 minutes).

InsightJet records where a call came from with each test run. It reads GitHub’s and GitLab’s own webhook bodies when their event header is present. From any other caller it reads these body fields: repo, ref (for example refs/heads/main), commit or sha, user, and message.

When a GitHub or GitLab event header is sent, only these events start tests: push, pull request or merge request, release, tag push, workflow job and workflow run. Other events are answered with "accepted": false and nothing runs.

A started call answers 202 with "accepted": true, a correlationId that ties the call’s runs together, and queuedRuns, the list of test runs it started.

AnswerMeaning
202Accepted. The tests run one after another in the background.
400No tests named. Send testCaseIds, or runId with runAllForRun: true.
403Not started: the account is out of agent-hours, all its agents are busy, or its owner is no longer in the webhook’s team. The body’s message says which.
404The address is unknown or turned off, or no matching test cases were found.
503Not started: InsightJet could not check hours, agents or team membership just then. Try again in a minute.

Runs use the agent-hours of the team the webhook was created in.

Open Settings → Keys → CI webhook token:

  • Rotate makes a new token. The old address stops working at once, so update your CI secret.
  • Turn off stops the webhook. To turn it on again, rotate the token.

Saving the Webhook page again with a webhook already in place also rotates the token; the page asks first.

- name: Run InsightJet tests
run: |
curl -X POST "${{ secrets.INSIGHTJET_WEBHOOK_URL }}" \
-H "Content-Type: application/json" \
-d '{"runId": 123, "runAllForRun": true, "commit": "${{ github.sha }}", "ref": "${{ github.ref }}"}'
insightjet-tests:
stage: test
script:
- |
curl -X POST "$INSIGHTJET_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d "{\"runId\": 123, \"runAllForRun\": true, \"commit\": \"$CI_COMMIT_SHA\"}"

Open Test Reports and set Source to CI Webhook. Each run is also listed in the run history of its test case.

For pull request tests that create a ticket and comment the result on the pull request, see GitHub pull request tests.