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.content
property defines the location of the GitHub project. - The
spec.steps
property defines a single step that runs theartillery
command.
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/executor-smoke/artillery-smoke-test.yaml
container:
workingDir: /data/repo/test/artillery/executor-smoke
steps:
- name: Run Artillery tests
run:
image: artilleryio/artillery:2.0.9
shell: /home/node/artillery/bin/run run artillery-smoke-test.yaml
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/executor-smoke
steps:
- name: Run from template
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/artillery/executor-smoke/artillery-smoke-test.yaml
workingDir: /data/repo/test/artillery/executor-smoke
template:
name: official/artillery/v1
config:
version: 2.0.9
run: "artillery run artillery-smoke-test.yaml"