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 🙏

© 2026 – Pkg Stats / Ryan Hefner

k6-slack-ms-teams-reporter

v1.0.5

Published

A K6 test results reporter that sends HTML reports as attachments to Slack and Microsoft Teams

Readme

📖 k6-slack-ms-teams-reporter

npm version license npm downloads Build Status downloads all time

🚀 A lightweight reporting tool that sends K6 Load Test Reports to Slack & Microsoft Teams.


📌 Features

✔ Parses K6 JSON or HTML reports
✔ Extracts failure rate, iteration stats & threshold breaches
✔ Sends results directly to Slack or Teams
Customizable message format & colors
Works in CI/CD pipelines (GitHub Actions, GitLab CI, Jenkins, etc.)


📋 Prerequisites

Before using this package, ensure you have the following installed:

1️⃣ Node.js (>=18.x) - Download
2️⃣ NPM (Comes with Node.js)
3️⃣ K6 for load testing - Install K6
4️⃣ Slack & Teams Webhook URLs (Saved in .env)


📦 Installation

npm install --save-dev k6-slack-ms-teams-reporter

🔧 Configuration

1️⃣ Set Up Environment Variables

Create a .env file and add your Slack or Teams webhook URL:

SLACK_WEBHOOK_URL=https://hooks.slack.com/services/your-webhook-url
TEAMS_WEBHOOK_URL=https://outlook.office.com/webhook/your-webhook-url

📊 Generating Reports

To generate HTML and JSON reports, modify your K6 script:

import { htmlReport } from "https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js";

export function handleSummary(data) {
  return {
    "reports/k6TestReport.html": htmlReport(data),
    "reports/k6TestResults.json": JSON.stringify(data),
    stdout: textSummary(data, { indent: " ", enableColors: true }),
  };
}

This will create:
📜 HTML Report: reports/k6TestReport.html
📜 JSON Report: reports/k6TestResults.json


🚀 Sending Reports

1️⃣ CLI Usage

Send Report to Slack

npx k6-slack-ms-teams-reporter --target slack --report-name k6TestResults

Send Report to Microsoft Teams

npx k6-slack-ms-teams-reporter --target teams --report-name k6TestResults

🛠️ Custom Reporter Options

You can configure custom options via reportConfig.json:

Create a reportConfig.json file in your project:

{
  "target": "slack",
  "reportName": "k6TestResults",
  "verbose": true,
  "jsonReportPath": "artifacts/loadTestResults.json",
  "htmlReportUrl": "artifacts/loadTestReport.html",
  "ciPipelineUrl": "https://gitlab.com/myproject/-/jobs/"
}

Users can also create a reportConfig.js file like this:

export default {
  reporter: "k6-slack-ms-teams-reporter",
  target: "slack",
  reportName: "k6TestResults",
  verbose: false,
  jsonReportPath: "examples/reports/k6TestResults.json",
  htmlReportUrl: "http://127.0.0.1/examples/reports/k6TestResults.html",
  ciPipelineUrl: "https://gitlab.com/myproject/-/jobs/",
};

Then run the reporter:

npx k6-slack-ms-teams-reporter

The reporter will automatically pick up configurations from reportConfig.json or reportConfig.js.


📝 Example Slack & Teams Reports

📌 Slack Report

📌 Microsoft Teams Report

📌 CI/CD Integration

GitHub Actions

- name: Send K6 Report to Slack
  run: npx k6-slack-ms-teams-reporter
  env:
    SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

- name: Send K6 Report to Microsoft Teams
  run: npx k6-slack-ms-teams-reporter
  env:
    TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }}

GitLab CI

stages:
  - test
  - report

report:
  stage: report
  script:
    - npx k6-slack-ms-teams-reporter
  only:
    - main

🛠 Debugging & Troubleshooting

  • Run with verbose logs:
    node src/index.js --target slack --report-name k6TestResults --verbose
  • Check webhook URL is valid
  • Ensure reports/k6TestResults.json exists
  • Check network connectivity & API limits

📜 License

This project is MIT Licensed.

🚀 Developed by @paschal_cheps | Contributions Welcome! 💡