Skip to content

Extensions ​

Extensions enhances the capability to provide richer and more contextualized information into your targets.

slack-link

TIP

While using multiple targets, extensions can be applied globally or on a per-target basis.

Supports ​

Extension types.

âś… CI Info

âś… Hyperlinks

âś… Mentions

âś… Metadata

âś… ReportPortal Analysis

âś… ReportPortal History

âś… Test Summary

âś… Percy Analysis

âś… Custom

Portal and automation extensions ​

These extension name values are supported in JSON configuration. They are documented in detail in the guides (portal features, analysis, and integrations):

Syntax ​

Command Line Mode ​

  • --ci-info — enable the ci-info extension.
  • --chart-test-summary — enable the chart extension (config name quick-chart-test-summary).

Configuration Mode ​

json
{
  "name": "hyperlinks",
  "condition": "fail",
  "inputs": {
    "links": [
      {
        "text": "Build Logs",
        "url": "<build-logs-url>"
      }
    ]
  }
}
  • name (string) - name of the extension.

    Core: ci-info, hyperlinks, mentions, metadata, report-portal-analysis, report-portal-history, quick-chart-test-summary, percy-analysis, custom
    Portal / automation: ai-failure-summary, failure-analysis, smart-analysis, error-clusters, failure-signatures, browserstack

  • condition? (condition) - condition of execute the extension.
  • hook? (string) - workflow hook to run.

    start, after-summary, end

  • inputs? (object) - custom inputs to run the extension.
    • title? (string) - title of the extension to be displayed. (applicable for most extensions)
    • title_link? (string) - attaches a clickable link to the title. (applicable for most extensions)

Examples (Command Line Mode) ​

sh
npx testbeats@latest publish --ci-info --chart-test-summary --slack '<incoming-webhook-url>' --junit '<path-to-junit-report>'

Examples (Configuration Mode) ​

Global Extensions ​

Extensions will be applied for both slack and teams targets.

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

Per Target Extensions ​

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

Released under the MIT License.