splintercell
splintercell

Reputation: 575

Can you specify multiple rest endpoints in a jmeter test plan?

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

Upvotes: 4

Views: 3645

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34516

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

Upvotes: 0

Related Questions