HTTP Webhooks
HTTP Webhooks for Cypress tests dashboard

Description

Enabling HTTP Webhook Integration will trigger an HTTP POST request to an endpoint of your choice.
Currents will send a POST request for the following lifecycle event of cypress tests run:
  • a new cypress tests run starts
  • a run finishes
  • a runs times out
  • a run is cancelled
Please note: The endpoint should be publicly accessible

Examples

Example of HTTP POST request with cypress tests run data

1
curl --location --request POST 'https://yourserver.com/webhook/currents.dev' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"event": "RUN_START",
5
"runUrl": "https://app.currents.dev/run/950a13c3edf4f28b6e8ce301a404b4aa",
6
"buildId": "demo-build-cdx3314",
7
"commit": {
8
"authorEmail": "[email protected]",
9
"authorName": "John Doe",
10
"defaultBranch": "main",
11
"branch": "feature-A",
12
"message": "feat: change button color",
13
"remoteOrigin": "https://github.com/org/repo.git",
14
"sha": "5a7edc9a156e417068060d67109021351fc7d9b8"
15
},
16
"failures": 0,
17
"flaky": 0,
18
"overall": 1,
19
"passes": 1,
20
"pending": 0,
21
"retries": 0,
22
"skipped": 0
23
}'
Copied!

HTTP Webhook Integration payload schema

1
{
2
event: "RUN_START" | "RUN_FINISH" | "RUN_TIMEOUT" | "RUN_CANCELED";
3
runUrl: string; // currents dashoard run URL
4
buildId: string; // as reported by CI
5
groupId: string; // only for multigroup runs
6
tags: string[];
7
commit: {
8
sha: string | null;
9
branch: string | null;
10
authorName: string | null;
11
authorEmail: string | null;
12
message: string | null;
13
remoteOrigin: string | null;
14
defaultBranch: string | null;
15
},
16
overall: number; // overall number of tests
17
passes: number; // number of passed tests
18
failures: number; // number of failed tests
19
pending: number; // number of pending tests
20
skipped: number; // number of skipped tests
21
retries: number; // number of test retries for the run
22
flaky: number; // number of flaky tests for the run
23
}
Copied!
Copy link