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.

  1. Open the JMeter Plugins Manager on JMeter (If you haven’t it, read How to Install the JMeter Plugins Manager)

  2. Select ‘Available Plugins’ tab on JMeter Plugins Manager

  3. In the search field write ‘Random’, and then select the plugin’s checkbox

  4. 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

5a1c0f80bf80d.jpg

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’.

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. 1. Open the JMeter Plugins Manager on JMeter (If you haven’t it, read How to Install the JMeter Plugins Manager) 2. Select ‘Available Plugins’ tab on JMeter Plugins Manager 3. In the search field write ‘Random’, and then select the plugin’s checkbox 4. 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 ![5a1c0f80bf80d.jpg](serve/attachment&path=5a1c0f80bf80d.jpg) 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’.
edited Nov 27 '17 at 6:44 pm
 
0
reply
106
views
0
replies
1
followers
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft