2
votes

i have a strange issue. I am testing different group rights of members on a website with JMeter and i have solved the tasks which appeared, for know.

A "http request" which has to "POST" some parameters (4 names, 3 values) doesn't work and has strange behaviors.

I inspect the network dialog of the browser (firefox dev or IE) when i request the new page with the selected parameters and get the following information: i have 4 parameters, the first has no value and the other 3 have always the same values. The parameter names are in uppercase. The Status is 302 Moved Temporarily and not 200. And i get the expected site.

When i insert these parameters in JMeter (or by value of regex extractor) and set the "http request" to "POST", "Follow Redirects", "Use Keep Alive", JMeter is send to the url where it comes from and the "http request" shows me a "GET" request in the "Result Tree". The Status is 200.

When i write the parameter names in lowercase, JMeter is also send back to the previous url but the "Result Tree" has "POST" in the request with the lowercase parameters. The Status is 200.

When i disable "Follow Redirects", the uppercase parameters get no Response (no html code), but now they were "POST" in the "Result Tree" and have the Status 302 Moved Temporarily.

When i disable "Follow Redirects", the lowercase parameters are still redirecting me to the previous site, the Status is 200.

I don't know why this happens and how i have to handle with JMeter to get to the expected site.

2
How the site redirect? Using javascript?user7294900
No, it is not redirected by js. I don't know why, but it works today. I was sent back to the previous page the last two days, but today i get the correct redirect. A teammate who is more in the page code also doesn't know why it hasn't worked the last day and why it works now. Nothing has changed...Foxxytrooper

2 Answers

1
votes

If you are uncertain about how to simulate this or that action - just record it using JMeter's built-in HTTP(S) Test Script Recorder or JMeter Chrome Extension, both are smart enough to automatically detect the required redirect configuration and will generate the relevant HTTP Request samplers.

0
votes

If your redirect is executed in javascript you can't expect Jmeter to execute it:

JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does

See Jmeter