You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jan Hoskens <jh...@schaubroeck.be> on 2004/05/11 10:02:11 UTC
Html request paramters
Hi,
When receiving a html form, there may be some values already filled in. Is
there an easy way to retreive those values in order to use them in the next
html request. I've noticed the "Regular expression extractor", is this the
way to go? If so, how do I match with the complete <input name="input1"
type="text" value="value1"/> and retreive the value1?
Or are the request parameters somehow already available as ${input1} (maybe
through using another component??).
I'm using JMeter 2.0.
Kind Regards,
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: User parameters
Posted by Sebastian Bazley <se...@apache.org>.
Try using either of the following functions instead:
_StringFromFile()
__CSVRead()
Check the JMeter FAQ for documentation on parameterising test plans.
S.
----- Original Message -----
From: "Marco Mistroni" <mm...@waersystems.com>
To: "'JMeter Users List'" <jm...@jakarta.apache.org>
Sent: Tuesday, May 11, 2004 12:27 PM
Subject: User parameters
> Hi all,
> I m currently experiencing some problems with user parameters..
> I have defined my parameters in user.xml file..
> However after having done that, I realized that one parameter named
> 'buttonSelected' has to have a completely different value in some test
> cases...
> Since that case is 1 out of 10 tests, I decided that for that case I
> would define an user parameter within my testplan.
> However, In that particular test plan I need to have values from both
> users.xml and the user parameter defined, and it looks like they are
> Overriding each other (the user parameters are overridden by what has
> been
> Specified in users.xml)
>
> Are there any solution for avoiding the 'clash'?
>
> Thanx and regards
> marco
>
>
> ---------------------------------------------------------------------
> 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
User parameters
Posted by Marco Mistroni <mm...@waersystems.com>.
Hi all,
I m currently experiencing some problems with user parameters..
I have defined my parameters in user.xml file..
However after having done that, I realized that one parameter named
'buttonSelected' has to have a completely different value in some test
cases...
Since that case is 1 out of 10 tests, I decided that for that case I
would define an user parameter within my testplan.
However, In that particular test plan I need to have values from both
users.xml and the user parameter defined, and it looks like they are
Overriding each other (the user parameters are overridden by what has
been
Specified in users.xml)
Are there any solution for avoiding the 'clash'?
Thanx and regards
marco
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Html request paramters
Posted by Jan Hoskens <jh...@schaubroeck.be>.
I also tried the regular expression extractor, but I did not find a way to
make that work. I then looked at functions, with the function helper dialog
under the options menu.
You have to fill in 6 fields and then generate the function:
1) <input type="text" name="inputId" value="(.*)">
2) $1$
3) 1
4)
5) 1
6) inputId
That will give something like:
${__regexFunction(<input type="text" name="inputId"
value="(.*)">,$1$,1,,1,inputId)}
Paste that into the parameter field (actually wherever you want) and the
second time you want to use the value in the same request, use the id you
gave in the function: ${inputId}
There's some explanation in the userdocs with jmeter too, look for functions
in the index.
Kind Regards,
Jan
----- Original Message -----
From: "Marco Mistroni" <mm...@waersystems.com>
To: "'JMeter Users List'" <jm...@jakarta.apache.org>
Sent: Tuesday, May 11, 2004 11:48 AM
Subject: RE: Html request paramters
> Hi Jan,
> I m having problems with regexp.. can you tell me exactly
> How to use it?
> I have followed JMeter FAQs, I have a response that contains following
> Two strings
>
> S000000000
> S000000140
>
> And the one that I am interested to is the second (S00000140)
>
> I have httprequest1 which produces the response with the abovementioned
> strings
> I have httprequest2 which should extract the string and use it as input
> parameter
>
> Questions:
> 1 - do the two requests have to be under a 'controller'?
> 2 - how to specify the regexp? Currently I am specifying a regular
> expression extractor, and I am specifying following value in
> the regular expression field
>
> containerID=S[0]{1,6}1..
>
> when I remove 'containerID=' I got a null value..
> do I have to specify the left side of the assignment?
> Or it's enough to write S[0]{1,6}1..
>
> Trouble is that I have run the request in the Jakarta ORO demo, and it
> Works perfectly fine....
>
> Thanx in advance and regards
> marco
>
>
>
>
>
> -----Original Message-----
> From: Jan Hoskens [mailto:jh@schaubroeck.be]
> Sent: 11 May 2004 09:29
> To: JMeter Users List
> Subject: Re: Html request paramters
>
> I found the regexfunction, this does work fine now. I still wonder if
> there
> isn't a way to just make every input available with it's default value
> given.
>
> Kind Regards,
> Jan
>
>
> ----- Original Message -----
> From: "Jan Hoskens" <jh...@schaubroeck.be>
> To: <jm...@jakarta.apache.org>
> Sent: Tuesday, May 11, 2004 10:02 AM
> Subject: Html request paramters
>
>
> > Hi,
> >
> > When receiving a html form, there may be some values already filled
> in. Is
> > there an easy way to retreive those values in order to use them in the
> next
> > html request. I've noticed the "Regular expression extractor", is this
> the
> > way to go? If so, how do I match with the complete <input
> name="input1"
> > type="text" value="value1"/> and retreive the value1?
> >
> > Or are the request parameters somehow already available as ${input1}
> (maybe
> > through using another component??).
> >
> > I'm using JMeter 2.0.
> >
> > Kind Regards,
> > Jan
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> 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
RE: Html request paramters
Posted by Marco Mistroni <mm...@waersystems.com>.
Hi Jan,
I m having problems with regexp.. can you tell me exactly
How to use it?
I have followed JMeter FAQs, I have a response that contains following
Two strings
S000000000
S000000140
And the one that I am interested to is the second (S00000140)
I have httprequest1 which produces the response with the abovementioned
strings
I have httprequest2 which should extract the string and use it as input
parameter
Questions:
1 - do the two requests have to be under a 'controller'?
2 - how to specify the regexp? Currently I am specifying a regular
expression extractor, and I am specifying following value in
the regular expression field
containerID=S[0]{1,6}1..
when I remove 'containerID=' I got a null value..
do I have to specify the left side of the assignment?
Or it's enough to write S[0]{1,6}1..
Trouble is that I have run the request in the Jakarta ORO demo, and it
Works perfectly fine....
Thanx in advance and regards
marco
-----Original Message-----
From: Jan Hoskens [mailto:jh@schaubroeck.be]
Sent: 11 May 2004 09:29
To: JMeter Users List
Subject: Re: Html request paramters
I found the regexfunction, this does work fine now. I still wonder if
there
isn't a way to just make every input available with it's default value
given.
Kind Regards,
Jan
----- Original Message -----
From: "Jan Hoskens" <jh...@schaubroeck.be>
To: <jm...@jakarta.apache.org>
Sent: Tuesday, May 11, 2004 10:02 AM
Subject: Html request paramters
> Hi,
>
> When receiving a html form, there may be some values already filled
in. Is
> there an easy way to retreive those values in order to use them in the
next
> html request. I've noticed the "Regular expression extractor", is this
the
> way to go? If so, how do I match with the complete <input
name="input1"
> type="text" value="value1"/> and retreive the value1?
>
> Or are the request parameters somehow already available as ${input1}
(maybe
> through using another component??).
>
> I'm using JMeter 2.0.
>
> Kind Regards,
> Jan
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Html request paramters
Posted by Jan Hoskens <jh...@schaubroeck.be>.
I found the regexfunction, this does work fine now. I still wonder if there
isn't a way to just make every input available with it's default value
given.
Kind Regards,
Jan
----- Original Message -----
From: "Jan Hoskens" <jh...@schaubroeck.be>
To: <jm...@jakarta.apache.org>
Sent: Tuesday, May 11, 2004 10:02 AM
Subject: Html request paramters
> Hi,
>
> When receiving a html form, there may be some values already filled in. Is
> there an easy way to retreive those values in order to use them in the
next
> html request. I've noticed the "Regular expression extractor", is this the
> way to go? If so, how do I match with the complete <input name="input1"
> type="text" value="value1"/> and retreive the value1?
>
> Or are the request parameters somehow already available as ${input1}
(maybe
> through using another component??).
>
> I'm using JMeter 2.0.
>
> Kind Regards,
> Jan
>
> ---------------------------------------------------------------------
> 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