I have an HTTP request which contains messages (json body). I need to achieve 1000 messages/sec throughout the load test. But I also need to randomize the number of messages (with different combinations like 100 messages in one HTTP Request, 200 and 300 etc.). Could anyone please let me know how can we achieve this in JMeter or Load Runner? My concern is that at any point, the maximum number of messages sent should not exceed 1000/sec.
3 Answers
To control message rate, you can use Throughput Shaping Timer
To send different type of messages you can use a CSV file and use component CSV DataSet to load it and read each line as a message into variable (let’s say you call it varName) which you can then use as ${varName} ad body of Http Request
1000 messages/sec throughout
LoadRunner - cannot be done (you can try to achieve this using Pacing but anyway it will mostly depend on your application response time)
JMeter - you can use one of the following:
Random number of messages in the request body payload: in both tools you will have to write some code for this, in LoadRunner you basically have to write the code for everything, in JMeter you can add JSR223 PreProcessor and use Groovy language for message payload creation