This is an educational project to talk about performance tests. This project contains other branches that follow the script of the main presentation. The presentation slides can be found here
the branching order from the presentation:
- como-a-gente-usa
- que-tal-tentar-salvar-alguma-coisa
- vixe-faltou-autenticar
- se-tivesse-mais-de-um-usuario
- erro-pra-mim-e-sucesso
- bora-ajustar-essas-tarefas
- coisinhas-interessantes
- Run the app
- Run the following command on cmd
locust
virtualenv env
source env/bin/activate
pip install -r requirements.txt
SECRET_KEY=this-is-not-a-secret
DEBUG=False
from django.contrib.auth.models import User
User.objects.create_user(username='foo', email='[email protected]', password='bar')
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
localhost:8000/api/token/
{
"username": "username",
"password": "password"
}
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
localhost:8000/api/meals/
⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃ ⁃
localhost:8000/api/meals/
{
"sku": "meal123",
"slug": "soup",
"title": "Grandma Soup",
"description": "My Favorite Grandma Soup",
"category": "mains",
"start_date": "2022-07-31",
"end_date": "2030-07-31"
}
Param | value | Type |
---|---|---|
token | {{access_token}} | string |