DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • The Cypress Edge: Next-Level Testing Strategies for React Developers
  • Mastering Redirects With Cloudflare Bulk Redirects
  • Reliability Models and Metrics for Test Engineering
  • Architecture Patterns : Data-Driven Testing

Trending

  • Enhancing Business Decision-Making Through Advanced Data Visualization Techniques
  • AI Speaks for the World... But Whose Humanity Does It Learn From?
  • Implementing Explainable AI in CRM Using Stream Processing
  • AI Agents: A New Era for Integration Professionals
  1. DZone
  2. Data Engineering
  3. Data
  4. Introducing the Random CSV Data Set Config Plugin on JMeter

Introducing the Random CSV Data Set Config Plugin on JMeter

This Apache JMeter plugin gives you the ability to parameterize your Test Plan from a CSV file in random order of records for data-driven testing.

By 
Artem Fedorov user avatar
Artem Fedorov
·
Nov. 18, 17 · Tutorial
Likes (6)
Comment
Save
Tweet
Share
18.1K Views

Join the DZone community and get the full member experience.

Join For Free

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.

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'

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

Then select the "Random CSV Data Set Config" element in your Test Plan tree and set it up with the following settings:

A description of these parameters:

  • Filename - The path to your file. Relative paths are resolved with respect to the path of an ctive test plan.
  • Fileencoding - The encoding that will be used to read this file.
  • Delimiter - The delimiter that will be used to split records in the file.
  • Variablenames - This is the equivalent to a "column name" in a spreadsheet.
  • Randomorder - 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.
  • Rewindonend 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:

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

In the 'HTTP Request,' specify the HTTP Method, Path, and parameters that will be sent. As you can notice, the value field has the same name as the variable in the 'Random CSV Data Set' or header from your file. The construction ${....} means it is variable, but not an absolute value.

After these steps, save your Test Plan and run the test. In 'View Results Tree', we can see that the requests was sent with the values from our CSV file:

WARNING: The config reads the files at the beginning of the test. Therefore, there will be a delay and a large memory consumption for larger files.

That's it! You now know how to use the CSV Data Set Config Plugin, which was developed as part of BlazeMeter's investment in the JMeter open source community.

Now that you know how to use the Random CSV Data Set Config Plugin, you can learn more JMeter from our free JMeter Academy.

Data set CSV Data (computing) Test plan Testing

Published at DZone with permission of Artem Fedorov, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • The Cypress Edge: Next-Level Testing Strategies for React Developers
  • Mastering Redirects With Cloudflare Bulk Redirects
  • Reliability Models and Metrics for Test Engineering
  • Architecture Patterns : Data-Driven Testing

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!