You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Craig Berry <Cr...@portblue.com> on 2008/01/15 19:34:03 UTC

Large dynamic form handling - post value default from previous form

The pages of my web application often contain dynamically-generated
forms which can be large and complex, with the form field names
themselves being state-dependent.  It would vastly simplify my life if I
could craft a POST that used the existing values of everything on the
previously obtained page form, with just one or two values explicitly
overridden.  Is such a thing possible?

-- 
Craig Berry
Principal Architect, PortBlue Corporation


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


Re: Large dynamic form handling - post value default from previous form

Posted by sebb <se...@gmail.com>.
The Regex Extractor can in theory extract all the names and values
from the form, into variables of the form

VAR_n_g1 and VAR_n_g2

where n=1,2,3 and g1 and g2 are the contents of the 1st and 2nd capture groups.

You can then use these as POST parameters.

If you are able to write Java, you may find it easier to write a
BeanShell Pre-Processor (which has access to the current sampler and
previous sample) and use that to update the sample directly.

You may be able to use the JDom or HtmlParser libraries to help with
parsing the HTML.

It's not going to be trivial.

S///
On 15/01/2008, Craig Berry <Cr...@portblue.com> wrote:
> The pages of my web application often contain dynamically-generated
> forms which can be large and complex, with the form field names
> themselves being state-dependent.  It would vastly simplify my life if I
> could craft a POST that used the existing values of everything on the
> previously obtained page form, with just one or two values explicitly
> overridden.  Is such a thing possible?
>
> --
> Craig Berry
> Principal Architect, PortBlue Corporation
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

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