Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.17 KB

File metadata and controls

45 lines (34 loc) · 1.17 KB

API Load Testing

API load testing using gatling.

Table of Contents

Prerequisites

Before you start, ensure you have the following prerequisites installed:

  • Java Development Kit (JDK) version 17.

Manual Run

export API_URL=https://govtool.cardanoapi.io/api
export PEAK_USERS=100
export RAMP_DURATION=40 # in seconds
export STRESS_DURATION=40 # in seconds
./mvnw gatling:test

Run stress test with docker

docker build -t govtool/load-testing . # build  the image
docker run \
  -e RAMP_DURATION=40 \
  -e PEAK_USERS=100 \
  -e STRESS_DURATION=40 \
  -e API_URL='https://govtool.cardanoapi.io/api'\
  govtool/load-testing

Environment Variables

Explain the environment variables used in the project and their purpose.

  • API_URL: The URL of the API being tested.
  • PEAK_USERS: The number of users to be injected during the test for each scenario.
  • RAMP_DURATION:The duration over which the user rate gradually increases.
  • STRESS_DURATION: The duration over which the stress peak occurs.