Skip to content

Targets ​

Target represents a specific platform where you want to share your test results, such as Slack or Microsoft Teams.

slack-link

Supports ​

Target types.

✅ Slack

✅ Teams (Microsoft Teams)

✅ Chat (Google Chat)

✅ InfluxDB

✅ Custom

Syntax ​

Command Line Mode ​

  • --slack (string) - slack incoming webhook url.
  • --teams (string) - ms teams incoming webhook url.
  • --chat (string) - google chat incoming webhook url.

Configuration Mode ​

json
{
  "name": "slack",
  "inputs": {
    "url": "<incoming-webhook-url>",
  }
}
  • name (string) - name of the target.

    slack, teams, chat, custom, delay

  • condition? (condition) - condition of execute the target.
  • inputs? (object) - custom inputs to run the target.
  • extensions? (extensions[]) - list of extensions to be enabled.

Examples (Command Line Mode) ​

Single Target ​

Sample command line arguments.

bash
npx testbeats@latest publish --slack '<incoming-webhook-url>' -junit '<path-to-junit-report>'

Examples (Configuration Mode) ​

Single Target ​

Sample config file.

json
{
  "targets": [
    {
      "name": "slack",
      "inputs": {
        "url": "<incoming-webhook-url>"
      }
    }
  ],
  "results": [
    {
      "type": "testng",
      "files": [
        "path/to/testng-results.xml"
      ]
    }
  ]
}

Multiple Targets ​

Sample config file.

json
{
  "targets": [
    {
      "name": "slack",
      "inputs": {
        "url": "<incoming-webhook-url>"
      }
    },
    {
      "name": "teams",
      "inputs": {
        "url": "<incoming-webhook-url>"
      }
    }
  ],
  "results": [
    {
      "type": "testng",
      "files": [
        "path/to/testng-results.xml"
      ]
    }
  ]
}

Released under the MIT License.