Skip to content

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 ​

TargetDescriptionConfiguration
SlackSend results to Slack channelsWebhook URL
TeamsSend results to Microsoft TeamsWebhook URL
ChatSend results to Google ChatWebhook URL

Data Platforms ​

TargetDescriptionConfiguration
InfluxDBStore metrics in InfluxDBConnection details

Utility Targets ​

TargetDescriptionConfiguration
CustomCustom webhook integrationCustom endpoint
DelayAdd delays between targetsDuration

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>'

Configuration Mode ​

For complex multi-target setups:

json
{
  "targets": [
    {
      "name": "slack",
      "condition": "fail",
      "inputs": {
        "url": "<webhook-url>",
        "publish": "test-summary"
      },
      "extensions": ["mentions", "hyperlinks"]
    }
  ]
}

Target Properties ​

Core Properties ​

PropertyTypeDescriptionDefault
namestringTarget type identifierRequired
conditionstringWhen to execute target"result"
inputsobjectTarget-specific configuration{}
extensionsarrayEnabled extensions[]

Common Input Properties ​

Most communication targets support these properties:

PropertyTypeDescriptionDefault
urlstringWebhook or endpoint URLRequired
publishstringReport type to publish"test-summary"
only_failuresbooleanShow only failed testsfalse
titlestringCustom report titleAuto-generated
title_linkstringClickable link on titleNone
title_suffixstringText appended to titleNone
max_suitesnumberMaximum suites to show10

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:

ConditionDescription
"result"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": "result",
      "inputs": {
        "url": "<stakeholder-channel-webhook>",
        "publish": "test-summary-slim"
      }
    },
    {
      "name": "influx",
      "inputs": {
        "server": "http://localhost:8086",
        "database": "testbeats"
      }
    }
  ]
}

Next Steps ​

Released under the MIT License.