On 11/12/2009, Dirk Olmes <[email protected]> wrote:
> >> I'm setting up load test scenario for a web app that does HTTP meta
> >> refresh. The user enters search criteria into a form and upon submit a
> >> page is returned that has a refresh header, causing the browser to
> >> reload.
> >>
> >> I'm using a while controller that has a child http sampler to poll the
> >> refresh URL. I'm using a regex expression extractor to retrieve the
> >> updated refresh URL from the previous sample.
> >>
> >> Now my question: when the "refresh loop" ends and the result page is
> >> displayed I want to add an assertion that the right page is displayed.
> >> While I can identify the results page, I have no idea where to put the
> >> assertion.
> >>
> >> Any ideas?
> >
> > ...
> > Simple Controller
> > + While Controller
> > + Assertion
> >
> > This should limit the Assertion to the previous sampler.
>
>
> Thanks, for the tip, unfortunately that doesn't work :-( I have this
> right now:
>
> Simple Controller
> + While Controller
> + Regex extractor for next refresh URL
> + Assertion (different one, checks that no error page comes up)
> + Assertion (for results page)
>
> If I run this, the while controller ends immediately because the results
> page assertion fails.
>
Duh! Sorry, forgot that the last assertion would still be in scope for
the while loop sampler. I don't think it's possible to use an
Assertion directly for this.
Try adding another RE in the loop which extracts the desired text; use
a default value which is different from that.
The variable will then contain the default on exit from the while loop
if the RE failed.
To check for this, you could use either:
* a Java Sampler with ${variable} in SampleResult + child Assertion
* If Controller "${variable}" != "default" + child Test Action
> -dirk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]