Skip to content

Repository files navigation

Load Generation for Openbeta API

This repository contains load generation scripts using k6 to test the performance of the Openbeta API (v1 endpoints).

Prerequisites

  • Bun (The fast all-in-one JavaScript runtime)
  • k6 (The load testing tool)

Setup

  1. Install dependencies:
    bun install

Usage

The load tests are categorized by query complexity and are located in the v1/ directory.

ScriptDescription
v1/public-light-queries.tsTests basic, quick-to-resolve GraphQL queries.
v1/public-merged-queries.tsTests merged queries (multiple simple fields requested).
v1/public-heavy-queries.tsTests complex or data-intensive GraphQL queries.

Running a test

To run a test, use the k6 run command:

k6 run v1/public-light-queries.ts

Configuration

Test options such as Virtual Users (vus), Duration (duration), and the target API endpoint (url) are configured directly within each script's options export.

Example from a script:

exportconstoptions={vus: 100,duration: '60s',url: 'http://localhost:4000',// ... other options};

About

generation framework using k6 (quite malnourished atm)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages