1
votes

I have an application for load testing. I am using JMeter for this purpose. I have added CSV Data Set Config to the While Controller where former reads URL from a csv file. Also, I have added a HTTP request sampler inside the controller.

Now, I have both get and post requests . In addition to that, I have to send file data with few http post requests. Is there a way so that jmeter can decide http request type automatically and create a request accordingly?

Should I create separate While Controller for both GET and POST requests?

1
Why do you need While Controller?Andrei Botalov
Why urls are stored in CSV Data Set Config? Do you mean hostnames by urls?Andrei Botalov
I am storing host and path in csv file,i.e. host,path. It is required that i have to test all the urls. Also, I have to provide a csv file so that more urls can be added later.abhijeet
How do you plan to map those urls to HTTP requests?Andrei Botalov
In the HTTP Request, I have added ${URL} in the host and ${PATH} in the path. HTTP Request reads from the csv file and URL and PATH are set by CSV Data Set Config.abhijeet

1 Answers

1
votes

You could add method field (post,get) and use an IfController to eithet call a post or get depending on method value.

See: