Locust is a load testing suite for python.
This example repo shows you how to test an endpoint which requires authentication with a Google Service Account.
This repo uses poetry - use the provided vscode devcontainer - further details here https://python-poetry.org/docs/basic-usage/
A dockerfile is provided also.
You will however need your GOOGLE_APPLICAION_CREDENTIALS environment variable to be accessible for secret manager to work.
poetry run locust --host=https://sample-l6wc7ausiq-ew.a.run.app
poetry install
poetry run bandit .
poetry run black .
The Sample folder contains an endpoints spec which can be used with the google cloudrun/endpoints demo instructions
https://cloud.google.com/endpoints/docs/openapi/set-up-cloud-run-espv2