Skip to content

ralucaoanapopa/load-tests-locust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

  1. Download and install Python 3.x
  • If it is already installed, check in terminal:
python --version
  1. Make sure to have the latest pip version installed
python.exe -m pip install --upgrade pip
  1. Install locust
pip3 install locust

Run load tests

Locust files from this repository use the following domains:

locust file base URL
BookCartAPI https://bookcart.azurewebsites.net/api
LibraryAPI https://postman-library-api.glitch.me
ShopDemoQA https://shop.demoqa.com

Headful / UI mode

  1. Start locust
locust -f <path>/locustfile.py
  1. Access http://localhost:8089/ and set:
  • number of users
  • spawn rate
  • base URL*

*only if host is not set in locust file.

Headless mode

locust --headless --users 1 --spawn-rate 1 -H <base_url>

Results

LibraryAPI

This is and example of Response time (ms) diagram. It was generated using locust in UI mode and generating html report.

LibraryAPI-response_time

ShopDemoQA

Generated using locust in UI mode, then saved a html report which contains these types of diagrams and statistics:

ShopDemoQA-request-statistics

ShopDemoQA-response-times

ShopDemoQA-total-req-per-s

PublicSOAP-API-Countries

Generated using locust in UI mode, then saved a html report which contains these types of diagrams and statistics:

PublicSOAP-API-request-statistics

PublicSOAP-API-response-times

PublicSOAP-API-total_requests_per_second

PublicSOAP-API-number_of_users

About

Few scripts with Locust performance testing tool

Topics

Resources

Stars

Watchers

Forks

Languages