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

agoda-test-metrics

v0.0.22

Published

Library to collect test metrics

Downloads

11

Readme

Test Results Collector

What is it?

An npm package that publishes test results object from testResultsProcessor(eg. jest) to an HTTP endpoint

Objective

  • We want to collect test run data from local machines (Laptops) to analyze and help improve the developer experience. We should be able to correlate this with data from CI to look for common behavior that indicates poor local experience.
  • For example:
    • People not running test on their local, pushing to CI for testing
    • Specific test suites that only run on CI that people never run locally
    • Test that take a long time to run locally when compare to CI, or both CI and local are long
    • Tests that are repeatedly run on without code change to succeed, indicating flakiness (might be tricky)

How does it work?

alt text

Getting Started

Usage

Firstly, client will need to install Test Results Collector package

npm install --save-dev agoda-test-metrics

Next, user will require to add testResultsProcessor key to jest config

testResultsProcessor: 'agoda-test-metrics'

Note: Jest config could be in either package.json OR standalone file (jest.config.js).

For example,

If there is jest section in package.json, simply add:

  "name": "my-project",
  "jest": {
    "testResultsProcessor": "agoda-test-metrics",
  }
}

or if there is jest.config.js, simply add:

"testResultsProcessor": "agoda-test-metrics"

API

After include the package in your project, everytime when you run the test in local, the plugin will collect required data

  1. User's metadata

| Metadata | Data Type | |-------------------|---------| |branch| STRING | |projectName| STRING | |repository| STRING | |repositoryName| STRING | |hostname| STRING | |username| STRING | |os| STRING | |osVersion| STRING | |gitCommitDate| STRING | |gitHeadCommit| STRING | |testRunner| STRING | |testRunnerVersion| STRING | |cpuCount| NUMBER |

  1. Test Results (See Test Results Schema)

Then, it will post to [API]

Configuration

You can define an endpoint in the environment variable and the stats data will be sent there via HTTP POST Request

| Environment Variable | Default Value | |----------|---------------| |JEST_TESTDATA_API_URL|http://your_api_domain/jest|

Test Data Schema

After that, the data will be processed on API (and then this can be able to inject to Hadoop if you want to analyze later)

Development

For testing, the idea is you can publish the beta version in the release-beta job on CI, and install the desired version to your repository using following command

npm install agoda-test-metrics@<<beta version>> --force

if the version is not updated, delete node_modules folder and reinstall

Publish

The idea is you can publish the new version using release job on CI.

for playwright

please read doc/PLAYWRIGHT.md

for vitest

please read doc/VITEST.md