CSV data-driven test
Problem: Your test needs a pool of distinct users, products, or inputs so that each virtual user operates on unique data — avoiding cache collisions, realistic read distributions, and unique-constraint conflicts on writes. MaxoPerf Test Data entities are the first-class way to do this.
Test type: Any (Load test, Stress test, Soak test).
Prerequisites
Section titled “Prerequisites”- A MaxoPerf account and a workspace.
- A CSV file with a header row and at least one data row per intended virtual user.
- A Taurus YAML test that will consume the CSV parameters.
Step by step in MaxoPerf
Section titled “Step by step in MaxoPerf”1. Prepare the CSV file
Section titled “1. Prepare the CSV file”A well-formed data file:
email,password,user_iduser001@example.test,P@ssw0rd!,u-001user002@example.test,P@ssw0rd!,u-002user003@example.test,P@ssw0rd!,u-003Guidelines:
- Header row names become the parameter names in MaxoPerf.
- One row per distinct dataset entry. For 50 VUs, 50+ rows avoids recycling.
- Never put real user credentials in version-controlled files. Generate synthetic ones.
2. Create a Test Data entity
Section titled “2. Create a Test Data entity”- Open the Workspace page and switch to the Data tab.
- Click New data entity.
- Give it a descriptive name, for example
E-commerce users — load test. - Upload the CSV file.
- Save. MaxoPerf parses the header row and shows a row-count summary.
3. Review the entity detail
Section titled “3. Review the entity detail”- Click the entity name to open its detail page.
- Switch to the Parameters tab to confirm the column → parameter name mapping.
- Rename any column if the Taurus YAML references a different name.
4. Write the Taurus scenario to use the parameters
Section titled “4. Write the Taurus scenario to use the parameters”execution: - scenario: data-driven-login concurrency: 50 ramp-up: 2m hold-for: 5m
scenarios: data-driven-login: data-sources: - path: users.csv variable-names: email,password,user_id random-order: false requests: - label: POST /auth/login url: https://api.example.com/auth/login method: POST headers: Content-Type: application/json body: '{"email": "${email}", "password": "${password}"}'
- label: GET /users/${user_id}/profile url: https://api.example.com/users/${user_id}/profile method: GETThe path: users.csv must match the file name that MaxoPerf injects from the data entity.
5. Attach the data entity to the test
Section titled “5. Attach the data entity to the test”- Open the test and switch to the Data tab.
- Click Attach data entity and select the entity you created.
- Confirm the file name shown matches the
pathin your Taurus YAML (users.csv). - Save.
6. Upload the Taurus YAML and run
Section titled “6. Upload the Taurus YAML and run”- Switch to the Files tab and upload the Taurus YAML as the entrypoint.
- Confirm the entity is attached (Data tab).
- Click Run now.
Verify
Section titled “Verify”- The run overview shows requests against multiple distinct user IDs (no single
user_iddominates the error log). - The
POST /auth/loginlabel has a near-zero error rate — if you see401errors, check that the CSV credentials are valid in the target environment. - The
GET /users/${user_id}/profilelabel shows realistic response-time distribution (not unrealistically uniform, which would indicate caching on a single resource).
Variations
Section titled “Variations”- Random order: set
random-order: truein the data-source block to shuffle rows rather than distribute sequentially. - Multiple CSV entities: attach more than one entity per test for independent data pools (e.g. products + users).
- Variant testing: MaxoPerf data entities support variants — different CSV versions of the same entity. Switch variants between runs to test different user populations.
- Large datasets: MaxoPerf streams the CSV to runners rather than loading it fully into memory, so files with hundreds of thousands of rows work without special configuration.
Where to go next
Section titled “Where to go next”- Auth login + token capture flow — combine CSV credentials with token extraction.
- Correlation and dynamic values — capture server-returned IDs after a create step.
- Upload test files — the files tab and entrypoint marking.
- Taurus fundamentals —
data-sourcesblock reference.