Skip to content
| Marketplace
Sign in
Visual Studio Code>Testing>REST Api Stress TesterNew to Visual Studio Code? Get it now.
REST Api Stress Tester

REST Api Stress Tester

M Irfan Gorsi

|
1 install
| (0) | Free
Lightweight local REST API's stress/load testing tool inside VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

API Stress Tester

A lightweight Visual Studio Code extension for local API load/Stress testing and live performance analysis.

Overview

Api Stress Tester provides a fast, developer-friendly way to run stress tests against any HTTP endpoint directly inside VS Code. It combines:

  • an integrated webview panel,
  • live success/failure metrics,
  • latency and request-per-second charts,
  • last-response inspection,
  • JSON request schema generation,
  • validation for headers and body payloads.

This extension is designed for developers who want instant performance feedback without leaving the editor.

Why use this extension?

  • Because it keeps you inside VS Code. You don’t need a separate load-testing tool or another browser tab.
  • Because it is fast and local. It runs stress traffic from your machine, letting you quickly evaluate endpoints.
  • Because it makes request payloads easy. The built-in schema engine auto-generates realistic JSON from a simple schema.
  • Because it shows live metrics. Success rate, latency percentiles, and RPS update in real time.

Features

  • Run API stress tests directly in VS Code using the Open API Stress Tester command.
  • Configure endpoint, HTTP method, headers, concurrency, and total requests.
  • Validate JSON headers and request body before starting a test.
  • Generate dynamic request bodies from a JSON schema using real-looking values.
  • Live dashboard with detailed metrics:
    • Success / failure counts
    • Average, min, and max latency
    • P50, P95, and P99 latency
    • Requests per second (RPS)
  • Real-time charts for latency and throughput.
  • Inspect the last response with tabs for response body, headers, and error output.
  • Stop a running test early at any time.
  • Built-in payload guide to help craft schema-driven request bodies.

What this extension supports

Request configuration

  • Endpoint URL
  • HTTP method: GET, POST, PUT, or DELETE
  • Concurrency (parallel worker count)
  • Total number of requests
  • Request headers (JSON)
  • Request body schema (JSON) for non-GET/DELETE requests

Request body generation

The extension can automatically generate payload values from a schema. Supported schema patterns include:

  • Primitive fields: String, Number, Boolean, Date, Email, Name
  • Arrays: "tags": ["String"]
  • Nested objects
  • Arrays of objects
  • Custom values that are preserved unchanged
  • Smart field detection using key names such as email, password, phone, avatar, url, country, city, and more
  • Enums via { "enum": ["a","b"] }

Live metrics and visualization

During a test, the extension shows:

  • request success and failure counts
  • average, minimum, and maximum latency
  • p50, p95, and p99 latency
  • live requests per second
  • rolling charts for latency and throughput

Getting started

  1. Open this folder in Visual Studio Code.
  2. Install dependencies:
npm install
  1. Build the extension:
npm run compile
  1. Then open the webview-ui folder.
  2. Install dependencies:
npm run build
npm run dev/start
  1. Start the extension host for debugging:
  • Press F5, or
  • Run the Launch Extension configuration in VS Code.
  1. Open the stress tester panel:
  • Run the command palette (Ctrl+Shift+P)
  • Execute Open API Stress Tester

How to use it

  1. Enter a valid API endpoint URL.
  2. Choose GET, POST, PUT, or DELETE.
  3. Set concurrency and total requests.
  4. Add JSON headers if needed.
  5. For non-GET/DELETE methods, provide a JSON schema payload or use the payload guide.
  6. Click Run Test.
  7. Watch live metrics, charts, and the last response.
  8. Click Stop any time to cancel the test.

Request body guide

The built-in payload guide explains how to define schema input for generated bodies, including:

  • supported primitive types
  • arrays and nested objects
  • smart fields for email, phone, address, username, URL, etc.
  • examples of recommended schema patterns

Example payload schema

{
  "name": "Name",
  "email": "Email",
  "age": "Number",
  "isActive": "Boolean",
  "tags": ["String"],
  "address": {
    "city": "City",
    "zipCode": "Number"
  }
}

This will generate realistic JSON for every request instead of sending a static template.

Architecture overview

Extension backend

  • src/extension.ts creates a VS Code webview panel and handles messages from the UI.
  • It orchestrates test start/stop events and forwards live updates back to the webview.

Stress engine

  • src/stressEngine.ts runs concurrent fetch requests.
  • It limits concurrency to 200 and total requests to 10000.
  • It normalizes request headers and tracks success/failure and timing.

Schema engine

  • src/schemaEngine.ts generates request bodies from schema definitions.
  • It supports nested objects, arrays, enums, smart field inference, and custom values.

Webview UI

  • webview-ui/src/App.tsx provides the interactive dashboard.
  • ConfigCard handles request configuration and validation.
  • StatsCard displays live performance metrics.
  • ChartCard renders latency and throughput charts.
  • ResponseCard shows the last API response.

Limits and safeguards

The extension enforces these hard limits to avoid runaway tests:

  • Maximum concurrency: 200
  • Maximum total requests: 10000

It also validates JSON input for headers and request bodies, and it prevents test runs without a valid URL.

Development

Available scripts

  • npm run compile — build the extension using esbuild
  • npm run watch — build the extension in watch mode
  • npm run package — package the extension for publishing
  • npm run check-types — run TypeScript type checks
  • npm run lint — run ESLint on src
  • npm run test — execute extension tests via vscode-test

Recommended workflow

  1. Edit source code in src/ or webview-ui/src/
  2. Rebuild with npm run compile
  3. Launch the extension host from VS Code
  4. Verify the webview and stress test behavior

Troubleshooting

  • If the panel stays blank, ensure npm run compile generated webview-ui/dist/index.html.
  • If JSON validation fails, correct invalid JSON in the Headers or Body editor.
  • If requests fail, verify the endpoint URL, network access, and API method.

Known limitations

  • Supported methods are GET, POST, PUT, and DELETE.
  • Request body generation only applies to non-GET/DELETE requests.
  • The extension uses the browser fetch API from the webview host, so environment-level network restrictions may apply.

Contributing

Contributions are welcome. If you want to improve the extension:

  • enhance the charting experience,
  • add more request statistics,
  • improve error messaging.

Please open issues or pull requests with clear reproduction steps.

License

This project is currently licensed under ISC.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft