1

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?

9
  • Why do you need While Controller? Commented Dec 18, 2012 at 10:20
  • Why urls are stored in CSV Data Set Config? Do you mean hostnames by urls? Commented Dec 18, 2012 at 10:25
  • 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. Commented Dec 18, 2012 at 10:31
  • How do you plan to map those urls to HTTP requests? Commented Dec 18, 2012 at 10:35
  • 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. Commented Dec 18, 2012 at 10:58

1 Answer 1

1

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

See:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.