Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.
/ k6-openfga-test Public archive

An OpenFGA test project which uses K6 for benchmark and load testing.

Notifications You must be signed in to change notification settings

jon-whit/k6-openfga-test

Repository files navigation

k6-openfga-test

An OpenFGA test project which uses k6 for benchmark and load testing purposes.

Usage

This project uses webpack, babel and corejs to bundle the test artifacts into a single test script which can be run by k6.

npm install .
npm run-script webpack

# local execution (all scenarios)
k6 run build/app.bundle.js

# docker execution (all scenarios)
docker run -v $(pwd)/build:/build loadimpact/k6 run /build/app.bundle.js 

# local execution (specific scenario)
k6 run --env scenario=<scenario> build/app.bundle.js

For example, to run the constant_rps scenario (which generates constant load at the specified request rate) you would run

k6 run --env scenario=constant_rpc build/app.bundle.js

Scenarios

Scenarios configure how virtual users and test iterations are scheduled. k6 scenarios allow us to model diverse workloads, or traffic patterns for various test cases. For more information on scenarios take a look at the official k6 scenarios documentation.

Scenario Name Settings Description
constant_rps executor: 'constant-arrival-rate'
rate: 1500
timeUnit: '1s'
duration: '1m'
preAllocatedVUs: 20
maxVUs: 40
Runs the test target at 1500 rps for 1m in duration.

About

An OpenFGA test project which uses K6 for benchmark and load testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published