Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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.