The Random CSV Data Set plugin is a new Apache JMeter™ plugin that I developed (released November 2017), which solves data driven testing needs. The Random CSV Data Set Config plugin provides the capability to parameterize your Test Plan from a CSV file in random order of records. Until now, JMeter users who used the default CSV Data Set Config element could only read records in sequential order. The Random CSV Data Set Config plugin solves this problem.
How to Get the Random CSV Data Set Plugin Now
The Random CSV Data Set Config plugin is available to download from the JMeter Plugins Manager.
Open the JMeter Plugins Manager on JMeter (If you haven’t it, read How to Install the JMeter Plugins Manager)
Select ‘Available Plugins’ tab on JMeter Plugins Manager
In the search field write ‘Random’, and then select the plugin’s checkbox
Click the button ‘Apply Changes and Restart JMeter’
Increase imagejmeter random csv data set plugin
How to use the Random CSV Data Set Config plugin
First, create a test-plan that contains one Thread Group. A Thread group consists of an “HTTP Request” and a “Random CSV Data Set Config”. Also, add a “View Results Tree”.
Increase imagehow to randomly parameterize csv file records, jmeter
Then select the “Random CSV Data Set Config” element in your Test Plan tree and set it up with the following settings:
Increase imagejmeter, csv data set config, open source
A description of these parameters:
Filename - The path to your file. Relative paths are resolved with respect to the path of active test plan.
File encoding - The encoding that will be used to read this file.
Delimiter - The delimiter that will be used to split records in the file.
Variable names - This is the equivalent to a “column name” in a spreadsheet.
Random order - The plugin will get records from the file in random order. This is the part that provides this element’s added value. If you don’t select this option, the element will work like the regular CSV Data Set Config.
Rewind on end of list - After one loop of testing completes, JMeter runs another one. This is valuable for checking your performance over time. When this is checked with “Random order”, the second and following loops will test the variables in a different order each time.
First line is CSV header - If you specified “Variable names” and you want to skip the first line in the file check this checkbox.
Independent list per thread - Each thread will go through their own copy of the reader. This imitates real-world scenarios. When this is checked with “Random order”, each thread runs its own random sequence instead of all of them going over the same order of variables.
Click ‘Test CSV Reading’ to see if the plugin works with the settings provided. You don’t have to run the complete test, as required until now in JMeter, thus saving time and resources.
In the preview area you can see how the plugin parsed this file. Please note that the preview area only shows 20 records from the CSV file.
Here you can see the content of the file in a simple text editor:
Increase imagejmeter, parameterization, guide
After you set up the “Random CSV Data Set Config” element, select the “HTTP Request” component in your Test Plan. For example, we’ll send a Log In request with two parameters: ‘login’ and ‘password’.