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

@testsmith/perfornium

v0.6.6

Published

Flexible performance testing framework for REST, SOAP, and web applications

Readme

Perfornium

A powerful, flexible, and easy-to-use performance testing framework for REST APIs, SOAP services, and web applications.

npm version License: MIT Node Version CI

✨ Features

  • 🚀 Easy to Use - Simple YAML syntax or powerful TypeScript DSL
  • 🔧 Highly Extensible - Plugin architecture for protocols and outputs
  • 🌐 Multi-Protocol - REST, SOAP, and Web (Playwright) support
  • 📊 Rich Reporting - JSON, CSV, InfluxDB, Graphite, HTML reports
  • High Performance - Efficient load generation with virtual users
  • 🎯 Flexible Load Patterns - Basic, stepping, arrivals, and custom patterns
  • 📈 Real-time Metrics - Monitor performance as tests run
  • 🔄 Data-Driven - CSV data support for realistic test scenarios

🚀 Quick Start

Installation

# Global installation
npm install -g @testsmith/perfornium

# Or as a project dependency
npm install --save-dev @testsmith/perfornium

Your First Test (YAML)

Create a file my-test.yml:

name: "Simple API Test"
global:
  base_url: "https://jsonplaceholder.typicode.com"

load:
  pattern: "basic"
  virtual_users: 10
  duration: "1m"

scenarios:
  - name: "get_posts"
    steps:
      - method: "GET"
        path: "/posts"
        checks:
          - type: "status"
            value: 200

outputs:
  - type: "json"
    file: "results.json"

report:
  generate: true
  output: "report.html"

Run it:

perfornium run my-test.yml

Your First Test (TypeScript)

import { test } from '@testsmith/perfornium/dsl';

test('API Test')
  .baseUrl('https://jsonplaceholder.typicode.com')
  .scenario('Get Posts', 100)
    .get('/posts')
      .check('status', 200)
      .done()
  .withLoad({ pattern: 'basic', virtual_users: 10, duration: '1m' })
  .run();

📖 Documentation

Full documentation is available at https://testsmith-io.github.io/perfornium

🎯 Use Cases

REST API Testing

Test any REST API with support for:

  • All HTTP methods (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS)
  • Authentication (Basic, Bearer, OAuth, Digest)
  • All payload types (JSON, XML, Form, Multipart)
  • Query parameters and custom headers
  • Response validation and data extraction
steps:
  - method: "POST"
    path: "/api/users"
    auth:
      type: "bearer"
      token: "your-token"
    json:
      name: "John Doe"
      email: "[email protected]"
    checks:
      - type: "status"
        value: 201
    extract:
      - name: "user_id"
        type: "json_path"
        expression: "$.id"

Web Application Testing

Test web applications with Playwright:

global:
  web:
    type: "chromium"
    headless: true
    base_url: "https://example.com"

scenarios:
  - name: "user_journey"
    steps:
      - type: "web"
        action:
          command: "goto"
          url: "/"
      - type: "web"
        action:
          command: "fill"
          selector: "#email"
          value: "[email protected]"
      - type: "web"
        action:
          command: "click"
          selector: "#submit"

SOAP Service Testing

global:
  wsdl_url: "http://example.com/service?WSDL"

scenarios:
  - name: "soap_test"
    steps:
      - type: "soap"
        operation: "GetUser"
        args:
          userId: 123

🎨 Load Patterns

Basic Pattern

Fixed number of virtual users for a duration:

load:
  pattern: "basic"
  virtual_users: 50
  ramp_up: "30s"
  duration: "5m"

Stepping Pattern

Gradually increase load:

load:
  pattern: "stepping"
  steps:
    - users: 10
      duration: "2m"
    - users: 25
      duration: "3m"
    - users: 50
      duration: "5m"

Arrivals Pattern

Constant arrival rate:

load:
  pattern: "arrivals"
  rate: 10  # users per second
  duration: "5m"

Multiple Profiles

Run different patterns concurrently:

load:
  pattern: "mixed"
  profiles:
    - name: "readers"
      pattern: "basic"
      virtual_users: 100
      scenarios: ["read_data"]
    - name: "writers"
      pattern: "stepping"
      scenarios: ["write_data"]

📊 Outputs and Reporting

Perfornium supports multiple output formats:

outputs:
  # Raw metrics
  - type: "csv"
    file: "results/metrics.csv"

  # Structured results
  - type: "json"
    file: "results/results.json"

  # Time-series databases
  - type: "influxdb"
    url: "http://localhost:8086"
    database: "perfornium"

  # Metrics backends
  - type: "graphite"
    url: "localhost:2003"

  # Webhooks
  - type: "webhook"
    url: "https://example.com/webhook"

# Beautiful HTML reports
report:
  generate: true
  output: "results/report.html"

💡 TypeScript DSL

For complex tests, use the TypeScript DSL:

import { test, load, testData } from '@testsmith/perfornium/dsl';

const config = test('E-Commerce Test')
  .description('User shopping journey')
  .baseUrl('https://api.shop.com')
  .variables({ environment: 'staging' })

  .withLoad({
    pattern: 'stepping',
    duration: '10m',
    steps: [
      { users: 10, duration: '3m' },
      { users: 25, duration: '4m' },
      { users: 50, duration: '3m' }
    ]
  })

  .scenario('Shopping Flow', 100)
    .beforeScenario(async (context) => {
      context.variables.userId = testData.uuid();
    })

    .get('/products')
      .check('status', 200)
      .extract('product_id', '$.products[0].id')

    .post('/cart', {
      product_id: '{{product_id}}',
      quantity: 1
    })
      .withBearerToken('{{auth_token}}')
      .check('status', 201)

    .done()

  .withJSONOutput('results/shopping.json')
  .withReport('results/shopping-report.html')

  .build();

// Run it
import { TestRunner } from '@testsmith/perfornium';
await new TestRunner(config).run();

🛠️ CLI Commands

# Run a test
perfornium run test.yml

# Validate configuration
perfornium validate test.yml

# Run distributed test
perfornium distributed --config test.yml --workers 4

# Generate report from results
perfornium report --results results.json --output report.html

🏗️ Architecture

perfornium/
├── src/
│   ├── protocols/      # Protocol handlers (REST, SOAP, Web)
│   ├── load-patterns/  # Load generation patterns
│   ├── core/           # Test runner and execution engine
│   ├── outputs/        # Output handlers
│   ├── reporting/      # HTML report generation
│   ├── dsl/            # TypeScript DSL
│   └── config/         # Configuration types
│
├── examples/           # Example configurations
├── tmp/test-project/   # Sample test project
└── docs/              # Documentation

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📝 License

MIT

🙏 Acknowledgments

Built with:


Happy Load Testing! 🚀

For more information, see the documentation.