Understanding the Payload of a Notification Webhook
Testany notification system will use the following data format to notify the opponent via webhook dispatch.
Table 1: Basic information on the payload request
HTTP version | HTTP/1.1 |
---|---|
Request method | POST, comply with RFC2616 |
TLS verification | Strict, if provided |
MIME type |
|
Timeout | 15 seconds |
Retries | 3 times |
Body | See table 2 |
Table 2: Payload body data format
Key | Type | Explain | Example |
---|---|---|---|
| String | Name of the trigger. |
|
| Int | Trigger execution status:
|
|
| String | Key of the trigger. |
|
| String, enum | Indicating the type of the trigger. Enum:
|
|
| []String | The list of trigger resource owners. |
|
| []Pipeline | The list of executed pipelines. | See table 3 |
Table 3: Pipeline data format
Key | Type | Explain | Example |
---|---|---|---|
| String | Name of the pipeline |
|
| Int | Pipeline execution status:
|
|
| String | Key of the pipeline. |
|
| []String | The list of pipeline owners. |
|
| []Case | The list of cases execution results that the pipeline uses. | See table 4 |
| Int | The duration of the pipeline execution, unit is |
|
| String | The pipeline execution identifier. |
|
| String, timestamp | RFC3339 timestamp, indicating the start time of the pipeline execution. |
|
| String, timestamp | RFC3339 timestamp, indicating the finish time of the pipeline execution. |
|
Table 4: Case data format
Key | Type | Explain | Example |
---|---|---|---|
| String | Name of the test case |
|
| Int | Test case execution status:
|
|
| String | Key of the test case. |
|
| String | A unique identifier for the runtime instance where the case is executed. |
|
| String | A unique name for the runtime instance where the case is executed. |
|
| []String | The list of test case owners. |
|
| Int | The duration of the test case execution, unit is |
|
| String | The environment of the test case. |
|
| String, timestamp | RFC3339 timestamp, indicating the start time of the test case execution. |
|
| String, timestamp | RFC3339 timestamp, indicating the finish time of the test case execution. |
|
Examples