we have the following config.yml extract
test_load:
working_directory: ~/demodir
docker:
- <<: *python
- <<: *postgres
environment:
NUM_USERS: 20
HATCH_RATE: 3
RUN_TIME: 30s
<<: *postgres_url
steps:
- checkout
- *install_postgresql_client
- *install_libcairo2
- *create_virtualenv_and_install_dependencies
- *setup_secrets
- *setup_db
- run:
name: Run tests
command: |
python3 -m venv venv
. venv/bin/activate
mkdir results
make test_load
- store_artifacts:
path: ./results/
destination: locust_results
with a make file extract of
LOCUST_FILE?=tests/load/mvp_home.py
NUM_USERS?=10
HATCH_RATE?=2
RUN_TIME?=30s
LOCUST :=
locust
–locustfile $(LOCUST_FILE)
–users=$(NUM_USERS)
–spawn-rate=$(HATCH_RATE)
–run-time=$(RUN_TIME)
–headless
–csv=./results/results
kill_webserver :=
pkill -f runserver_plus
test_load:
ENV_FILES=‘test,dev’ python manage.py runserver_plus 127.0.0.1:8020 --keep-meta-shutdown &
sleep 5
$(LOCUST)
-$(kill_webserver)
but we are getting error in Circleci
Error report
111, ‘Connection refused’)