You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Sebastian Straus <su...@gmx.de> on 2007/09/06 14:47:00 UTC

Dynamic number of variables

It’s me again. And i’ve got the following problem: I want to put a dynamic number of parameters in my HTTP Request. That means, depending on the number of parameters I get from my former HTTP-Request as response, i have to put them in a new Request.
And here is my question: How is it possible to put a ever-changing number of Parameters to a HTTP Request?
And is there a possibility to solve this problem with Bean Shell?

Pertaining to my last question: Thank you sebb, you gave me an answer which helped me to find a solution.

With best regards 

Sebastian

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail


Re: Dynamic number of variables

Posted by André van Hoorn <An...@Informatik.Uni-Oldenburg.DE>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Sebastian,

Sebastian Straus schrieb:
> It’s me again. And i’ve got the following problem: I want to put a
> dynamic number of parameters in my HTTP Request. That means,
> depending on the number of parameters I get from my former
> HTTP-Request as response, i have to put them in a new Request. And
> here is my question: How is it possible to put a ever-changing number
> of Parameters to a HTTP Request? And is there a possibility to solve
> this problem with Bean Shell?

a *very dirty* hack would putting a string with additional
parameter/value pairs separated by '&' into the value field of a request
parameter. This string could be stored into a variable the value of
which is dynamically generated in each iteration (using
pre-/post-processors).

Example: parameter "param1"
         value     "val1&param2=value2&param3=value3".

I just tried it and it worked for me. Of course, this does only work for
the GET method.

André


> 
> Pertaining to my last question: Thank you sebb, you gave me an answer
> which helped me to find a solution.
> 
> With best regards
> 
> Sebastian
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org 
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org

- --
 André van Hoorn
 Birkenweg 21
 D-26725 Emden

 Telefon:  +49 (4921) 954231
 E-Mail:   Andre.van.Hoorn@Informatik.Uni-Oldenburg.DE
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG3/puLKwmE5jzZmkRAvLVAKC9cJ+R+K64tmdZ/omFxyhPomZMnQCghTIh
yIwAz9bZ+JIDCfuk6W6GVtM=
=D/bB
-----END PGP SIGNATURE-----

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


Re: Dynamic number of variables

Posted by sebb <se...@gmail.com>.
On 06/09/07, Sebastian Straus <su...@gmx.de> wrote:
> It's me again. And i've got the following problem: I want to put a dynamic number of parameters in my HTTP Request. That means, depending on the number of parameters I get from my former HTTP-Request as response, i have to put them in a new Request.
> And here is my question: How is it possible to put a ever-changing number of Parameters to a HTTP Request?
> And is there a possibility to solve this problem with Bean Shell?

Check the archives - this was discussed yesterday...

> Pertaining to my last question: Thank you sebb, you gave me an answer which helped me to find a solution.
>
> With best regards
>
> Sebastian
>
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>
>
> ---------------------------------------------------------------------
> 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