Skip to main content
New to Testkube? Unleash the power of cloud native testing in Kubernetes with Testkube. Get Started >

Basic JMeter Framework Example

Below is a basic workflow for executing a JMeter test which is available on GitHub. 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 the test and uploads the created reports.
Basic JMeter Workflow
apiVersion: testworkflows.testkube.io/v1
kind: TestWorkflow
metadata:
name: jmeter-sample
namespace: testkube
labels:
docs: example
spec:
content:
git:
uri: https://github.com/kubeshop/testkube
revision: main
paths:
- test/jmeter/executor-tests/jmeter-executor-smoke.jmx
container:
workingDir: /data/repo/test/jmeter/executor-tests
steps:
- name: Run tests
shell: jmeter -n -t jmeter-executor-smoke.jmx -j /data/artifacts/jmeter.log -o /data/artifacts/report -l /data/artifacts/jtl-report.jtl -e
container:
image: anasoid/jmeter:5.6-plugins-21-jre
artifacts:
paths:
- '/data/artifacts/**/*'

After execution, you can see the output from the test executions under the executions panel tabs:

The log output from the JMeter execution:

JMeter Framework Log Output