PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, November 1, 2022

[FIXED] How do I implement a dynamic number of JMeter script processes?

 November 01, 2022     csv, java, jmeter, jmx, performance     No comments   

Issue

I currently have three JMeter scripts that run on three separate machines, each of the connected to a unique CSV file on the respective machine. The three scripts are essentially the same, they only differ in the name of the CSV file they call (1.csv, 2.csv, 3.csv), which contains unique identification numbers, this is done for the reason that when the three scripts run simultaneously, they do not overlap on the unique identifier and perform the work on them at the same time as it may cause errors. My goal is to consolidate these CSV files into one, and consolidate the three JMeter scripts into one, but be able to perform the same operation on the three separate machines with one CSV file and one JMeter script.

Additionally, I would like to be able to run 4 processes on the three machines, for example (so one machine would run 2 processes instead of 1), and achieve the same result, with them not overlapping.


Solution

I don't know what do you mean by "JMeter script processes", if you want to merge 3 CSV files into one and avoid reading the same value by different threads:

  1. Set Sharing Mode of the CSV Data Set Config to All threads
  2. Set Recycle on EOF to False
  3. Set "Stop thread on EOF" to True

This way each JMeter thread (virtual user) you define in the Thread Group will read next line from the CSV file on each iteration so each line of data will be used only once by each thread and there won't be any duplicates. When JMeter reaches the end of file it will mean the end of the test.



Answered By - Dmitri T
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing