Targets Reference ​
Targets are the platforms where TestBeats delivers your test results. Each target represents a specific communication channel or data destination.
Available Targets ​
Communication Platforms ​
| Target | Description | Configuration |
|---|---|---|
| Slack | Send results to Slack channels | Webhook URL |
| Teams | Send results to Microsoft Teams | Webhook URL |
| Chat | Send results to Google Chat | Webhook URL |
| GitHub | Publish results to GitHub PRs | GitHub Token |
Data Platforms ​
| Target | Description | Configuration |
|---|---|---|
| InfluxDB | Store metrics in InfluxDB | Connection details |
Utility Targets ​
| Target | Description | Configuration |
|---|---|---|
| Custom | Custom webhook integration | Custom endpoint |
| Delay | Add delays between targets | Duration |
Target Configuration ​
Command Line Mode ​
For simple single-target setups:
bash
# Slack
npx testbeats@latest publish --slack '<webhook-url>' --junit '<report-path>'
# Teams
npx testbeats@latest publish --teams '<webhook-url>' --junit '<report-path>'
# Google Chat
npx testbeats@latest publish --chat '<webhook-url>' --junit '<report-path>'
# GitHub
npx testbeats@latest publish --github '<github-token>' --github-repository '<owner/repo>' --github-pr-number '<pr-number>' --junit '<report-path>'Configuration Mode ​
For complex multi-target setups:
json
{
"targets": [
{
"name": "slack",
"condition": "fail",
"inputs": {
"url": "<webhook-url>",
"publish": "test-summary"
}
}
]
}Target Properties ​
Core Properties ​
| Property | Type | Description | Default |
|---|---|---|---|
name | string | Target type identifier | Required |
condition | string | When to execute target | "result" |
inputs | object | Target-specific configuration | {} |
extensions | array | Enabled extensions | [] |
Common Input Properties ​
Most communication targets support these properties:
| Property | Type | Description | Default |
|---|---|---|---|
url | string | Webhook or endpoint URL | Required |
publish | string | Report type to publish | "test-summary" |
only_failures | boolean | Show only failed tests | false |
title | string | Custom report title | Auto-generated |
title_link | string | Clickable link on title | None |
title_suffix | string | Text appended to title | None |
max_suites | number | Maximum suites to show | 10 |
Report Types ​
test-summary ​
Complete test results with suite breakdown and metrics.
test-summary-slim ​
Condensed results without suite details. Ideal for primary channels.
failure-details ​
Detailed information about failed tests including error messages.
Conditions ​
Control when targets execute based on test results:
| Condition | Description |
|---|---|
"passOrFail" | Always execute (default) |
"pass" | Execute only when all tests pass |
"fail" | Execute only when tests fail |
Multiple Targets Example ​
json
{
"targets": [
{
"name": "slack",
"condition": "fail",
"inputs": {
"url": "<dev-channel-webhook>",
"publish": "failure-details"
}
},
{
"name": "teams",
"condition": "passOrFail",
"inputs": {
"url": "<stakeholder-channel-webhook>",
"publish": "test-summary-slim"
}
},
{
"name": "influx",
"inputs": {
"url": "http://localhost:8086",
"db": "PerfTestResults"
}
}
]
}Next Steps ​
- Configure specific targets: Slack, Teams, Chat
- Enable extensions for enhanced reporting
- Set up conditions for smart targeting
