|
| 1 | +# Tricentis NeoLoad Trial Image |
| 2 | + |
| 3 | +The [Tricentis NeoLoad](https://www.tricentis.com/products/performance-testing-neoload) trial job enables you to use NeoLoad performance tests in your Optimize Pro experiments. |
| 4 | +It utilizes a customer container image, based on the [`python:3.10-bullseye`](https://hub.docker.com/_/python) base container and the [official NeoLoad CLI utility](https://github.com/Neotys-Labs/neoload-cli). |
| 5 | + |
| 6 | +## Usage |
| 7 | + |
| 8 | +- Create a NeoLoad access token. |
| 9 | +- Configure the environment variables shown in the next section for your trial job in your `experiment.yaml` |
| 10 | +- Configure Trial to use either `prometheus` setupTask or manually define `PUSHGATEWAY_URL`. |
| 11 | + |
| 12 | +## Configuration |
| 13 | + |
| 14 | +| Environment Variable | Description | Default value | |
| 15 | +| -------------------- | ----------- |---------------| |
| 16 | +| `SCENARIO` | Scenario from NeoLoad Project to use | `StormForgeScenario` | |
| 17 | +| `TEST_NAME` | Test result naming pattern | `SF-$(uuidgen)` | |
| 18 | +| `TEST_FILE` | Zip or YAML test file to use (will be uploaded to Neoload SaaS) | none | |
| 19 | +| `ZONE` | NeoLoad controller zone to use | `USEGCP` |
| 20 | +| `LGS` | Number of load generators to use | `2` |
| 21 | +| `NEOLOAD_TOKEN` | NeoLoad authentication token | none | |
| 22 | +| `PUSHGATEWAY_URL` | The URL used to push NeoLoad test run metrics. If not explicitly set, the Optimize controller will set it. | |
| 23 | + |
| 24 | +## Metrics |
| 25 | + |
| 26 | +Metrics are extracted from the NeoLoad test report using the built-in transactions-csv template to produce a CSV file. |
| 27 | +This file contains calculated statistics based on all requests executed in the test. |
| 28 | + |
| 29 | +| Name | Example Value | Description | |
| 30 | +| ---- | ------------- | ----------- | |
| 31 | +| `request_count` | 81323 | total number of requests performed | |
| 32 | +| `average_response_time` | 0.1387 | average response time (seconds) | |
| 33 | +| `max_response_time` | 0.2578 | maximum response time (seconds) | |
| 34 | +| `min_response_time` | 0.0879 | minimum response time (seconds) | |
| 35 | +| `p50` | 0.145 | 50th percentile for response time (seconds) | |
| 36 | +| `p90` | 0.184 | 90th percentile for response time (seconds) | |
| 37 | +| `p95` | 0.186 | 95th percentile for response time (seconds) | |
| 38 | +| `p99` | 0.189 | 99th percentile for response time (seconds) | |
| 39 | + |
| 40 | +## Example Kubernetes Manifest |
| 41 | + |
| 42 | + |
| 43 | +The following Kubernetes `Job` manifest excerpt, `ConfigMap`, and `Secret` illustrate how you might use this trial job container in your Optimize Pro `experiment.yaml`. |
| 44 | + |
| 45 | +```yaml |
| 46 | +apiVersion: batch/v1 |
| 47 | +kind: Job |
| 48 | +metadata: |
| 49 | + name: sandbox-1 |
| 50 | + namespace: examples |
| 51 | +spec: |
| 52 | + backoffLimit: 0 |
| 53 | + template: |
| 54 | + spec: |
| 55 | + restartPolicy: Never |
| 56 | + containers: |
| 57 | + - name: neoload |
| 58 | + image: thestormforge/optimize-trials:latest-blazemeter-cloud |
| 59 | + env: |
| 60 | + - name: TEST_NAME |
| 61 | + valueFrom: |
| 62 | + fieldRef: |
| 63 | + fieldPath: metadata.name |
| 64 | + - name: LGS |
| 65 | + value: "5" |
| 66 | + - name: TEST_FILE |
| 67 | + value: /tmp/neoload-files/neoload-stormforge.yaml |
| 68 | + - name: NEOLOAD_TOKEN |
| 69 | + valueFrom: |
| 70 | + secretKeyRef: |
| 71 | + name: neoload-token |
| 72 | + key: token |
| 73 | + volumeMounts: |
| 74 | + - name: test-case-file |
| 75 | + readOnly: true |
| 76 | + mountPath: /tmp/neoload-files |
| 77 | + volumes: |
| 78 | + - name: test-case-file |
| 79 | + configMap: |
| 80 | + name: neoload-artifacts |
| 81 | +--- |
| 82 | +apiVersion: v1 |
| 83 | +kind: ConfigMap |
| 84 | +metadata: |
| 85 | + name: neoload-artifacts |
| 86 | +data: |
| 87 | + neoload-stormforge.yaml: | |
| 88 | + name: Loadtest Party |
| 89 | + user_paths: |
| 90 | + - name: sf-path |
| 91 | + actions: |
| 92 | + steps: |
| 93 | + - transaction: |
| 94 | + name: Transaction1 |
| 95 | + description: loadtest party |
| 96 | + steps: |
| 97 | + - request: |
| 98 | + url: http://TARGET_SERVER/ |
| 99 | + - request: |
| 100 | + url: / |
| 101 | + server: TARGET_SERVER |
| 102 | + method: GET |
| 103 | +
|
| 104 | + populations: |
| 105 | + - name: pop1 |
| 106 | + user_paths: |
| 107 | + - name: sf-path |
| 108 | +
|
| 109 | + scenarios: |
| 110 | + - name: StormForgeScenario |
| 111 | + populations: |
| 112 | + - name: pop1 |
| 113 | + rampup_load: |
| 114 | + min_users: 20 |
| 115 | + max_users: 100 |
| 116 | + increment_users: 2 |
| 117 | + increment_every: 1s |
| 118 | + duration: 5m |
| 119 | +--- |
| 120 | +apiVersion: v1 |
| 121 | +kind: Secret |
| 122 | +metadata: |
| 123 | + name: neoload-token |
| 124 | +data: |
| 125 | + token: XXX-XXX-XXX-XXX |
| 126 | +``` |
| 127 | +
|
| 128 | +NOTE: If you are using this in an experiment, keep in mind that some values are set automatically. In particular, the `backoffLimit`, `restartPolicy`, and `PUSHGATEWAY_URL` environment variable are all introduced when evaluating a trial's job template. `PUSHGATEWAY_URL` requires the usage of the [`prometheus` `setupTask`](https://docs.stormforge.io/optimize-pro/concepts/trials/#prometheus) though. |
0 commit comments