0

I have a question related to Apache JMeter testing. I want to send multiple HTTP requests to a single GET endpoint simultanesously (concurrently), that has multiple query parameters, one of them is objectId. I want to make 30 requests concurrently, all the same, except the parameter objectId would be different in each request. I am using plugin "Parallel Controller & Sampler". What is the most efficient way to do this ?

Is it to create 30 HTTP requests separately like this ?

1

Or is there a more efficient way to do this ?

2
  • (1) open apache-jmeter-5.6.3/bin/examples , (2) CSVSample.jmx, (3) CSVSample_actions.csv, (4) CSVSample_user.csv ; (5) This example uses external parameter files (CSVSample_actions.csv, CSVSample_user.csv) as input parameters. (6) CSVSample_user.csv provides the username and password. Commented Oct 1 at 9:57
  • adding to @life888888 comment - 1 HTTP Request, but 30 threads (users). Commented Oct 1 at 14:00

2 Answers 2

0

I would suggest the following:

  1. Use 1 single HTTP Request sampler instead of copying and pasting it 30 times
  2. Parameterize the objectId somehow, i.e. using CSV Data Set Config or a JMeter Function
  3. Use 30 threads in the Thread Group and a Synchronizing Timer to ensure that they're sent at exactly the same moment of time
Sign up to request clarification or add additional context in comments.

Comments

0

Something to note. You appear to want to execute this simultaneously, as in having 30 people in a room with everyone hitting the enter key at the same time to submit a request. if you are trying to represent a natural population this is problematic, as users arrive and depart chaotically. That chaois can sometimes be in short window, such as 300,000 people showing up in two minutes to purchase a limited release album or shoe drop by a celebrity, but it is still not "Simultaneous."

To paraphrase Obiwan, "use the logs, Luke!" Look to your current infrastructure for an expression of the use of this request, or a peer/earlier equivalent. You are going to have some delays between requests of this type. Build a model of what that looks like, either in a raw form, such as 500ms to 2500ms of range, or an actual distribution equation, then place this amount of delay in front of your request.

Execute the 30 thread group as noted above, with each of the users having some amount of delay in front of the request. You will have your concurrency in a natural window. Your risk the other way is you have an unnatural act likely to result in a performance issue that would be a ghost unlikely to ever occur in production.

On the other hand, if you have an engineering requirements where you are required to examine true simultaneity on some code (multiple users, same section of code, same time) due to critical section issues and wanting to better understand the locks and blocks associated with this code, then you can ignore all of my suggestions above.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.