'How to pass csv file data to WebDriver Sampler and how separate request use separate data from csv file
I wrote one javascript using selenium (WebDriver Sampler) for login. I want to log in to the same site using separate 30 users{user1,user2...user30). I want to check the performance of the site when the number of different users login on site. Here I used 'CSV Data Set Config'plugin and also used a .csv file in which a total 30 users' with which different usernames and passwords were stored. Now I want to pass this username and password to my script so 30 web browsers should be open and each opened browser should be used 30 users' data(username and password) from CSV file .
How we can achieve this?
Solution 1:[1]
With the default configuration of the CSV Data Set Config it will read next line from the .csv file on each iteration of each virtual user. The behaviour can be amended using Sharing Mode
The variables from the CSV Data Set Config can be accessed using
WDS.varsshorthand for JMeterVariables class instance like:var username = WDS.vars.get('username')In order to kick off 30 browsers just add 30 threads (virtual users) in the Thread Group
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dmitri T |

