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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@automationyard/ai-playwright-reporter

v1.0.3

Published

A custom Playwright reporter that generates humorous test report summaries and sends them to Slack and Microsoft Teams using AI-powered message generation.

Downloads

13

Readme

AI Playwright Reporter

A custom Playwright reporter that generates humorous test report summaries and sends them to Slack and Microsoft Teams using AI-powered message generation.

Features

  • AI-Generated Summaries: Uses OpenAI or Anthropic's Claude to create engaging and humorous summaries of your Playwright test results.
  • Integrations: Sends report summaries directly to Slack and Microsoft Teams via webhooks.
  • Customizable: Choose between OpenAI and Claude models for message generation.
  • Easy Setup: Simple configuration to get started quickly with your Playwright projects.

Installation

Install the package via npm:

npm install @automationyard/ai-playwright-reporter

Example Outputs

Slack Example

Teams Example 1

Teams Example 2

Usage

  1. Configuration:

Add the reporter to your Playwright configuration file (e.g., playwright.config.ts):

import { SlackTeamsReporterOptions } from "./src/reporter";
import { defineConfig } from "@playwright/test";
export default defineConfig({
  testDir: "playwright-tests",
  reporter: [
    ["list"],
    [
      "@automationyard/ai-playwright-reporter",
      {
        type: "anthropic",
        model: "claude-3-5-sonnet-20240620",
        apiKey: "your-api-key-here",
        slackWebhookUrl: "your-slack-webhook-url-here",
        teamsWebhookUrl: "your-teams-webhook-url-here",
      } as SlackTeamsReporterOptions,
    ],
  ],
});
  1. Environment Variables:

Instead of hardcoding sensitive information, you can use environment variables:

  • OPENAI_API_KEY or ANTHROPIC_API_KEY: Your API key for the chosen AI service
  • SLACK_WEBHOOK_URL: Your Slack webhook URL
  • TEAMS_WEBHOOK_URL: Your Microsoft Teams webhook URL

Configuration Options

  • type: The type of AI model to use for message generation.
  • model: The model to use for message generation.
  • apiKey: Your API key for OpenAI or Anthropic.
  • slackWebhookUrl: The URL of your Slack webhook.
  • teamsWebhookUrl: The URL of your Microsoft Teams webhook.

Development

To contribute to this project:

  1. Clone the repository
  2. Install dependencies: npm install
  3. Run tests: npm test
  4. Build the package: npm run build

License

This project is licensed under the MIT License.