Execute Tests
The Voidr API provides two main endpoints for executing tests: one for running all tests in an application, and another for executing specific test plans with granular control.
Execute All Application Tests
The POST /executions/application endpoint creates executions for all test plans in an application.
Request
curl -sS --location "$API_URL/executions/application" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"applicationId": "YOUR_APPLICATION_ID",
"environment": "YOUR_ENVIRONMENT",
"provider": "PLAYWRIGHT"
}'
Parameters
| Field | Type | Required | Description |
|---|
applicationId | string | ✓ | Application ID (MongoDB ObjectId) |
environment | string | ✓ | Execution environment (e.g., production, staging) |
provider | string | ✓ | Test provider: PLAYWRIGHT or CYPRESS |
browser | object | ○ | Browser configuration (name, version, channel) |
tags | string[] | ○ | Tags to filter/group executions |
notificationIds | string[] or null | ○ | Webhook IDs to notify (null = all, [] = none) |
Response
{
"success": true,
"data": {
"applicationExecutionId": "APPLICATION_EXECUTION_ID",
"total": 0,
"created": 0,
"skipped": 0,
"executions": [
{
"_id": "EXECUTION_ID",
"code": "EX-XXXX",
"status": "QUEUED"
}
]
}
}
Response Fields
| Field | Description |
|---|
applicationExecutionId | UUID that groups all executions from this trigger |
total | Total number of plans processed |
created | Number of executions created |
skipped | Number of plans ignored (already running) |
Execute Specific Test Plan
The POST /executions endpoint creates an execution for a specific test plan (standard endpoint used by the platform).
Request (Complete Plan)
curl -sS --location "$API_URL/executions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"applicationId": "YOUR_APPLICATION_ID",
"planId": "YOUR_PLAN_ID",
"environment": "YOUR_ENVIRONMENT",
"provider": "PLAYWRIGHT"
}'
Required Parameters
| Field | Type | Description |
|---|
applicationId | string | Application ID (MongoDB ObjectId) |
planId | string | Test plan ID (MongoDB ObjectId) |
environment | string | Execution environment (e.g., production, staging) |
provider | string | Test provider: PLAYWRIGHT or CYPRESS |
Optional Parameters
| Field | Type | Description |
|---|
browser | object | Browser configuration with name, version, channel |
device | object | Device configuration with name |
viewport | object | Viewport configuration with width and height |
locale | string | Locale (e.g., en-US) |
timezone | string | IANA timezone (e.g., UTC) |
tags | string[] | Tags to filter/group executions |
notificationIds | string[] or null | Webhook IDs to notify (null = all, [] = none) |
idempotencyKey | string | Idempotency key to prevent duplicate executions |
ci | object | CI/CD information with provider, runUrl, pipelineId, workflow |
branch | string | Branch name |
commit | object | Commit information with sha, author, message, timestamp, url |
Execution Modes
Mode 1: Complete Plan (Default)
Executes all test cases in the plan.
{
"applicationId": "...",
"planId": "...",
"environment": "production",
"provider": "PLAYWRIGHT"
}
Mode 2: By Modules
{
"applicationId": "...",
"planId": "...",
"environment": "production",
"provider": "PLAYWRIGHT",
"moduleSlugs": ["AUTEN", "CHECKOUT"]
}
Mode 3: By Suites
{
"applicationId": "...",
"planId": "...",
"environment": "production",
"provider": "PLAYWRIGHT",
"suiteSlugs": ["login-suite", "payment-suite"]
}
Mode 4: By Specific Targets
{
"applicationId": "...",
"planId": "...",
"environment": "production",
"provider": "PLAYWRIGHT",
"targets": [
{
"moduleSlug": "AUTEN",
"suiteSlug": "login-suite",
"testCaseSlug": "TC-001"
},
{
"moduleSlug": "CHECKOUT",
"suiteSlug": "payment-suite",
"testCaseSlug": "TC-005"
}
]
}
Rule: Use only one mode per request (do not combine targets, moduleSlugs, and suiteSlugs).
Response
{
"success": true,
"data": {
"_id": "EXECUTION_ID",
"code": "EX-XXXX",
"applicationId": "YOUR_APPLICATION_ID",
"planId": "YOUR_PLAN_ID",
"environment": "YOUR_ENVIRONMENT",
"provider": "PLAYWRIGHT",
"status": "QUEUED",
"createdAt": "ISO_8601_TIMESTAMP"
}
}
Select Which Notifications Receive Results
When creating an execution, use notificationIds to control which enabled notifications receive results:
null or omitted: notifies all enabled notifications in the organization (default)
[] (empty array): does not notify anyone
["id1", "id2"]: notifies only the notifications with these IDs
Example: Notify Only One Specific Webhook
Step 1: Get the notification id from the customer configs endpoint:
curl -sS -X GET "$API_URL/customer-configs" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Accept: application/json"
Look for the id field in pipelineNotifications array.
Step 2: Trigger execution with notificationIds
WEBHOOK_NOTIFICATION_ID="YOUR_NOTIFICATION_ID"
curl -sS -X POST "$API_URL/executions" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"applicationId\": \"YOUR_APPLICATION_ID\",
\"planId\": \"YOUR_PLAN_ID\",
\"environment\": \"YOUR_ENVIRONMENT\",
\"provider\": \"PLAYWRIGHT\",
\"browser\": {\"name\": \"CHROMIUM\"},
\"suiteSlugs\": [\"YOUR_SUITE_SLUG\"],
\"notificationIds\": [\"$WEBHOOK_NOTIFICATION_ID\"]
}"
Next Steps