Basic Artillery Example
Below is a basic workflow for executing an Artillery test. You can paste this directly into the YAML of an existing or new test, just make
sure to update the name and namespace for your environment if needed.
- The
spec.contentproperty defines the location of the GitHub project. - The
spec.stepsproperty defines a single step that runs theartillerycommand and uploads the JSON report as an artifact.
Basic Artillery Workflow
kind: TestWorkflow
apiVersion: testworkflows.testkube.io/v1
metadata:
name: artillery-sample
namespace: testkube
labels:
docs: example
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/artillery/artillery-smoke-test.yaml
container:
workingDir: /data/repo/test/artillery
steps:
- name: Run Artillery tests
run:
image: artilleryio/artillery:2.0.9
shell: |
mkdir -p /data/artifacts
/home/node/artillery/bin/run run artillery-smoke-test.yaml -o /data/artifacts/artillery-report.json
artifacts:
workingDir: /data/artifacts
paths:
- '*'
The workflow uses Artillery's -o option to write /data/artifacts/artillery-report.json. Testkube detects uploaded
Artillery aggregate JSON reports as artillery.report and ingests counters, rates, summaries, and histograms as
Granular Metrics.
After execution, you can see the output from the executions under the executions panel tabs:
- Log Output
The log output from the Artillery execution:

Basic Artillery from Template
Below is an example workflow for executing the Artillery test using an official Testkube Template.
Basic Artillery Workflow from Template
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: artillery-sample-from-template
namespace: testkube
labels:
docs: example
spec:
container:
workingDir: /data/repo/test/artillery
steps:
- name: Run from template
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/artillery/artillery-smoke-test.yaml
workingDir: /data/repo/test/artillery
template:
name: official/artillery/v1
config:
version: 2.0.9
run: "mkdir -p /data/artifacts && artillery run artillery-smoke-test.yaml -o /data/artifacts/artillery-report.json"
artifacts:
workingDir: /data/artifacts
paths:
- '*'