1
votes

Here is what i tried in the HTTP sampler:

Web Server name <host>
HTTP request PATH <host>

In the send parameters with the request section - I understand we can add as many parameter as we want. Here is what I tried:

{ "customer": {"Name": "TestID1"} }
{ "customer": {"Name": "TestID2"} }

When I run the test, I see TestID1 in my host, but I dont see the TestID2 customer. Can you please guide me to understand how to do send multiple POST request? Thank you

1
Do you want to send on request with two parameters or two requests with one parameter?Christopher Roscoe
2 requests with 2 different parameter. But since the request URL is the same, I didn't want to create two separate HTTP sampler. I want to use 1 http sampler to send 2 request simultaneously.Sashi
I am curious why do you want to do that? Is that how actual browser send the requests?Manish Sapariya

1 Answers

3
votes

What you need is a "User Parameters" Pre Processor. http://jmeter.apache.org/usermanual/component_reference.html#User_Parameters

Add variable name and define User_1 with value "TestID1" and User_2 with value "TestID2". In your HTTP Sampler use parameter customer = ${name} once.

Test plan
  Thread group (2 Threads)
  + User Parameters
  + HTTP Sampler