← Files Testkube SkillsARCHIVED FILE
skills/testworkflow-author/examples/locust-load-test.yaml
1.45 KB · Oct 2, 2026 · 00:29 UTC
# Example: Locust Load Test
# Patterns: locust, run with image, artifact collection
# What this demonstrates: Running a Locust performance test with the
# official Locust Docker image. Locust is a
# Python-based load testing tool that generates
# HTML reports.
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: locust-load-test
labels:
tool: locust
category: performance-testing
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/locust/locust-project
container:
workingDir: /data/repo/test/locust/locust-project
resources:
requests:
cpu: 256m
memory: 128Mi
steps:
- name: Run Locust test
run:
# Use the official Locust image — pinned version for reproducibility
image: locustio/locust:2.32.3
shell: |
mkdir /data/artifacts
# --headless: run without web UI
# --users: number of simulated users
# --spawn-rate: users spawned per second
# --run-time: test duration
# --html: generate an HTML report
locust -f locust_test.py \
--host https://testkube-test-page-lipsum.pages.dev/ \
--headless \
--users 6 \
--spawn-rate 3 \
--run-time 10s \
--html=/data/artifacts/report.html
artifacts:
paths:
- /data/artifacts/**
SHA-256: d093f472459e28fffcc421b2d880240a1e75bd721d87e391848840099765866c