Search code examples
windowsjmeterperformance-testingload-testing

How to make JMETER send a form post to a path with a QUERYSTRING?


I'm using JMeter for some performance testing. I've recorded my test case using the proxy, and am running into a snag trying to replay it.

Basically, I have a HTTP post and its posting to a page that contains a QUERYSTRING.

Sampler Path: http://dev.mysite.com/myform.aspx?formfunction=SEARCH

POST DATA: searchitem=dogs

Issue that I'm running into is that myform.aspx will be passed the post data, but its not returning the expected response. Its returning a response as if the querystring (?formfunction=SEARCH) wasn't even included. Without the querystring, it runs a default SEARCH, but if the querystring is included, it runs a different search with the searchitem included in the post data.

How can I make JMeter recognize the querystring I'm sending in my sampler path??


Solution

  • You could try taking the parameter out of the path, and add it as a post data item below.

    So, in your HTTP request - under "parameters" you should see "searchitem:dogs". click "Add" to create a new parameter, with the name "formfunction" and value "SEARCH"