Triggers
Triggers let you automate responses to events in RobusTest. When a specified condition occurs on a device, node, job, or other entity, RobusTest automatically performs an action — such as sending a notification, restarting a device, or placing it into maintenance mode.
How It Works
A trigger has three parts:
- Entity — the type of object being watched (device, node, job, etc.)
- Conditions — criteria that must be true for the trigger to fire
- Actions — what RobusTest does when the trigger fires
Triggers are evaluated in real time as entities change state. When all conditions are met, the defined actions execute automatically.
Supported Entity Types
| Entity Type | Description |
|---|---|
device |
Physical or virtual device |
node |
RobusTest node (server running Neuron) |
job |
Test job |
build |
Uploaded application build |
project |
RobusTest project |
instance |
Test execution instance |
testcase |
Individual test case |
testresult |
Test result |
Supported Action Types
| Action Type | Description |
|---|---|
notification |
Send a notification via a configured channel (email, Slack, or REST webhook) |
restart |
Restart the device |
maintenance |
Place the device into maintenance mode |
Creating a Trigger
POST /v3/trigger/:id
Request body:
{
"name": "Device Offline Alert",
"desc": "Notify team when a device disconnects",
"entityType": "device",
"conditions": [
{
"attribute": "status",
"operator": "=",
"value": "disconnected"
}
],
"actions": [
{
"name": "Send Slack Alert",
"actionType": "notification",
"detail": {
"channel": "slack",
"name": "Slack Alert",
"body": "Device {{.Item.label}} has gone offline.",
"channelDetails": {
"url": "https://hooks.slack.com/services/..."
}
}
}
]
}
| Field | Description |
|---|---|
name |
Trigger name |
entityType |
Entity type to watch (see table above) |
conditions |
Array of conditions — all must be true for the trigger to fire |
actions |
Array of actions to execute when triggered |
isEnabled |
true by default on creation |
Condition Fields
| Field | Description |
|---|---|
attribute |
Attribute of the entity to evaluate (e.g. status, osVersion) |
operator |
Comparison: =, ==, >, >=, <, <=, in, timeExceeded |
value |
Value to compare against |
Listing Triggers
GET /v3/triggers
Returns all triggers.
Updating a Trigger
PUT /v3/trigger/:id
Deleting a Trigger
DELETE /v3/trigger/:id
Trigger Notification Data
Retrieve all notifications generated by a specific trigger.
GET /v3/notification/trigger/:triggerid
Returns an array of notification records created each time the trigger fired. Each record captures the channel used, delivery status, and the rendered message body.
Response fields:
| Field | Type | Description |
|---|---|---|
_id |
string | Unique notification record ID |
objectID |
string | ID of the entity that satisfied the trigger conditions |
objectType |
string | Type of that entity (e.g. device, job) |
triggerID |
string | ID of the trigger that generated this notification |
triggerName |
string | Name of the trigger |
eventID |
string | ID of the event that caused the trigger to fire |
actionID |
string | ID of the action that was executed |
type |
string | Notification channel: email, slack, or rest |
status |
boolean | true if the notification was delivered successfully |
body |
string | Rendered message body sent to the channel |
details |
object | Channel-specific delivery details |
error |
object | Error information if delivery failed |
message |
string | Additional metadata |
created |
timestamp | When the notification was initiated |
updated |
timestamp | When the notification completed |
Trigger History
Each time a trigger fires, a history entry is recorded.
GET /v3/history/trigger/:id
Returns the execution history for a specific trigger.
Notification Channel Types
When actionType is notification, the detail object defines how the notification is delivered.
{
"channel": "email",
"name": "QA Team Alert",
"body": "Job {{.Item.name}} completed with status {{.Item.status}}.",
"channelDetails": {
"recipients": ["qa@example.com", "devops@example.com"],
"subject": "RobusTest Job Notification"
}
}
Prerequisite: Mail settings must be configured in Admin Console → Settings → Mail.
Slack
{
"channel": "slack",
"name": "Slack QA Channel",
"body": "Device {{.Item.label}} is offline.",
"channelDetails": {
"url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXX"
}
}
REST Webhook
{
"channel": "rest",
"name": "Webhook Alert",
"body": "{\"message\": \"Device offline\"}",
"channelDetails": {
"url": "https://your-endpoint.com/alert",
"method": "POST",
"authToken": "your-token",
"headers": {
"Content-Type": "application/json"
}
}
}
