Skip to content

CSV Reader

formatting...

Read a CSV file and provides a new row from the CSV file each time it is accessed.

Info

CSV files must have headers for each column, since these are used to reference the value.

Format

Value is the path, relative to requests/, of an file ending with .csv.

Arguments

Name Type Description Default
repeat bool wheter values should be reused, e.g. when reaching the end it should start from the beginning again False
random bool if rows should be selected by random, instead of sequential from first to last False

Example

requests/example.csv
username,password
bob1,some-password
alice1,some-other-password
bob2,password
And value for variable "AtomicCsvReader.example" is "example.csv | random=False, repeat=True"
Then post request with name "authenticate" to endpoint "/api/v1/authenticate"
  """
  {
      "username": "{{ AtomicCsvReader.example.username }}",
      "password": "{{ AtomicCsvReader.example.password }}"
  }
  """

First request the payload will be:

{
    "username": "bob1",
    "password": "some-password"
}

Second request:

{
    "username": "alice1",
    "password": "some-other-password"
}