Reputation: 54094
I am looking into whether I can use JMeter
for load testing of a server.
I read that I can set it up as proxy to "record" a flow but I am not sure on the following.
Assume that I record a flow for 1 user which is like the following:
HTTP-1 req <data>
HTTP-1 reply
HTTP-2 req <data>
HTTP-2 reply
HTTP-3 req <data>
HTTP-3 reply
Now in the data
which is an XML
fragment there is an item that is unique for each user e.g. <user-id>AAA1</user-id>
Question: Once the flow has been "recorded" and I want to simulate e.g. 50 concurrent users against my real server, is it possible each "user" to send the data
with a separate/different user-id
? E.g. for first user it will be AAA1
as in the test case. For second user it will be AAA2
etc?
Upvotes: 0
Views: 224
Reputation: 34566
JMeter can do this.
To send a different user-id:
Use a CSV Data Set config, in it declare userId as a var , set sharing to all threads
For each HTTP-N req , Use HTTP Sampler with Post Body mode, and use userId as a var : ${userId} in XML body
Depending on wether you use or not HTTP Session add a Cookie Manager
Upvotes: 1