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-test-framework

v1.0.0

Published

Enterprise-grade load testing solution with k6

Readme

Load Testing Framework with k6

Installation (Ubuntu/Linux)

  1. Node.js & npm:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
  1. k6:
sudo gpg -k
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/k6-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C5AD17C747E3415A3642D57D77C6C491D6AC1D69
echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list
sudo apt-get update
sudo apt-get install k6
  1. Project Dependencies:
npm install

Running Tests

# Example smoke test
BASE_URL=https://api.yoursite.com npm run test:smoke

# Full test suite
npm run test:smoke && npm run test:stress && npm run test:soak

Reports

HTML reports auto-generate in reports/ directory after each test run.

Running Tests from Dockerfile

    1. Build Docker Image
      docker build -t k6-reqres .
    1. Run Tests Inside Docker:
      sudo docker run -it --rm -v $(pwd)/reports:/app/reports -e BASE_URL=https://reqres.in/api -e TEST_TYPE=smoke k6-reqres run tests/smoke.test.js

Running Tests from Docker Compose

  • Specify the test name in the terminal while running tests.
      ./run-test.sh smoke  # For Smoke test
      ./run-test.sh stress # For Stress test
      ./run-test.sh soak   # For Soak test

Adapting to Other Websites

To use this framework with different systems, modify:

  1. API Endpoints:

    • Update endpoints in api/*.js files
    • Modify request payloads in test files
  2. Environment Config:

    • Update config/global.js with new base URLs
    • Adjust thresholds in config/thresholds.js
  3. Test Parameters:

    • Modify virtual users and duration in test files' options
    • Update workflow stages in config/workflowOptions.js
  4. Data Generation:

    • Customize mock data templates in utils/dataGeneration.js
  5. Assertions:

    • Update response validation checks in test files
    • Modify schema validations in config/constants.js

Maintenance

  • Review reports in reports/ directory
  • Monitor test thresholds in config/thresholds.js
  • Update rate limiting rules in api/rateLimiter.js