Skip to content

Commit 458693a

Browse files
authored
Merge pull request #403 from hellofresh/feature/MPC-293-fix-k6-testdata-docs
[MPC-293] Clarify test data file access in k6 scripts
2 parents b0cbcd7 + bd708d2 commit 458693a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/k6/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Kangal also supports test data with K6, the supported format file is `.csv`.
9696
1. Prepare your test data in a `.csv` file
9797
2. Configure test script accordingly. See [the k6 data parameterization from a CSV file example](https://k6.io/docs/examples/data-parameterization/#from-a-csv-file).
9898
* **Important**: _"k6 doesn't parse CSV files natively, but you can use an external library, [Papa Parse](https://www.papaparse.com/)."_
99+
* **Important**: When accessing the test data file in your k6 script, use the hardcoded filename `testdata` (e.g., `open('testdata')`), not the original filename you uploaded.
99100
3. Add the file in the `testData` field:
100101

101102
```shell
@@ -137,7 +138,7 @@ export function handleSummary(data) {
137138

138139
You can use <https://github.com/benc-uk/k6-reporter> to create an HTML Report.
139140

140-
> Note: There aren't any concept of master/worker in k6. Metrics will not be automatically aggregated. To be able to aggregate your metrics and analyse them together, youll need to set K6_OUT env to send statics to another service (influxdb, prometheus, etc.).
141+
> Note: There aren't any concept of master/worker in k6. Metrics will not be automatically aggregated. To be able to aggregate your metrics and analyse them together, you'll need to set K6_OUT env to send statics to another service (influxdb, prometheus, etc.).
141142
142143
## Logs
143144

@@ -164,4 +165,4 @@ RUN xk6 build --output /k6 --with github.com/walterwanderley/xk6-stomp@latest
164165
# Use the official base image and override the k6 binary
165166
FROM grafana/k6:latest
166167
COPY --from=builder /k6 /usr/bin/k6
167-
```
168+
```

0 commit comments

Comments
 (0)