tags:

views:

58

answers:

1

One step of an application we're testing using JMeter returns an Ajax redirect response, like the following.

<html xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;head&gt;&lt;meta name="Ajax-Response"
content="redirect" /><meta name="Location"
content="/app/nstage.seam?cid=94369" /></head></html>

Any idea how we can instrument JMeter to handle this response, so that it can proceed to the application's next page? Modifying the application's behavior is currently not an attractive option.

+2  A: 

First of all disable "Redirect Automatically" and "Follow Redirects" from the Http Request sampler that will make the post.

Second Add as a child of that sampler a Regular Expression Extractor with regular expression "cid=(\d+)" (without quotes).

Add another http sampler that will make a GET request to the page that you want to be transferd. At "Send Parameters with the request" add a parameter with name "cid" and value #{VARIABLE}, where VARIABLE is the name you assigned at Regular Expression Extractor.

From "View Results Tree" you can see that you will get the page correctly without any VIEWSTATE problems.

Giorgos Sakalis