github.com/kubeshop/testkube@v1.17.23/contrib/executor/jmeterd/examples/gitflow/README.md (about) 1 # GitFlow Example test for Distributed JMeter 2 3 This test is an example of how to run a distributed JMeter test using a git repo as a source and how to use the advanced features of the executor. 4 5 ## Test Breakdown 6 7 ### Plugins 8 All the plugins required by the test are kept in the `plugins` directory of the test folder in the git repo. 9 10 ### Additional Files 11 * **CSV**: The test references a CSV file named `Credentials.csv` located in the `data/` directory relative to the project home directory (`${PROJECT_HOME}`). 12 This CSV should contain columns `USERNAME` and `PASSWORD`. 13 14 ### Environment Variables 15 * **DATA_CONFIG**: Used to determine the directory of the CSV data file. It defaults to `${PROJECT_HOME}` if not provided. 16 17 ### Properties 18 * **JMETER_UC1_NBUSERS**: Number of users for the test. Defaults to `2` if not provided. 19 * **JMETER_UC1_RAMPUP**: Ramp-up period for the test in seconds. Defaults to `2` if not provided. 20 * **JMETER_URI_PATH**: The URI path to test against. Defaults to `/pricing` if not provided. 21 22 ## Steps to execute this Test 23 24 ### Testkube Dashboard 25 1. Open the Testkube Dashboard and create a new test. 26 2. Type a test name (i.e. `jmeterd-example`) and select `jmeterd/test` as test type. 27 3. Select `Git` as the source type and fill the following details: 28 * Git Repository URI: https://github.com/kubeshop/testkube 29 * Branch: develop 30 * Path: contrib/executor/jmeterd/examples/gitflow 31 4. Click **Create** to create the test. 32 5. Select **Settings** tab and then open the **Variables & Secrets** tab from the left menu. 33 6. Add a new variable called **SLAVES_COUNT** and set it to the number of slave pods you want to spawn for the test. 34 7. Add another variable called **DATA_CONFIG** and set it to `/data/repo/contrib/executor/jmeterd/examples/gitflow` 35 8. Click on **Save** underneath **the Variables & Secrets** section. 36 9. In the Arguments section, set the following arguments: `-GJMETER_UC1_NBUSERS=5 jmeter-properties-external.jmx` 37 10. Click on **Save** underneath the **Arguments** section. 38 11. Run the test 39 40 ### CRD 41 42 You can also apply the following Test CRD to create the example test: 43 ```yaml 44 apiVersion: tests.testkube.io/v3 45 kind: Test 46 metadata: 47 name: jmeterd-example 48 namespace: testkube 49 labels: 50 executor: jmeterd-executor 51 test-type: jmeterd-test 52 spec: 53 type: jmeterd/test 54 content: 55 type: git 56 repository: 57 type: git 58 uri: https://github.com/kubeshop/testkube 59 branch: develop 60 path: contrib/executor/jmeterd/examples/gitflow 61 executionRequest: 62 variables: 63 DATA_CONFIG: 64 name: DATA_CONFIG 65 value: "/data/repo/contrib/executor/jmeterd/examples/gitflow" 66 type: basic 67 SLAVES_COUNT: 68 name: SLAVES_COUNT 69 value: "2" 70 type: basic 71 args: 72 - "-GJMETER_UC1_NBUSERS=5" 73 - "jmeter-properties-external.jmx" 74 ```