- OS: Ubuntu 14.04 LTS
- Language: Python 2.7
- Framework: Django 1.8 / Django Rest Framework 3.3.1
- Database: Postgres
This app uses a .env
file to handle all sensitive data. This file should be located inside the app directory (beside the manage.py
file), and populated with the fields below, Note any lists in the .env
file, should be represented by a comma seperated string.
ENV="LOCAL"
ALLOWED_HOSTS="127.0.0.1,localhost"
SECRET_KEY=random_string
DATABASE_URL="postgres://locust:locust@db/locust"
The easiest way to run this app is with Docker and the makefiles. Ensure docker is installed on your system (Installation instructions), and in your terminal run:
$ make run
This will boot up a docker container exposing ports 8000
(app) and 5432
(db). Then visit the running application http://localhost:8000
*Note if you are running this with boot2docker, ensure you have mapped your vm's ports are mapped correctly with:
VBoxManage controlvm boot2docker-vm natpf1 "django,tcp,127.0.0.1,8000,,8000"
Check out the Makefile
in the repository root for all available commands.
This apps primary functionality is to load test against api endpoints, so there is no frontend build. The app is built with django rest framework which provides a nice interface for navigating through the api, but we also provide more detailed documentation of all the apis with the Swagger UI.
To view the api docuemtation navigate to:
localhost:8000/docs/
An admin account is added by default, to allow access to the admin sections.
Username: locust
Password: locust
To stop the app, simply press Ctrl+C
in the running terminal.
The locust server is running on port 8089
so its accessable at http://localhost:8089.
Currently locust is setup to run through each section of the app performing a set of actions:
Hit base view (list)
Create a new record
Navigate to new record
Update new record
Delete record