From 57f73f353ff0ecbb5048c702d64887df71cb1e47 Mon Sep 17 00:00:00 2001 From: Tero Virtanen <105207219+terovirtanen@users.noreply.github.com> Date: Tue, 16 Jan 2024 09:44:30 +0200 Subject: [PATCH] build: k6 load test OH-42 (#199) --- load-tests/README.md | 29 ++++++++ load-tests/hauki-scenarios.js | 128 +++++++++++++++++++++++++++++++++ load-tests/helpers/commands.js | 69 ++++++++++++++++++ load-tests/helpers/mocks.js | 33 +++++++++ load-tests/helpers/utils.js | 6 ++ load-tests/run.sh | 9 +++ 6 files changed, 274 insertions(+) create mode 100644 load-tests/README.md create mode 100644 load-tests/hauki-scenarios.js create mode 100644 load-tests/helpers/commands.js create mode 100644 load-tests/helpers/mocks.js create mode 100644 load-tests/helpers/utils.js create mode 100755 load-tests/run.sh diff --git a/load-tests/README.md b/load-tests/README.md new file mode 100644 index 00000000..5a3a1650 --- /dev/null +++ b/load-tests/README.md @@ -0,0 +1,29 @@ +# Hauki load testing + +Scripts for load testing Hauki API. + +## Prerequisities + +* [k6](https://k6.io/docs/getting-started/installation) installed + +## How to run the tests + +This script works as a wrapper for the k6 command and ensures that the proper authentication token is provided in the requests. Thus you can pass all the same parameters as you would do when using k6 directly. + +```bash + ./run.sh -v 1 -i 1