Artillery: How values are picked from CSV

Created on 30 Sep 2016  Â·  8Comments  Â·  Source: artilleryio/artillery

Hello,

My doubt consist in two parts:

  1. Can I specify more than one CSV file as payload?
  2. If the answer is no, how are the values picked?

In case you only specify one file, documentation says that values are randomly picked, but it does not specifies how. Is a random row picked and then all the values from that row used? Or every time a new random value is picked?
This is important because if all the values of a single row are used each time, I have to generate a CSV with all the possible combinations for a real random behavior.

Thanks

All 8 comments

Yep, you can specify multiple payloads: https://artillery.io/docs/script_reference.html#payloads

A row is picked at random for each virtual user and the values are used to populate the variables.

If I specify several payload files, how does artillery know where to find the required variables? I want to have several files for different variables.

The variables are set by the fields property on a payload object.

Yes, you have to specify the fields, but since you specify payloads and fields separately, how do you relate the correct fields to the correct file?

Each payload object in the config has its own field attribute (so you don't
specify the payload on the command line but in the script itself)

On Monday, 3 October 2016, Daniel Rodríguez Rivero [email protected]
wrote:

Yes, you have to specify the fields, but since you specify payloads and
fields separately, how do you relate the correct fields to the correct file?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/shoreditch-ops/artillery/issues/188#issuecomment-251047923,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF0i_NUi5iCibWki74GIOxKoNN9dQdks5qwLaXgaJpZM4KLKuM
.

Sorry @hassy but I'm still not understand how do you can specify multiple payloads. I re-read the examples and there is no example about how specifying several payload files... Ok, I just saw the sentence 'it can be an array'. I missed that. Maybe you could make it more prominent with an example? Thanks anyway.

Thanks for the feedback, very valuable for making the docs better!

On Monday, 3 October 2016, Daniel Rodríguez Rivero [email protected]
wrote:

Sorry @hassy https://github.com/hassy but I'm still not understand how
do you can specify multiple payloads. I re-read the examples and there is
no example about how specifying several payload files... Ok, I just saw the
sentence 'it can be an array'. I missed that. Maybe you could make it more
prominent with an example? Thanks anyway.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/shoreditch-ops/artillery/issues/188#issuecomment-251050079,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAF0vJhpya6LU6xNpTMLj3_mzJLETRjks5qwLnFgaJpZM4KLKuM
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DanielMSchmidt picture DanielMSchmidt  Â·  4Comments

ericmacfarland picture ericmacfarland  Â·  6Comments

cyrfer picture cyrfer  Â·  5Comments

dshook picture dshook  Â·  5Comments

hassy picture hassy  Â·  3Comments