Skip to content

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).

  • 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.

A well-formed data file:

email,password,user_id
user001@example.test,P@ssw0rd!,u-001
user002@example.test,P@ssw0rd!,u-002
user003@example.test,P@ssw0rd!,u-003

Guidelines:

  • 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.
  1. Open the Workspace page and switch to the Data tab.
  2. Click New data entity.
  3. Give it a descriptive name, for example E-commerce users — load test.
  4. Upload the CSV file.
  5. Save. MaxoPerf parses the header row and shows a row-count summary.
  1. Click the entity name to open its detail page.
  2. Switch to the Parameters tab to confirm the column → parameter name mapping.
  3. 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: GET

The path: users.csv must match the file name that MaxoPerf injects from the data entity.

  1. Open the test and switch to the Data tab.
  2. Click Attach data entity and select the entity you created.
  3. Confirm the file name shown matches the path in your Taurus YAML (users.csv).
  4. Save.
  1. Switch to the Files tab and upload the Taurus YAML as the entrypoint.
  2. Confirm the entity is attached (Data tab).
  3. Click Run now.
  • The run overview shows requests against multiple distinct user IDs (no single user_id dominates the error log).
  • The POST /auth/login label has a near-zero error rate — if you see 401 errors, check that the CSV credentials are valid in the target environment.
  • The GET /users/${user_id}/profile label shows realistic response-time distribution (not unrealistically uniform, which would indicate caching on a single resource).
  • Random order: set random-order: true in 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.