# Create pods
kubectl apply -f k8s-dashboard/dashboard.yaml
kubectl apply -f k8s-dashboard/auth.yaml
# Listen on localhost:8001
kubectl proxy
# Generate token
kubectl -n kubernetes-dashboard get secret $(kubectl -n kubernetes-dashboard get sa/admin-user -o jsonpath="{.secrets[0].name}") -o go-template="{{.data.token | base64decode}}"
- Copy token to notepad
- Visit dashboard and paste token to log in
kubectl create -R -f resources/
username:
admin
password:
XhXUdmQ576H6e7
./run_test.sh -j <filename.jmx> -n <namespace> -c -m -i <slaves_number> -r
# (c) - csv flag
# (m) - flag dedicated for copying test fragment
# (r) - generate report after test
./stop_test.sh
# If a master pod is not available, create one
kubectl apply -f resources/jmeter/jmeter-master.yaml
# Wait for the pod is Running, then
kubectl cp -n <namespace> <master-pod-id>:/report/<result_tag> result/<result_tag>
# To copy the content of the report from the pod to your local
You need to put your JMeter project inside the scenario
folder, inside a folder named after the JMX (without the extension).
Put your CSV file inside the dataset
folder, child of scenario
Put your JMeter modules (include controllers) inside the module
folder, child of scenario
dataset
and module
are in scenario
and not below inside the <project>
folder because, in some cases, you can have multiple JMeter projects that are sharing the JMeter modules (that's the goal of using modules after all).
Below a visual representation of the file structure
+-- scenario
| +-- dataset
| +-- module
| +-- my-scenario
| +-- my-scenario.jmx
| +-- .env
In order to change test parameters, please edit .env
file
Prerequisites
Cluster with nodes shall be created on Google Cloud Platform account
Connection with cluster
# Get current cluster info
kubectl config current-context
# Connect with cluster
gcloud container clusters get-credentials <CLUSTER_NAME>
Grafana
Please visit grafana's service external endpoint and log in using provided credentials.
Running minikube cluster
minikube start --driver <DRIVER> --memory <RAM_AMOUNT_MB> --cpus <CPUS_NUMBER>
# DRIVER: hyperv, docker
Grafana
# Port forwarding
kubectl port-forward <grafana_pod_id> 3000
Please visit localhost:3000 and log in using provided credentials.