Reputation: 2404
I need to use JMeter to test an API and this is only info that I got:
method1() Request details:
method2() Request details:
I started with a HTTP Request sampler added pointing to the api server followed by a HTTP header manager as a child with all the header details, however how do I distinguish those 2 methods? As for each of them I should get a different response.
Upvotes: 2
Views: 945
Reputation: 1143
First of all you have to add two HTTP Requests and they should have 'Path' set to method1 and method2 accordingly as you have two request to send.
If headers for that requests are identical then the best way will be to add HTTP Header Manager before the requests and add there all name-value pairs you use. If they are different, then you have at least two ways:
In a matter of fact I pretty much always use variables as values of header parameters for easier configuration (I can set them in CSV files for each ENV I test) but it isn't necessary if you are checking just two requests on one server. If you will be expanding those tests later it is a good idea to parametrise it some way. At least that works for me.
Upvotes: 1
Reputation: 34566
It will be through the field "Path" of your HTTP Request Sampler:
Upvotes: 2