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

@outliant/generator-automation-tests

v0.2.0

Published

A Yeoman generator for quickly scaffolding automation test projects. Supports Playwright and Selenium + Cucumber, with opinionated templates, configuration, and setup out-of-the-box.

Readme

📦 generator-automation-tests

A Yeoman generator for quickly scaffolding automation test projects. Supports Playwright and Selenium + Cucumber, with opinionated templates, configuration, and setup out-of-the-box.

🚀 Features

📂 Generates a structured automation test project

⚙️ Subgenerators for Playwright or Selenium + Cucumber

📝 Predefined templates for tests, configs, and workflows

📦 Auto-install of dependencies (npm / yarn)

🛠️ Easy to extend with additional subgenerators

📥 Installation

Install Yeoman globally if you don’t have it

npm install -g yo

Install Generator globally if you don’t have it

npm install -g @outliant/generator-automation-tests

Run Generator

yo @outliant/automation-tests

Follow the installation steps and start coding

🔧 Usage

Run the main generator:

yo automation-tests

You’ll be prompted to select a tool (e.g., Playwright or Selenium + Cucumber). The generator will then scaffold the project accordingly and optionally install dependencies.

🧩 Subgenerators

You can also call subgenerators directly:

Generate a Playwright project

yo automation-tests:playwright

Generate a Selenium + Cucumber project

yo automation-tests:selenium-cucumber

🗂️ Project Structure

Example after generation:

my-automation-project/
├── features/ Gherkin tests
├── step-definitions/ # Step definitions (Cucumber or Playwright)
├── pages/ # Page Object Model files
├── fixtures/ # Playwright fixtures
├── playwright.config.ts # Playwright config (if selected)
├── browserstack.yml # BrowserStack config
├── package.json
├── tsconfig.json
└── ...

🛠️ Development

If you want to modify or extend the generator:

Link your local changes

npm link

Run the generator in a test folder

mkdir test-project && cd test-project yo automation-tests

Debugging

Enable Yeoman debug logs:

DEBUG=yeoman:\* yo automation-tests

📜 Scripts

npm run lint # Run ESLint
npm test # Run tests

➕ Addons

After choosing the main tool for your project, you can select a series of addons to be added to your project, this addons are encapsulated features that can help your project grow in scope for automation tests

This Node.js project audits website URLs using Google PageSpeed Insights API and Lighthouse CLI, logs the results (Performance, Accessibility, Best Practices, SEO), stores them in Google Sheets and Google Drive, and sends a formatted Slack notification upon completion.

🚀 Features

Input

  • Accepts input via CSV file with a list of URLs
  • Supports multiple environments: SIT, UAT, PROD
  • Supports locale-based configuration: US, INTL

Lighthouse Audit

Devices

  • Desktop
  • Mobile

Captured Metrics

  • Performance
    • Captured using PageSpeed API and CLI Lighthouse Audit
    • Automation runs 5 times for consistency and picks the higher score
  • Accessibility
    • Captured using CLI Lighthouse Audit
  • Best Practices
    • Captured using CLI Lighthouse Audit
  • SEO
    • Captured using CLI Lighthouse Audit

Lighthouse Report

Reporting

  • Automatically creates Google Spreadsheet template (formatting, tabs, headers, etc.)
  • Uploads Lighthouse results to Google Spreadsheet after successful audit
  • Automatically generates JSON file and uploads to Google Drive

Notifications

  • Sends Slack message alerts with mentions and links

🗂️ Project Structure

LIGHTHOUSE-AUTOMATION/
│
├── utils/helpers/               # Utility scripts for Google Sheets and Drive operations
│   ├── create-spreadsheet.ts    # Script to create a new Google Spreadsheet
│   ├── drive.ts                 # Handles Google Drive folder operations
│   ├── service-account.json     # Google service account credentials
│   └── sheet.ts                 # Functions for reading/writing data to Google Sheets
│
├── links/                       # CSV files containing URLs to audit for each environment
│   ├── prod-links.csv           # Production environment URLs
│
├── results/                     # Stores generated Lighthouse report files
│   └── (generated report files will go here)
│
├── lighthouse/                # Main automation scripts
│   ├── google-spreadsheets.ts   # Script to push/pull data from Google Sheets
│   ├── lighthouse.ts            # Runs Lighthouse audits (desktop/mobile)
│   └── slack.ts                 # Sends Slack notifications with results
│
├── config/                    # Configuration file for environments, locales, and spreadsheet IDs
│   ├── lighthouse-config.ts

