You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Adam Griffiths <ao...@gmail.com> on 2005/06/01 14:58:03 UTC

Modifying paramters / variables

Hi

How can I get JMeter to test (and time) the following:

1) Request a page that causes a some work to begin on the server
2) The severe responds with some HTML including:
<META HTTP-EQUIV=REFRESH CONTENT="0;URL=pleasewait.jsp">
3) JMeter should repeatedly do this refresh until;
4) The server sends a redirect
5) JMeter should then follow this redirect

I can easily do step 1, I could use a regexp to parse out the refresh
page in step 2 'pleasewait.jsp', i am unsure how to then repeatedly
follow subsequent META HTTP-EQUIV=REFRESH's and then break out of this
loop and follow a final redirect.

Any help or suggestions would be greatly appreciated.

Thanks

Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Modifying paramters / variables

Posted by sebb <se...@gmail.com>.
On 6/1/05, Adam Griffiths <ao...@gmail.com> wrote:
> Hi
> 
> How can I get JMeter to test (and time) the following:
> 
> 1) Request a page that causes a some work to begin on the server
> 2) The severe responds with some HTML including:
> <META HTTP-EQUIV=REFRESH CONTENT="0;URL=pleasewait.jsp">
> 3) JMeter should repeatedly do this refresh until;
> 4) The server sends a redirect
> 5) JMeter should then follow this redirect
> 
> I can easily do step 1, I could use a regexp to parse out the refresh
> page in step 2 'pleasewait.jsp', i am unsure how to then repeatedly
> follow subsequent META HTTP-EQUIV=REFRESH's and then break out of this
> loop and follow a final redirect.

The WhileController can help here, see:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#While_Controller


HTTPSampler start work (0)
WhileController (LAST)
  HTTPSampler pleasewait.jsp (1)
    Assertion matches REFRESH
[end of While]
HTTPSampler of redirect location (2)

Try this initially with hard-coded URLs for the redirect and refresh,
and make sure redirects are not followed at (1), unless you are sure
that the redirect URL does not have a refresh as well. In which case I
think you can omit the sampler at (2).

If the refresh URL varies between runs, you will need to add a Regex
Extractor (RE) after sampler (0) - and again after (1) if it varies
further!

If the Redirect varies, and following it does not work, you'll need to
add an RE after sampler 1 and before the Assertion

You need to use 2.0.3 for the While Controller to work, as the version
in 2.0.2 did not work very well.

S.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org