npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

broadcast-test-results

v0.0.52

Published

Publish test results to Microsoft Teams and Slack

Readme

broadcast-test-results

Publish test results to Microsoft Teams and Slack

Getting Started

npx broadcast-test-results publish -c path/to/config.json

Config

Configuration file holds the different configurations files for our reporting needs. We can specify the type of test results to be consumed and type of reports to be published.

Sample Config File

{
  "reports": [
    {
      "targets": [
        {
          "name": "teams",
          "url": "<teams-incoming-webhook-url>",
          "publish": "test-summary",
          "links": [{ "text": "Build Logs", "url": "<url>" }]
        }
      ],
      "results": [
        {
          "type": "testng",
          "files": ["path/to/testng-results.xml"]
        }
      ]
    }
  ]
}

Environment Variables

To use environment variables in the config file, wrap the environment variable name inside {}.

Example

{
  "links": [{ "text": "Build Logs", "url": "{BUILD_URL}" }]
}

Config File Properties

reports

| Property | Description | Attribute | |----------|------------------------------------|-----------| | targets | list of targets to publish reports | Required | | results | list of results to parse | Required | | options | common options for all targets | Optional |

Supports

Results

| Result Type | Support | |-------------|---------| | TestNG | ✅ | | JUnit | ✅ | | xUnit | ✅ |

Targets

| Targets | Support | |-----------------|---------| | Microsoft Teams | ✅ | | Slack | ✅ | | Custom | ✅ |

Teams

| Property | Description | Attribute | |------------------------|--------------------------------|-----------| | name | name of the target | Optional | | url | url of the target | Required | | publish | type of report to publish | Optional | | links | links to be part of the report | Optional | | title | title of the report | Optional | | title_suffix | suffix to add to title | Optional | | report_portal_analysis | report portal analysis options | Optional |

Supported Report Types to Publish
  • test-summary
  • failure-summary
  • test-summary-slim
  • failure-summary-slim
  • failure-details
  • failure-details-slim
Report Portal Analysis Options
{
  "url": "<report-portal-base-url>",
  "api_key": "<api-key>",
  "project": "<project-id>",
  "launch_id": "<launch-id>"
}

Slack

| Property | Description | Attribute | |------------------------|--------------------------------|-----------| | name | name of the target | Optional | | url | url of the target | Required | | publish | type of report to publish | Optional | | links | links to be part of the report | Optional | | title | title of the report | Optional | | title_suffix | suffix to add to title | Optional |

Supported Report Types to Publish
  • test-summary
  • failure-summary
  • test-summary-slim
  • failure-summary-slim
  • failure-details
  • failure-details-slim

Custom

| Property | Description | Attribute | |----------|------------------------|-----------| | name | name of the target | Required | | path | path to custom js file | Required |

Under Active Development

Examples

Defaults

  1. Identifies the target (slack or teams) based on the url.
  2. Defaults publish to test-summary report.
{
  "reports": [
    {
      "targets": [
        {
          "url": "<slack-incoming-webhook-url>"
        }
      ],
      "results": [
        {
          "type": "testng",
          "files": ["path/to/testng-results.xml"]
        }
      ]
    }
  ]
}

Custom

{
  "reports": [
    {
      "targets": [
        {
          "name": "custom",
          "path": "/relative/path/to/custom.js"
        }
      ],
      "results": [
        {
          "type": "junit",
          "files": ["path/to/junit-results.xml"]
        }
      ]
    }
  ]
}