๐๏ธ Foundations ยท Days 1โ6
Day 6: Parameterize One Thing
Objective
Drive one input from a CSV or data file so each iteration uses different data.
Scenario
Create a CSV with 10 different search terms or IDs. Configure your script to read a new value on each iteration. Run and verify unique data is used.
Metrics to Watch
When It Clicks
Static data hides caching effects and inflates performance.
Solution
Create data.csv with a 'searchTerm' column and 10+ unique values. In JMeter: add a CSV Data Set Config element pointing to the file, set variable name to 'searchTerm', recycle = true. Reference it in your HTTP Request as a parameter value: `${searchTerm}`. In k6: use `const data = new SharedArray('terms', () => JSON.parse(open('./data.json')))` and index with `data[exec.scenario.iterationInTest % data.length]`. Verify uniqueness by checking the access logs on your server.
Reflection
What systems in your stack might cache aggressively and hide real bottlenecks?
Deliverable
A parameterized script with an external data file.
โ ๏ธ Never run load tests against infrastructure you do not own or have explicit written permission to test. Always use a dedicated test environment. Unauthorized load injection can cause outages, trigger legal liability, and violate terms of service.