🧩 Setup

  1. Install dependencies:
npm install
  1. Set up your config.js:
module.exports = {
  project_name: "Sample Project", // Update this based on the project you are executing
  prod_spreadsheetId: "", // Will be automatically generated
  sit_spreadsheetId: "", // Will be automatically generated
  uat_spreadsheetId: "", // Will be automatically generated
  google_drive_folderId: "", // Will be automatically generated
  apiKey: "AIzaSyCyzH3l6l41F8wTafrFhQJjRdkmvsvSHD0", // Keep unchanged
  slackWebhookUrl: "", // Add your valid Slack webhook URL here (Optional)
  slackEnabled: true, // Enable Slack notifications (true or false)
};
  1. Set up your service account:
serviceAccountConfig: ServiceAccountConfig = {
  type: "service_account",
  project_id: process.env.PROJECT_LIGHTHOUSE_ID || "",
  private_key_id: process.env.PRIVATE_LIGHTHOUSE_KEY_ID || "",
  private_key: process.env.PRIVATE_LIGHTHOUSE_KEY || "",
  client_email: process.env.PRIVATE_LIGHTHOUSE_CLIENT_EMAIL || "",
  client_id: process.env.PRIVATE_LIGHTHOUSE_CLIENT_ID || "",
  auth_uri: process.env.PRIVATE_LIGHTHOUSE_AUTH_URI || "",
  token_uri: process.env.PRIVATE_LIGHTHOUSE_TOKEN_URI || "",
  auth_provider_x509_cert_url:
    process.env.PRIVATE_LIGHTHOUSE_AUTH_PROVIDER_CERT_URL || "",
  client_x509_cert_url: process.env.PRIVATE_LIGHTHOUSE_CLIENT_CERT_URL || "",
  universe_domain: process.env.PRIVATE_LIGHTHOUSE_UNIVERSE_DOMAIN || "",
};
  1. Prepare your input CSVs under /links/: Each line should follow the format:
Page Name,https://example.com/page-url

🧪 Run Script

npm run lighthouse:<env>

Examples:

npm run lighthouse:sit
npm run lighthouse:uat
npm run lighthouse:prod

✅ Output

  • Google Sheet updated under respective tabs:

    • Desktop - Performance
    • Mobile - Performance
    • Desktop - Accessibility
    • Mobile - Accessibility
    • Desktop - Best Practices
    • Mobile - Best Practices
    • Desktop - SEO
    • Mobile - SEO
  • Slack message format:

:bar_chart: Lighthouse Updates:
Environment: PROD
Viewport: Desktop and Mobile
Date and Time: 07/16/2025 / 7:01 PM
Lighthouse Report: [Google Sheet Link](https://docs.google.com/spreadsheets/d/...)
File Resources: [Google Drive File Link](https://drive.google.com/drive/folders/...)
cc: @mentions

🔗 Getting a Slack Webhook URL

Follow these steps to generate a slackWebhookUrl for sending automation notifications:

1. Create a Slack App

  1. Go to Slack API: Your Apps.
  2. Click Create New App.
  3. Choose From scratch and give your app a name (e.g., Lighthouse Automation Notifier).
  4. Select the workspace where you want to send messages.

2. Enable Incoming Webhooks

  1. Inside your newly created app, navigate to Features > Incoming Webhooks.
  2. Toggle Activate Incoming Webhooks to On.

3. Create a Webhook

  1. Scroll down and click Add New Webhook to Workspace.
  2. Select the channel where you want automation messages to be sent (e.g., #automation-reports).
  3. Click Allow.
  4. Copy the generated Webhook URL — it will look like this:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX---


4. Configure Your Project

  • Open your project’s configuration file (config.js).
  • Add your copied Webhook URL:
slackWebhookUrl="https://hooks.slack.com/services/xxx/yyy/zzz"

📌 Notes

  • Performance scores may vary depending on your network connectivity and device performance.
    For consistent results, ensure you have a stable internet connection and sufficient system resources when running the audits.

🤝 Contributing

Fork the repo

Create a feature branch (git checkout -b feature/my-feature)

Commit changes (git commit -m 'feat: add selenium subgenerator')

Push to branch (git push origin feature/my-feature)

Open a Pull Request 🎉