{"action":"created","issue":{"url":"https://api.github.com/repos/shoreditch-ops/artillery/issues/60","repository_url":"https://api.github.com/repos/shoreditch-ops/artillery","labels_url":"https://api.github.com/repos/shoreditch-ops/artillery/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/shoreditch-ops/artillery/issues/60/comments","events_url":"https://api.github.com/repos/shoreditch-ops/artillery/issues/60/events","html_url":"https://github.com/shoreditch-ops/artillery/issues/60","id":136243192,"number":60,"title":"Pick rows from CSV in sequence rather than at random?","user":{"login":"markgandy","id":3522980,"avatar_url":"https://avatars.githubusercontent.com/u/3522980?v=3","gravatar_id":"","url":"https://api.github.com/users/markgandy","html_url":"https://github.com/markgandy","followers_url":"https://api.github.com/users/markgandy/followers","following_url":"https://api.github.com/users/markgandy/following{/other_user}","gists_url":"https://api.github.com/users/markgandy/gists{/gist_id}","starred_url":"https://api.github.com/users/markgandy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markgandy/subscriptions","organizations_url":"https://api.github.com/users/markgandy/orgs","repos_url":"https://api.github.com/users/markgandy/repos","events_url":"https://api.github.com/users/markgandy/events{/privacy}","received_events_url":"https://api.github.com/users/markgandy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shoreditch-ops/artillery/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/shoreditch-ops/artillery/labels/good-first-pr","name":"good-first-pr","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-25T01:19:33Z","updated_at":"2016-02-29T16:00:24Z","closed_at":null,"body":"Each scenario in my test needs to have a unique orderNumber variable.  My orderNumbers are read in from CSV file, but because these are picked at random the same orderNumber can (and does) get re-used. Is there any way that variables from CSV can be looped through in sequence rather than picked at random?"},"comment":{"url":"https://api.github.com/repos/shoreditch-ops/artillery/issues/comments/190268681","html_url":"https://github.com/shoreditch-ops/artillery/issues/60#issuecomment-190268681","issue_url":"https://api.github.com/repos/shoreditch-ops/artillery/issues/60","id":190268681,"user":{"login":"hassy","id":1490,"avatar_url":"https://avatars.githubusercontent.com/u/1490?v=3","gravatar_id":"","url":"https://api.github.com/users/hassy","html_url":"https://github.com/hassy","followers_url":"https://api.github.com/users/hassy/followers","following_url":"https://api.github.com/users/hassy/following{/other_user}","gists_url":"https://api.github.com/users/hassy/gists{/gist_id}","starred_url":"https://api.github.com/users/hassy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hassy/subscriptions","organizations_url":"https://api.github.com/users/hassy/orgs","repos_url":"https://api.github.com/users/hassy/repos","events_url":"https://api.github.com/users/hassy/events{/privacy}","received_events_url":"https://api.github.com/users/hassy/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T16:00:24Z","updated_at":"2016-02-29T16:00:24Z","body":"> I'm happy to look at creating a pull request for reading the rows in sequence if you can point me in the right direction?\r\n\r\nThat would be great. The place to start is [runner.js#330](https://github.com/shoreditch-ops/artillery-core/blob/master/lib/runner.js#L330). That's where a random row is being picked from each payload file (there can be more than one) - so we'd just need to keep an index per payload.\r\n\r\nTo control the behavior, I suggest we add an option to payload definitons:\r\n\r\n```javascript\r\n{\r\n  \"config\": {\r\n    \"payload\": [\r\n      {\r\n        \"path\": \"./orders.csv\",\r\n        \"fields\": [\"orderId\", \"someOtherField\"],\r\n        \"order\": \"iterate\" // or \"random\" which the default setting\r\n      }\r\n    ]\r\n  }\r\n  // rest of the script\r\n}\r\n```\r\n\r\nThen inside `createContext` what `\"order\"` is set to.\r\n\r\nLet me know what you think"}}