4
votes

Is it possible to specify multiple server(s) in this case REST endpoints to run test on in a Jmeter test plan ? Are there any other API performance testing tool that allows multiple REST endpoints to run test requests concurrently?

I have one ElasticSearch cluster of 2 master nodes (only indexing, searching and REST endpoint exposed to Jmeter client), 3 data nodes (only data storage) and one Jmeter instance.

After testing for a while it dawned on me that I am actually testing performance of a single REST endpoint at any given time from Jmeter and not the collective performance of the master nodes as one can only specify a single server name in BASE_URL field in a jmeter test plan.

After checking online documentation and multiple blogs it looks like either one needs to have a load balancer or use multiple instances of Jmeter clients with multiple BASE_URL's to achieve this.

Stack overflow auto suggestion says this "appears to be a subjective question and is likely to be closed". While I agree on the subjectivity part I am sure there are a lot of folks out there who have faced similar issue and thus inclined to post it in the hope of an answer while I sift through a few more documentations.

Thanks,

d

1
what sampler are you using in Jmeter to run your test? You can set the Server Name or IP parameter of the HttpRequest sampler to whatever you want, so you can have one sampler that hits node A and one sampler that hits node B.mconlin
Initially I was using HTTP Request Defaults, but now following your suggestion I added two HTTP Request Samplers under one thread group with 2 different master node IP's. It works!! thank you so much :)splintercell

1 Answers

0
votes

Yes you can do that with at least 2 ways:

Option 1 If you number of servers is fixed.

Create 1 Thread Group per Target URL and nest in it a HTTP Request Defaults where you change the Server Name or IP:

HTTP Request Defaults

Let the Server Name or IP field empty in HTTP Request

Option 2

If it's acceptable to vary HOST per HTTP Put your URLs in a CSV File and use CSV DataSet and declare variable host in it:

CSV DataSet

And use ${host} variable in Server Name or IP field of HTTP Request

HTTP Request using variable host