You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sudheer reddy <gs...@gmail.com> on 2008/10/21 18:17:55 UTC
how to use JDBC request variables in HTTP requests
How to use JDBC request defaults in other requests
I have written a sql query in JDBC request and I got the result but i don't
know how to use this variable in other HTTP request.
scenario
using JDBC request i have got result which is assigned to a variable say '*
A'.*
**
Now I have to use this '*A' *in HTTP request for a parameter say ' *X* ' .
I have associated a Regular expression extractor to this JDBC request and
given values in this post processor as given below
*reference name : variable*
*regular expression : (.*)"*
*template : $1$*
*match number : 1*
*default value : error*
**
*here reference name and the variable name in JDBC request is same*
**
and in HTTP request for a parameter
*number : ${variable}*
**
when i run the test and check the response data this parameter in HTTP
request is taking default value of regular expression instead of JDBC
variable.
Assist me in solving ths issue
rgds
Sudheer
**
Re: how to use JDBC request variables in HTTP requests
Posted by sudheer reddy <gs...@gmail.com>.
ok
i have send it.
On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
>
> Send me ur test plan as attachment to personal mail ID
> rav.gupta@gmail.com
>
> 2008/10/22 sudheer reddy <gs...@gmail.com>
>
> > ok i have done as u told but am not successfull
> >
> > her with am sending u the snap shots of my plan
> >
> > regular expression sheet and also http request
> >
> >
> >
> >
> > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> >>
> >> use jdbc request as following
> >>
> >> -your JDBC request
> >> ------Add post processor(regular expression exctractor to it) - should
> be
> >> child of JDBC request.
> >> -Your HTTP request (pass variable of regex to it).
> >>
> >> it should work
> >>
> >>
> >> On Wed, Oct 22, 2008 at 12:41 PM, sudheer reddy <gsudheer.08@gmail.com
> >> >wrote:
> >>
> >> > I have given variable in JDBC request as WTPARTNUMBER
> >> >
> >> > so in response is WTPARTNUMBER xxxxxxx
> >> >
> >> > and the response is correct
> >> >
> >> >
> >> > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> >> > >
> >> > > What is the response of ur JDBC request?
> >> > >
> >> > > On Wed, Oct 22, 2008 at 12:23 PM, sudheer reddy <
> >> gsudheer.08@gmail.com
> >> > > >wrote:
> >> > >
> >> > > > Hi Ravindra
> >> > > >
> >> > > > thanks for ur reply.
> >> > > >
> >> > > > Do I have to cange any in the Jmeter properties file.
> >> > > >
> >> > > > it will be helpful for me if u give me some detailed
> >> information how
> >> > to
> >> > > > workout with this with some example.
> >> > > >
> >> > > > this is my scenario
> >> > > >
> >> > > > in JDBC request i got the result frrom database now i have to use
> >> this
> >> > > > result in another HTTP request
> >> > > >
> >> > > > I have associated a Regular expression extractor to this JDBC
> >> > > request and
> >> > > > given values in this post processor as given below
> >> > > >
> >> > > > *reference name : variable*
> >> > > > *regular expression : (.*)"*
> >> > > > *template : $1$*
> >> > > > *match number : 1*
> >> > > > *default value : error*
> >> > > > **
> >> > > > *here reference name and the variable name in JDBC request is
> same*
> >> > > > **
> >> > > > and in HTTP request for a parameter
> >> > > >
> >> > > > *number : ${variable}*
> >> > > > **
> >> > > > when i run the test and check the response data this parameter
> in
> >> > HTTP
> >> > > > request is taking default value of regular expression instead of
> >> JDBC
> >> > > > variable.
> >> > > >
> >> > > > rgds
> >> > > > Sudheer
> >> > > >
> >> > > >
> >> > > > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> >> > > > >
> >> > > > > it works for JDBC request also...there must be smthing wrong
> with
> >> > your
> >> > > > > regex
> >> > > > >
> >> > > > > On Wed, Oct 22, 2008 at 12:05 PM, sudheer reddy <
> >> > gsudheer.08@gmail.com
> >> > > > > >wrote:
> >> > > > >
> >> > > > > > Hi sebb
> >> > > > > >
> >> > > > > > I have tried to fix the problem but not successful.
> >> > > > > >
> >> > > > > > Regular expression extractor is working fine with HTTP request
> >> but
> >> > > for
> >> > > > > JDBC
> >> > > > > > request it is taking default value.
> >> > > > > >
> >> > > > > > can you suggest a solution for this please.
> >> > > > > >
> >> > > > > > thanks
> >> > > > > >
> >> > > > > > rgds
> >> > > > > > Sudheer
> >> > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > >
> >> > > > > > On 10/21/08, sebb <se...@gmail.com> wrote:
> >> > > > > > >
> >> > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> >> > > > > > > > ok sebb
> >> > > > > > > > can u suggest another method for using this JDBC request
> >> > result
> >> > > > in
> >> > > > > > HTTP
> >> > > > > > > > request.
> >> > > > > > > >
> >> > > > > > >
> >> > > > > > > No.
> >> > > > > > >
> >> > > > > > > It is definitely possible to extract results from JDBC
> >> samplers;
> >> > > the
> >> > > > > > > way you have described it is the way I would have suggested
> >> doing
> >> > > it,
> >> > > > > > > so you just need to fix whatever is wrong...
> >> > > > > > >
> >> > > > > > > If the JDBC response data shows up in the View Results Tree
> >> > > Listener
> >> > > > -
> >> > > > > > > I assume you have checked this? - then the RE PP can extract
> >> it.
> >> > > > > > >
> >> > > > > > > >
> >> > > > > > > > On Tue, Oct 21, 2008 at 10:33 PM, sebb <sebbaz@gmail.com
> >
> >> > > wrote:
> >> > > > > > > >
> >> > > > > > > > > In that case the only possibility is that the RE is
> >> wrong.
> >> > > > > > > > >
> >> > > > > > > > > Is it possible that there is trailing/leading
> white-space
> >> in
> >> > > the
> >> > > > > RE
> >> > > > > > > > > field? This might cause a match failure.
> >> > > > > > > > >
> >> > > > > > > > > BTW, for testing REs, the Java Request can be useful -
> >> just
> >> > > put
> >> > > > > some
> >> > > > > > > > > sample text in the ResultData field (this will be the
> >> Body
> >> > of
> >> > > > the
> >> > > > > > > > > response).
> >> > > > > > > > >
> >> > > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> >> wrote:
> >> > > > > > > > > > *Body*
> >> > > > > > > > > >
> >> > > > > > > > > >
> >> > > > > > > > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <
> >> sebbaz@gmail.com
> >> > >
> >> > > > > wrote:
> >> > > > > > > > > >
> >> > > > > > > > > > > And which "Response Field to check" is selected?
> >> > > > > > > > > > >
> >> > > > > > > > > > > On 21/10/2008, sudheer reddy <
> gsudheer.08@gmail.com
> >> >
> >> > > > wrote:
> >> > > > > > > > > > > > Sebb
> >> > > > > > > > > > > >
> >> > > > > > > > > > > > yes you are right it is JDBC request only.
> >> > > > > > > > > > > >
> >> > > > > > > > > > > > I have used Regular expression extractor PP
> >> > > > > > > > > > > >
> >> > > > > > > > > > > > as a child to JDBC request.
> >> > > > > > > > > > > >
> >> > > > > > > > > > > > rgds
> >> > > > > > > > > > > > Sudheer
> >> > > > > > > > > > > >
> >> > > > > > > > > > > >
> >> > > > > > > > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <
> >> > > sebbaz@gmail.com
> >> > > > >
> >> > > > > > > wrote:
> >> > > > > > > > > > > >
> >> > > > > > > > > > > > > On 21/10/2008, sudheer reddy <
> >> > gsudheer.08@gmail.com
> >> > > >
> >> > > > > > wrote:
> >> > > > > > > > > > > > > > How to use JDBC request defaults in other
> >> > > requests
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > There is no such element as a JDBC Request
> >> > Default.
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > There is a JDBC Connection Configuration
> >> element
> >> > > which
> >> > > > > can
> >> > > > > > > only
> >> > > > > > > > > be
> >> > > > > > > > > > > > > used in a JDBC Request sampler.
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > > I have written a sql query in JDBC request
> >> and
> >> > I
> >> > > > got
> >> > > > > > the
> >> > > > > > > > > result but
> >> > > > > > > > > > > i
> >> > > > > > > > > > > > > don't
> >> > > > > > > > > > > > > > know how to use this variable in other
> HTTP
> >> > > > request.
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > scenario
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > using JDBC request i have got result which
> >> is
> >> > > > > assigned
> >> > > > > > to
> >> > > > > > > a
> >> > > > > > > > > > > variable say
> >> > > > > > > > > > > > > '*
> >> > > > > > > > > > > > > > A'.*
> >> > > > > > > > > > > > > > **
> >> > > > > > > > > > > > > > Now I have to use this '*A' *in HTTP
> request
> >> > for
> >> > > a
> >> > > > > > > parameter
> >> > > > > > > > > say '
> >> > > > > > > > > > > *X* '
> >> > > > > > > > > > > > > .
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > I have associated a Regular expression
> >> > extractor
> >> > > to
> >> > > > > > this
> >> > > > > > > JDBC
> >> > > > > > > > > > > request
> >> > > > > > > > > > > > > and
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > What do you mean by "associated" ?
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > > given values in this post processor as
> given
> >> > > below
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > *reference name : variable*
> >> > > > > > > > > > > > > > *regular expression : (.*)"*
> >> > > > > > > > > > > > > > *template : $1$*
> >> > > > > > > > > > > > > > *match number : 1*
> >> > > > > > > > > > > > > > *default value : error*
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > Looks OK.
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > > **
> >> > > > > > > > > > > > > > *here reference name and the variable name
> >> in
> >> > > JDBC
> >> > > > > > > request is
> >> > > > > > > > > same*
> >> > > > > > > > > > > > > > **
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > JMeter variables are not related in any way
> to
> >> SQL
> >> > > > > names.
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > > and in HTTP request for a parameter
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > *number : ${variable}*
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > OK
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > > **
> >> > > > > > > > > > > > > > when i run the test and check the
> response
> >> > data
> >> > > > > this
> >> > > > > > > > > parameter in
> >> > > > > > > > > > > HTTP
> >> > > > > > > > > > > > > > request is taking default value of regular
> >> > > > expression
> >> > > > > > > instead
> >> > > > > > > > > of
> >> > > > > > > > > > > JDBC
> >> > > > > > > > > > > > > > variable.
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > That means the RE PostProcessor has been run
> >> OK,
> >> > and
> >> > > > the
> >> > > > > > > HTTP
> >> > > > > > > > > sampler
> >> > > > > > > > > > > > > used the correct variable, but the RE PP was
> >> > either
> >> > > > > > applied
> >> > > > > > > to
> >> > > > > > > > > the
> >> > > > > > > > > > > > > wrong input or the RE was incorrect. Given
> that
> >> > the
> >> > > RE
> >> > > > > is
> >> > > > > > > very
> >> > > > > > > > > simple,
> >> > > > > > > > > > > > > it's probably because the RE PP was applied
> to
> >> the
> >> > > > wrong
> >> > > > > > > input.
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > Did you add the RE PP as a child of the JDBC
> >> > > Sampler?
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > > > > Assist me in solving ths issue
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > > > rgds
> >> > > > > > > > > > > > > > Sudheer
> >> > > > > > > > > > > > > > **
> >> > > > > > > > > > > > > >
> >> > > > > > > > > > > > >
> >> > > > > > > > > > > >
> >> > > > > > > > > > > > >
> >> > > > > > > > >
> >> > > > > >
> >> > ---------------------------------------------------------------------
> >> > > > > > > > > > > > > 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
> >> > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
>
Re: how to use JDBC request variables in HTTP requests
Posted by Ravindra Gupta <ra...@gmail.com>.
Send me ur test plan as attachment to personal mail ID
rav.gupta@gmail.com
2008/10/22 sudheer reddy <gs...@gmail.com>
> ok i have done as u told but am not successfull
>
> her with am sending u the snap shots of my plan
>
> regular expression sheet and also http request
>
>
>
>
> On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
>>
>> use jdbc request as following
>>
>> -your JDBC request
>> ------Add post processor(regular expression exctractor to it) - should be
>> child of JDBC request.
>> -Your HTTP request (pass variable of regex to it).
>>
>> it should work
>>
>>
>> On Wed, Oct 22, 2008 at 12:41 PM, sudheer reddy <gsudheer.08@gmail.com
>> >wrote:
>>
>> > I have given variable in JDBC request as WTPARTNUMBER
>> >
>> > so in response is WTPARTNUMBER xxxxxxx
>> >
>> > and the response is correct
>> >
>> >
>> > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
>> > >
>> > > What is the response of ur JDBC request?
>> > >
>> > > On Wed, Oct 22, 2008 at 12:23 PM, sudheer reddy <
>> gsudheer.08@gmail.com
>> > > >wrote:
>> > >
>> > > > Hi Ravindra
>> > > >
>> > > > thanks for ur reply.
>> > > >
>> > > > Do I have to cange any in the Jmeter properties file.
>> > > >
>> > > > it will be helpful for me if u give me some detailed
>> information how
>> > to
>> > > > workout with this with some example.
>> > > >
>> > > > this is my scenario
>> > > >
>> > > > in JDBC request i got the result frrom database now i have to use
>> this
>> > > > result in another HTTP request
>> > > >
>> > > > I have associated a Regular expression extractor to this JDBC
>> > > request and
>> > > > given values in this post processor as given below
>> > > >
>> > > > *reference name : variable*
>> > > > *regular expression : (.*)"*
>> > > > *template : $1$*
>> > > > *match number : 1*
>> > > > *default value : error*
>> > > > **
>> > > > *here reference name and the variable name in JDBC request is same*
>> > > > **
>> > > > and in HTTP request for a parameter
>> > > >
>> > > > *number : ${variable}*
>> > > > **
>> > > > when i run the test and check the response data this parameter in
>> > HTTP
>> > > > request is taking default value of regular expression instead of
>> JDBC
>> > > > variable.
>> > > >
>> > > > rgds
>> > > > Sudheer
>> > > >
>> > > >
>> > > > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
>> > > > >
>> > > > > it works for JDBC request also...there must be smthing wrong with
>> > your
>> > > > > regex
>> > > > >
>> > > > > On Wed, Oct 22, 2008 at 12:05 PM, sudheer reddy <
>> > gsudheer.08@gmail.com
>> > > > > >wrote:
>> > > > >
>> > > > > > Hi sebb
>> > > > > >
>> > > > > > I have tried to fix the problem but not successful.
>> > > > > >
>> > > > > > Regular expression extractor is working fine with HTTP request
>> but
>> > > for
>> > > > > JDBC
>> > > > > > request it is taking default value.
>> > > > > >
>> > > > > > can you suggest a solution for this please.
>> > > > > >
>> > > > > > thanks
>> > > > > >
>> > > > > > rgds
>> > > > > > Sudheer
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > >
>> > > > > > On 10/21/08, sebb <se...@gmail.com> wrote:
>> > > > > > >
>> > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
>> > > > > > > > ok sebb
>> > > > > > > > can u suggest another method for using this JDBC request
>> > result
>> > > > in
>> > > > > > HTTP
>> > > > > > > > request.
>> > > > > > > >
>> > > > > > >
>> > > > > > > No.
>> > > > > > >
>> > > > > > > It is definitely possible to extract results from JDBC
>> samplers;
>> > > the
>> > > > > > > way you have described it is the way I would have suggested
>> doing
>> > > it,
>> > > > > > > so you just need to fix whatever is wrong...
>> > > > > > >
>> > > > > > > If the JDBC response data shows up in the View Results Tree
>> > > Listener
>> > > > -
>> > > > > > > I assume you have checked this? - then the RE PP can extract
>> it.
>> > > > > > >
>> > > > > > > >
>> > > > > > > > On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com>
>> > > wrote:
>> > > > > > > >
>> > > > > > > > > In that case the only possibility is that the RE is
>> wrong.
>> > > > > > > > >
>> > > > > > > > > Is it possible that there is trailing/leading white-space
>> in
>> > > the
>> > > > > RE
>> > > > > > > > > field? This might cause a match failure.
>> > > > > > > > >
>> > > > > > > > > BTW, for testing REs, the Java Request can be useful -
>> just
>> > > put
>> > > > > some
>> > > > > > > > > sample text in the ResultData field (this will be the
>> Body
>> > of
>> > > > the
>> > > > > > > > > response).
>> > > > > > > > >
>> > > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
>> wrote:
>> > > > > > > > > > *Body*
>> > > > > > > > > >
>> > > > > > > > > >
>> > > > > > > > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <
>> sebbaz@gmail.com
>> > >
>> > > > > wrote:
>> > > > > > > > > >
>> > > > > > > > > > > And which "Response Field to check" is selected?
>> > > > > > > > > > >
>> > > > > > > > > > > On 21/10/2008, sudheer reddy <gsudheer.08@gmail.com
>> >
>> > > > wrote:
>> > > > > > > > > > > > Sebb
>> > > > > > > > > > > >
>> > > > > > > > > > > > yes you are right it is JDBC request only.
>> > > > > > > > > > > >
>> > > > > > > > > > > > I have used Regular expression extractor PP
>> > > > > > > > > > > >
>> > > > > > > > > > > > as a child to JDBC request.
>> > > > > > > > > > > >
>> > > > > > > > > > > > rgds
>> > > > > > > > > > > > Sudheer
>> > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <
>> > > sebbaz@gmail.com
>> > > > >
>> > > > > > > wrote:
>> > > > > > > > > > > >
>> > > > > > > > > > > > > On 21/10/2008, sudheer reddy <
>> > gsudheer.08@gmail.com
>> > > >
>> > > > > > wrote:
>> > > > > > > > > > > > > > How to use JDBC request defaults in other
>> > > requests
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > There is no such element as a JDBC Request
>> > Default.
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > There is a JDBC Connection Configuration
>> element
>> > > which
>> > > > > can
>> > > > > > > only
>> > > > > > > > > be
>> > > > > > > > > > > > > used in a JDBC Request sampler.
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > > I have written a sql query in JDBC request
>> and
>> > I
>> > > > got
>> > > > > > the
>> > > > > > > > > result but
>> > > > > > > > > > > i
>> > > > > > > > > > > > > don't
>> > > > > > > > > > > > > > know how to use this variable in other HTTP
>> > > > request.
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > scenario
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > using JDBC request i have got result which
>> is
>> > > > > assigned
>> > > > > > to
>> > > > > > > a
>> > > > > > > > > > > variable say
>> > > > > > > > > > > > > '*
>> > > > > > > > > > > > > > A'.*
>> > > > > > > > > > > > > > **
>> > > > > > > > > > > > > > Now I have to use this '*A' *in HTTP request
>> > for
>> > > a
>> > > > > > > parameter
>> > > > > > > > > say '
>> > > > > > > > > > > *X* '
>> > > > > > > > > > > > > .
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > I have associated a Regular expression
>> > extractor
>> > > to
>> > > > > > this
>> > > > > > > JDBC
>> > > > > > > > > > > request
>> > > > > > > > > > > > > and
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > What do you mean by "associated" ?
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > > given values in this post processor as given
>> > > below
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > *reference name : variable*
>> > > > > > > > > > > > > > *regular expression : (.*)"*
>> > > > > > > > > > > > > > *template : $1$*
>> > > > > > > > > > > > > > *match number : 1*
>> > > > > > > > > > > > > > *default value : error*
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > Looks OK.
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > > **
>> > > > > > > > > > > > > > *here reference name and the variable name
>> in
>> > > JDBC
>> > > > > > > request is
>> > > > > > > > > same*
>> > > > > > > > > > > > > > **
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > JMeter variables are not related in any way to
>> SQL
>> > > > > names.
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > > and in HTTP request for a parameter
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > *number : ${variable}*
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > OK
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > > **
>> > > > > > > > > > > > > > when i run the test and check the response
>> > data
>> > > > > this
>> > > > > > > > > parameter in
>> > > > > > > > > > > HTTP
>> > > > > > > > > > > > > > request is taking default value of regular
>> > > > expression
>> > > > > > > instead
>> > > > > > > > > of
>> > > > > > > > > > > JDBC
>> > > > > > > > > > > > > > variable.
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > That means the RE PostProcessor has been run
>> OK,
>> > and
>> > > > the
>> > > > > > > HTTP
>> > > > > > > > > sampler
>> > > > > > > > > > > > > used the correct variable, but the RE PP was
>> > either
>> > > > > > applied
>> > > > > > > to
>> > > > > > > > > the
>> > > > > > > > > > > > > wrong input or the RE was incorrect. Given that
>> > the
>> > > RE
>> > > > > is
>> > > > > > > very
>> > > > > > > > > simple,
>> > > > > > > > > > > > > it's probably because the RE PP was applied to
>> the
>> > > > wrong
>> > > > > > > input.
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > Did you add the RE PP as a child of the JDBC
>> > > Sampler?
>> > > > > > > > > > > > >
>> > > > > > > > > > > > > > Assist me in solving ths issue
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > > > rgds
>> > > > > > > > > > > > > > Sudheer
>> > > > > > > > > > > > > > **
>> > > > > > > > > > > > > >
>> > > > > > > > > > > > >
>> > > > > > > > > > > >
>> > > > > > > > > > > > >
>> > > > > > > > >
>> > > > > >
>> > ---------------------------------------------------------------------
>> > > > > > > > > > > > > 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
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
Re: how to use JDBC request variables in HTTP requests
Posted by sudheer reddy <gs...@gmail.com>.
ok i have done as u told but am not successfull
her with am sending u the snap shots of my plan
regular expression sheet and also http request
On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
>
> use jdbc request as following
>
> -your JDBC request
> ------Add post processor(regular expression exctractor to it) - should be
> child of JDBC request.
> -Your HTTP request (pass variable of regex to it).
>
> it should work
>
>
> On Wed, Oct 22, 2008 at 12:41 PM, sudheer reddy <gsudheer.08@gmail.com
> >wrote:
>
> > I have given variable in JDBC request as WTPARTNUMBER
> >
> > so in response is WTPARTNUMBER xxxxxxx
> >
> > and the response is correct
> >
> >
> > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> > >
> > > What is the response of ur JDBC request?
> > >
> > > On Wed, Oct 22, 2008 at 12:23 PM, sudheer reddy <gsudheer.08@gmail.com
> > > >wrote:
> > >
> > > > Hi Ravindra
> > > >
> > > > thanks for ur reply.
> > > >
> > > > Do I have to cange any in the Jmeter properties file.
> > > >
> > > > it will be helpful for me if u give me some detailed information how
> > to
> > > > workout with this with some example.
> > > >
> > > > this is my scenario
> > > >
> > > > in JDBC request i got the result frrom database now i have to use
> this
> > > > result in another HTTP request
> > > >
> > > > I have associated a Regular expression extractor to this JDBC
> > > request and
> > > > given values in this post processor as given below
> > > >
> > > > *reference name : variable*
> > > > *regular expression : (.*)"*
> > > > *template : $1$*
> > > > *match number : 1*
> > > > *default value : error*
> > > > **
> > > > *here reference name and the variable name in JDBC request is same*
> > > > **
> > > > and in HTTP request for a parameter
> > > >
> > > > *number : ${variable}*
> > > > **
> > > > when i run the test and check the response data this parameter in
> > HTTP
> > > > request is taking default value of regular expression instead of JDBC
> > > > variable.
> > > >
> > > > rgds
> > > > Sudheer
> > > >
> > > >
> > > > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> > > > >
> > > > > it works for JDBC request also...there must be smthing wrong with
> > your
> > > > > regex
> > > > >
> > > > > On Wed, Oct 22, 2008 at 12:05 PM, sudheer reddy <
> > gsudheer.08@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > Hi sebb
> > > > > >
> > > > > > I have tried to fix the problem but not successful.
> > > > > >
> > > > > > Regular expression extractor is working fine with HTTP request
> but
> > > for
> > > > > JDBC
> > > > > > request it is taking default value.
> > > > > >
> > > > > > can you suggest a solution for this please.
> > > > > >
> > > > > > thanks
> > > > > >
> > > > > > rgds
> > > > > > Sudheer
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 10/21/08, sebb <se...@gmail.com> wrote:
> > > > > > >
> > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > > ok sebb
> > > > > > > > can u suggest another method for using this JDBC request
> > result
> > > > in
> > > > > > HTTP
> > > > > > > > request.
> > > > > > > >
> > > > > > >
> > > > > > > No.
> > > > > > >
> > > > > > > It is definitely possible to extract results from JDBC
> samplers;
> > > the
> > > > > > > way you have described it is the way I would have suggested
> doing
> > > it,
> > > > > > > so you just need to fix whatever is wrong...
> > > > > > >
> > > > > > > If the JDBC response data shows up in the View Results Tree
> > > Listener
> > > > -
> > > > > > > I assume you have checked this? - then the RE PP can extract
> it.
> > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com>
> > > wrote:
> > > > > > > >
> > > > > > > > > In that case the only possibility is that the RE is wrong.
> > > > > > > > >
> > > > > > > > > Is it possible that there is trailing/leading white-space
> in
> > > the
> > > > > RE
> > > > > > > > > field? This might cause a match failure.
> > > > > > > > >
> > > > > > > > > BTW, for testing REs, the Java Request can be useful -
> just
> > > put
> > > > > some
> > > > > > > > > sample text in the ResultData field (this will be the Body
> > of
> > > > the
> > > > > > > > > response).
> > > > > > > > >
> > > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> wrote:
> > > > > > > > > > *Body*
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <
> sebbaz@gmail.com
> > >
> > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > And which "Response Field to check" is selected?
> > > > > > > > > > >
> > > > > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> > > > wrote:
> > > > > > > > > > > > Sebb
> > > > > > > > > > > >
> > > > > > > > > > > > yes you are right it is JDBC request only.
> > > > > > > > > > > >
> > > > > > > > > > > > I have used Regular expression extractor PP
> > > > > > > > > > > >
> > > > > > > > > > > > as a child to JDBC request.
> > > > > > > > > > > >
> > > > > > > > > > > > rgds
> > > > > > > > > > > > Sudheer
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <
> > > sebbaz@gmail.com
> > > > >
> > > > > > > wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > > On 21/10/2008, sudheer reddy <
> > gsudheer.08@gmail.com
> > > >
> > > > > > wrote:
> > > > > > > > > > > > > > How to use JDBC request defaults in other
> > > requests
> > > > > > > > > > > > >
> > > > > > > > > > > > > There is no such element as a JDBC Request
> > Default.
> > > > > > > > > > > > >
> > > > > > > > > > > > > There is a JDBC Connection Configuration element
> > > which
> > > > > can
> > > > > > > only
> > > > > > > > > be
> > > > > > > > > > > > > used in a JDBC Request sampler.
> > > > > > > > > > > > >
> > > > > > > > > > > > > > I have written a sql query in JDBC request
> and
> > I
> > > > got
> > > > > > the
> > > > > > > > > result but
> > > > > > > > > > > i
> > > > > > > > > > > > > don't
> > > > > > > > > > > > > > know how to use this variable in other HTTP
> > > > request.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > scenario
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > using JDBC request i have got result which is
> > > > > assigned
> > > > > > to
> > > > > > > a
> > > > > > > > > > > variable say
> > > > > > > > > > > > > '*
> > > > > > > > > > > > > > A'.*
> > > > > > > > > > > > > > **
> > > > > > > > > > > > > > Now I have to use this '*A' *in HTTP request
> > for
> > > a
> > > > > > > parameter
> > > > > > > > > say '
> > > > > > > > > > > *X* '
> > > > > > > > > > > > > .
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I have associated a Regular expression
> > extractor
> > > to
> > > > > > this
> > > > > > > JDBC
> > > > > > > > > > > request
> > > > > > > > > > > > > and
> > > > > > > > > > > > >
> > > > > > > > > > > > > What do you mean by "associated" ?
> > > > > > > > > > > > >
> > > > > > > > > > > > > > given values in this post processor as given
> > > below
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > *reference name : variable*
> > > > > > > > > > > > > > *regular expression : (.*)"*
> > > > > > > > > > > > > > *template : $1$*
> > > > > > > > > > > > > > *match number : 1*
> > > > > > > > > > > > > > *default value : error*
> > > > > > > > > > > > >
> > > > > > > > > > > > > Looks OK.
> > > > > > > > > > > > >
> > > > > > > > > > > > > > **
> > > > > > > > > > > > > > *here reference name and the variable name in
> > > JDBC
> > > > > > > request is
> > > > > > > > > same*
> > > > > > > > > > > > > > **
> > > > > > > > > > > > >
> > > > > > > > > > > > > JMeter variables are not related in any way to
> SQL
> > > > > names.
> > > > > > > > > > > > >
> > > > > > > > > > > > > > and in HTTP request for a parameter
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > *number : ${variable}*
> > > > > > > > > > > > >
> > > > > > > > > > > > > OK
> > > > > > > > > > > > >
> > > > > > > > > > > > > > **
> > > > > > > > > > > > > > when i run the test and check the response
> > data
> > > > > this
> > > > > > > > > parameter in
> > > > > > > > > > > HTTP
> > > > > > > > > > > > > > request is taking default value of regular
> > > > expression
> > > > > > > instead
> > > > > > > > > of
> > > > > > > > > > > JDBC
> > > > > > > > > > > > > > variable.
> > > > > > > > > > > > >
> > > > > > > > > > > > > That means the RE PostProcessor has been run OK,
> > and
> > > > the
> > > > > > > HTTP
> > > > > > > > > sampler
> > > > > > > > > > > > > used the correct variable, but the RE PP was
> > either
> > > > > > applied
> > > > > > > to
> > > > > > > > > the
> > > > > > > > > > > > > wrong input or the RE was incorrect. Given that
> > the
> > > RE
> > > > > is
> > > > > > > very
> > > > > > > > > simple,
> > > > > > > > > > > > > it's probably because the RE PP was applied to
> the
> > > > wrong
> > > > > > > input.
> > > > > > > > > > > > >
> > > > > > > > > > > > > Did you add the RE PP as a child of the JDBC
> > > Sampler?
> > > > > > > > > > > > >
> > > > > > > > > > > > > > Assist me in solving ths issue
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > rgds
> > > > > > > > > > > > > > Sudheer
> > > > > > > > > > > > > > **
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > > > > 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: how to use JDBC request variables in HTTP requests
Posted by Ravindra Gupta <ra...@gmail.com>.
use jdbc request as following
-your JDBC request
------Add post processor(regular expression exctractor to it) - should be
child of JDBC request.
-Your HTTP request (pass variable of regex to it).
it should work
On Wed, Oct 22, 2008 at 12:41 PM, sudheer reddy <gs...@gmail.com>wrote:
> I have given variable in JDBC request as WTPARTNUMBER
>
> so in response is WTPARTNUMBER xxxxxxx
>
> and the response is correct
>
>
> On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> >
> > What is the response of ur JDBC request?
> >
> > On Wed, Oct 22, 2008 at 12:23 PM, sudheer reddy <gsudheer.08@gmail.com
> > >wrote:
> >
> > > Hi Ravindra
> > >
> > > thanks for ur reply.
> > >
> > > Do I have to cange any in the Jmeter properties file.
> > >
> > > it will be helpful for me if u give me some detailed information how
> to
> > > workout with this with some example.
> > >
> > > this is my scenario
> > >
> > > in JDBC request i got the result frrom database now i have to use this
> > > result in another HTTP request
> > >
> > > I have associated a Regular expression extractor to this JDBC
> > request and
> > > given values in this post processor as given below
> > >
> > > *reference name : variable*
> > > *regular expression : (.*)"*
> > > *template : $1$*
> > > *match number : 1*
> > > *default value : error*
> > > **
> > > *here reference name and the variable name in JDBC request is same*
> > > **
> > > and in HTTP request for a parameter
> > >
> > > *number : ${variable}*
> > > **
> > > when i run the test and check the response data this parameter in
> HTTP
> > > request is taking default value of regular expression instead of JDBC
> > > variable.
> > >
> > > rgds
> > > Sudheer
> > >
> > >
> > > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> > > >
> > > > it works for JDBC request also...there must be smthing wrong with
> your
> > > > regex
> > > >
> > > > On Wed, Oct 22, 2008 at 12:05 PM, sudheer reddy <
> gsudheer.08@gmail.com
> > > > >wrote:
> > > >
> > > > > Hi sebb
> > > > >
> > > > > I have tried to fix the problem but not successful.
> > > > >
> > > > > Regular expression extractor is working fine with HTTP request but
> > for
> > > > JDBC
> > > > > request it is taking default value.
> > > > >
> > > > > can you suggest a solution for this please.
> > > > >
> > > > > thanks
> > > > >
> > > > > rgds
> > > > > Sudheer
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On 10/21/08, sebb <se...@gmail.com> wrote:
> > > > > >
> > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > ok sebb
> > > > > > > can u suggest another method for using this JDBC request
> result
> > > in
> > > > > HTTP
> > > > > > > request.
> > > > > > >
> > > > > >
> > > > > > No.
> > > > > >
> > > > > > It is definitely possible to extract results from JDBC samplers;
> > the
> > > > > > way you have described it is the way I would have suggested doing
> > it,
> > > > > > so you just need to fix whatever is wrong...
> > > > > >
> > > > > > If the JDBC response data shows up in the View Results Tree
> > Listener
> > > -
> > > > > > I assume you have checked this? - then the RE PP can extract it.
> > > > > >
> > > > > > >
> > > > > > > On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com>
> > wrote:
> > > > > > >
> > > > > > > > In that case the only possibility is that the RE is wrong.
> > > > > > > >
> > > > > > > > Is it possible that there is trailing/leading white-space in
> > the
> > > > RE
> > > > > > > > field? This might cause a match failure.
> > > > > > > >
> > > > > > > > BTW, for testing REs, the Java Request can be useful - just
> > put
> > > > some
> > > > > > > > sample text in the ResultData field (this will be the Body
> of
> > > the
> > > > > > > > response).
> > > > > > > >
> > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > > > *Body*
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <sebbaz@gmail.com
> >
> > > > wrote:
> > > > > > > > >
> > > > > > > > > > And which "Response Field to check" is selected?
> > > > > > > > > >
> > > > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> > > wrote:
> > > > > > > > > > > Sebb
> > > > > > > > > > >
> > > > > > > > > > > yes you are right it is JDBC request only.
> > > > > > > > > > >
> > > > > > > > > > > I have used Regular expression extractor PP
> > > > > > > > > > >
> > > > > > > > > > > as a child to JDBC request.
> > > > > > > > > > >
> > > > > > > > > > > rgds
> > > > > > > > > > > Sudheer
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <
> > sebbaz@gmail.com
> > > >
> > > > > > wrote:
> > > > > > > > > > >
> > > > > > > > > > > > On 21/10/2008, sudheer reddy <
> gsudheer.08@gmail.com
> > >
> > > > > wrote:
> > > > > > > > > > > > > How to use JDBC request defaults in other
> > requests
> > > > > > > > > > > >
> > > > > > > > > > > > There is no such element as a JDBC Request
> Default.
> > > > > > > > > > > >
> > > > > > > > > > > > There is a JDBC Connection Configuration element
> > which
> > > > can
> > > > > > only
> > > > > > > > be
> > > > > > > > > > > > used in a JDBC Request sampler.
> > > > > > > > > > > >
> > > > > > > > > > > > > I have written a sql query in JDBC request and
> I
> > > got
> > > > > the
> > > > > > > > result but
> > > > > > > > > > i
> > > > > > > > > > > > don't
> > > > > > > > > > > > > know how to use this variable in other HTTP
> > > request.
> > > > > > > > > > > > >
> > > > > > > > > > > > > scenario
> > > > > > > > > > > > >
> > > > > > > > > > > > > using JDBC request i have got result which is
> > > > assigned
> > > > > to
> > > > > > a
> > > > > > > > > > variable say
> > > > > > > > > > > > '*
> > > > > > > > > > > > > A'.*
> > > > > > > > > > > > > **
> > > > > > > > > > > > > Now I have to use this '*A' *in HTTP request
> for
> > a
> > > > > > parameter
> > > > > > > > say '
> > > > > > > > > > *X* '
> > > > > > > > > > > > .
> > > > > > > > > > > > >
> > > > > > > > > > > > > I have associated a Regular expression
> extractor
> > to
> > > > > this
> > > > > > JDBC
> > > > > > > > > > request
> > > > > > > > > > > > and
> > > > > > > > > > > >
> > > > > > > > > > > > What do you mean by "associated" ?
> > > > > > > > > > > >
> > > > > > > > > > > > > given values in this post processor as given
> > below
> > > > > > > > > > > > >
> > > > > > > > > > > > > *reference name : variable*
> > > > > > > > > > > > > *regular expression : (.*)"*
> > > > > > > > > > > > > *template : $1$*
> > > > > > > > > > > > > *match number : 1*
> > > > > > > > > > > > > *default value : error*
> > > > > > > > > > > >
> > > > > > > > > > > > Looks OK.
> > > > > > > > > > > >
> > > > > > > > > > > > > **
> > > > > > > > > > > > > *here reference name and the variable name in
> > JDBC
> > > > > > request is
> > > > > > > > same*
> > > > > > > > > > > > > **
> > > > > > > > > > > >
> > > > > > > > > > > > JMeter variables are not related in any way to SQL
> > > > names.
> > > > > > > > > > > >
> > > > > > > > > > > > > and in HTTP request for a parameter
> > > > > > > > > > > > >
> > > > > > > > > > > > > *number : ${variable}*
> > > > > > > > > > > >
> > > > > > > > > > > > OK
> > > > > > > > > > > >
> > > > > > > > > > > > > **
> > > > > > > > > > > > > when i run the test and check the response
> data
> > > > this
> > > > > > > > parameter in
> > > > > > > > > > HTTP
> > > > > > > > > > > > > request is taking default value of regular
> > > expression
> > > > > > instead
> > > > > > > > of
> > > > > > > > > > JDBC
> > > > > > > > > > > > > variable.
> > > > > > > > > > > >
> > > > > > > > > > > > That means the RE PostProcessor has been run OK,
> and
> > > the
> > > > > > HTTP
> > > > > > > > sampler
> > > > > > > > > > > > used the correct variable, but the RE PP was
> either
> > > > > applied
> > > > > > to
> > > > > > > > the
> > > > > > > > > > > > wrong input or the RE was incorrect. Given that
> the
> > RE
> > > > is
> > > > > > very
> > > > > > > > simple,
> > > > > > > > > > > > it's probably because the RE PP was applied to the
> > > wrong
> > > > > > input.
> > > > > > > > > > > >
> > > > > > > > > > > > Did you add the RE PP as a child of the JDBC
> > Sampler?
> > > > > > > > > > > >
> > > > > > > > > > > > > Assist me in solving ths issue
> > > > > > > > > > > > >
> > > > > > > > > > > > > rgds
> > > > > > > > > > > > > Sudheer
> > > > > > > > > > > > > **
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > > > > > > > > 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: how to use JDBC request variables in HTTP requests
Posted by sudheer reddy <gs...@gmail.com>.
I have given variable in JDBC request as WTPARTNUMBER
so in response is WTPARTNUMBER xxxxxxx
and the response is correct
On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
>
> What is the response of ur JDBC request?
>
> On Wed, Oct 22, 2008 at 12:23 PM, sudheer reddy <gsudheer.08@gmail.com
> >wrote:
>
> > Hi Ravindra
> >
> > thanks for ur reply.
> >
> > Do I have to cange any in the Jmeter properties file.
> >
> > it will be helpful for me if u give me some detailed information how to
> > workout with this with some example.
> >
> > this is my scenario
> >
> > in JDBC request i got the result frrom database now i have to use this
> > result in another HTTP request
> >
> > I have associated a Regular expression extractor to this JDBC
> request and
> > given values in this post processor as given below
> >
> > *reference name : variable*
> > *regular expression : (.*)"*
> > *template : $1$*
> > *match number : 1*
> > *default value : error*
> > **
> > *here reference name and the variable name in JDBC request is same*
> > **
> > and in HTTP request for a parameter
> >
> > *number : ${variable}*
> > **
> > when i run the test and check the response data this parameter in HTTP
> > request is taking default value of regular expression instead of JDBC
> > variable.
> >
> > rgds
> > Sudheer
> >
> >
> > On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> > >
> > > it works for JDBC request also...there must be smthing wrong with your
> > > regex
> > >
> > > On Wed, Oct 22, 2008 at 12:05 PM, sudheer reddy <gsudheer.08@gmail.com
> > > >wrote:
> > >
> > > > Hi sebb
> > > >
> > > > I have tried to fix the problem but not successful.
> > > >
> > > > Regular expression extractor is working fine with HTTP request but
> for
> > > JDBC
> > > > request it is taking default value.
> > > >
> > > > can you suggest a solution for this please.
> > > >
> > > > thanks
> > > >
> > > > rgds
> > > > Sudheer
> > > >
> > > >
> > > >
> > > >
> > > > On 10/21/08, sebb <se...@gmail.com> wrote:
> > > > >
> > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > ok sebb
> > > > > > can u suggest another method for using this JDBC request result
> > in
> > > > HTTP
> > > > > > request.
> > > > > >
> > > > >
> > > > > No.
> > > > >
> > > > > It is definitely possible to extract results from JDBC samplers;
> the
> > > > > way you have described it is the way I would have suggested doing
> it,
> > > > > so you just need to fix whatever is wrong...
> > > > >
> > > > > If the JDBC response data shows up in the View Results Tree
> Listener
> > -
> > > > > I assume you have checked this? - then the RE PP can extract it.
> > > > >
> > > > > >
> > > > > > On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com>
> wrote:
> > > > > >
> > > > > > > In that case the only possibility is that the RE is wrong.
> > > > > > >
> > > > > > > Is it possible that there is trailing/leading white-space in
> the
> > > RE
> > > > > > > field? This might cause a match failure.
> > > > > > >
> > > > > > > BTW, for testing REs, the Java Request can be useful - just
> put
> > > some
> > > > > > > sample text in the ResultData field (this will be the Body of
> > the
> > > > > > > response).
> > > > > > >
> > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > > *Body*
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com>
> > > wrote:
> > > > > > > >
> > > > > > > > > And which "Response Field to check" is selected?
> > > > > > > > >
> > > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> > wrote:
> > > > > > > > > > Sebb
> > > > > > > > > >
> > > > > > > > > > yes you are right it is JDBC request only.
> > > > > > > > > >
> > > > > > > > > > I have used Regular expression extractor PP
> > > > > > > > > >
> > > > > > > > > > as a child to JDBC request.
> > > > > > > > > >
> > > > > > > > > > rgds
> > > > > > > > > > Sudheer
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <
> sebbaz@gmail.com
> > >
> > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > > On 21/10/2008, sudheer reddy <gsudheer.08@gmail.com
> >
> > > > wrote:
> > > > > > > > > > > > How to use JDBC request defaults in other
> requests
> > > > > > > > > > >
> > > > > > > > > > > There is no such element as a JDBC Request Default.
> > > > > > > > > > >
> > > > > > > > > > > There is a JDBC Connection Configuration element
> which
> > > can
> > > > > only
> > > > > > > be
> > > > > > > > > > > used in a JDBC Request sampler.
> > > > > > > > > > >
> > > > > > > > > > > > I have written a sql query in JDBC request and I
> > got
> > > > the
> > > > > > > result but
> > > > > > > > > i
> > > > > > > > > > > don't
> > > > > > > > > > > > know how to use this variable in other HTTP
> > request.
> > > > > > > > > > > >
> > > > > > > > > > > > scenario
> > > > > > > > > > > >
> > > > > > > > > > > > using JDBC request i have got result which is
> > > assigned
> > > > to
> > > > > a
> > > > > > > > > variable say
> > > > > > > > > > > '*
> > > > > > > > > > > > A'.*
> > > > > > > > > > > > **
> > > > > > > > > > > > Now I have to use this '*A' *in HTTP request for
> a
> > > > > parameter
> > > > > > > say '
> > > > > > > > > *X* '
> > > > > > > > > > > .
> > > > > > > > > > > >
> > > > > > > > > > > > I have associated a Regular expression extractor
> to
> > > > this
> > > > > JDBC
> > > > > > > > > request
> > > > > > > > > > > and
> > > > > > > > > > >
> > > > > > > > > > > What do you mean by "associated" ?
> > > > > > > > > > >
> > > > > > > > > > > > given values in this post processor as given
> below
> > > > > > > > > > > >
> > > > > > > > > > > > *reference name : variable*
> > > > > > > > > > > > *regular expression : (.*)"*
> > > > > > > > > > > > *template : $1$*
> > > > > > > > > > > > *match number : 1*
> > > > > > > > > > > > *default value : error*
> > > > > > > > > > >
> > > > > > > > > > > Looks OK.
> > > > > > > > > > >
> > > > > > > > > > > > **
> > > > > > > > > > > > *here reference name and the variable name in
> JDBC
> > > > > request is
> > > > > > > same*
> > > > > > > > > > > > **
> > > > > > > > > > >
> > > > > > > > > > > JMeter variables are not related in any way to SQL
> > > names.
> > > > > > > > > > >
> > > > > > > > > > > > and in HTTP request for a parameter
> > > > > > > > > > > >
> > > > > > > > > > > > *number : ${variable}*
> > > > > > > > > > >
> > > > > > > > > > > OK
> > > > > > > > > > >
> > > > > > > > > > > > **
> > > > > > > > > > > > when i run the test and check the response data
> > > this
> > > > > > > parameter in
> > > > > > > > > HTTP
> > > > > > > > > > > > request is taking default value of regular
> > expression
> > > > > instead
> > > > > > > of
> > > > > > > > > JDBC
> > > > > > > > > > > > variable.
> > > > > > > > > > >
> > > > > > > > > > > That means the RE PostProcessor has been run OK, and
> > the
> > > > > HTTP
> > > > > > > sampler
> > > > > > > > > > > used the correct variable, but the RE PP was either
> > > > applied
> > > > > to
> > > > > > > the
> > > > > > > > > > > wrong input or the RE was incorrect. Given that the
> RE
> > > is
> > > > > very
> > > > > > > simple,
> > > > > > > > > > > it's probably because the RE PP was applied to the
> > wrong
> > > > > input.
> > > > > > > > > > >
> > > > > > > > > > > Did you add the RE PP as a child of the JDBC
> Sampler?
> > > > > > > > > > >
> > > > > > > > > > > > Assist me in solving ths issue
> > > > > > > > > > > >
> > > > > > > > > > > > rgds
> > > > > > > > > > > > Sudheer
> > > > > > > > > > > > **
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > >
> > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > > > 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: how to use JDBC request variables in HTTP requests
Posted by Ravindra Gupta <ra...@gmail.com>.
What is the response of ur JDBC request?
On Wed, Oct 22, 2008 at 12:23 PM, sudheer reddy <gs...@gmail.com>wrote:
> Hi Ravindra
>
> thanks for ur reply.
>
> Do I have to cange any in the Jmeter properties file.
>
> it will be helpful for me if u give me some detailed information how to
> workout with this with some example.
>
> this is my scenario
>
> in JDBC request i got the result frrom database now i have to use this
> result in another HTTP request
>
> I have associated a Regular expression extractor to this JDBC request and
> given values in this post processor as given below
>
> *reference name : variable*
> *regular expression : (.*)"*
> *template : $1$*
> *match number : 1*
> *default value : error*
> **
> *here reference name and the variable name in JDBC request is same*
> **
> and in HTTP request for a parameter
>
> *number : ${variable}*
> **
> when i run the test and check the response data this parameter in HTTP
> request is taking default value of regular expression instead of JDBC
> variable.
>
> rgds
> Sudheer
>
>
> On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
> >
> > it works for JDBC request also...there must be smthing wrong with your
> > regex
> >
> > On Wed, Oct 22, 2008 at 12:05 PM, sudheer reddy <gsudheer.08@gmail.com
> > >wrote:
> >
> > > Hi sebb
> > >
> > > I have tried to fix the problem but not successful.
> > >
> > > Regular expression extractor is working fine with HTTP request but for
> > JDBC
> > > request it is taking default value.
> > >
> > > can you suggest a solution for this please.
> > >
> > > thanks
> > >
> > > rgds
> > > Sudheer
> > >
> > >
> > >
> > >
> > > On 10/21/08, sebb <se...@gmail.com> wrote:
> > > >
> > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > ok sebb
> > > > > can u suggest another method for using this JDBC request result
> in
> > > HTTP
> > > > > request.
> > > > >
> > > >
> > > > No.
> > > >
> > > > It is definitely possible to extract results from JDBC samplers; the
> > > > way you have described it is the way I would have suggested doing it,
> > > > so you just need to fix whatever is wrong...
> > > >
> > > > If the JDBC response data shows up in the View Results Tree Listener
> -
> > > > I assume you have checked this? - then the RE PP can extract it.
> > > >
> > > > >
> > > > > On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com> wrote:
> > > > >
> > > > > > In that case the only possibility is that the RE is wrong.
> > > > > >
> > > > > > Is it possible that there is trailing/leading white-space in the
> > RE
> > > > > > field? This might cause a match failure.
> > > > > >
> > > > > > BTW, for testing REs, the Java Request can be useful - just put
> > some
> > > > > > sample text in the ResultData field (this will be the Body of
> the
> > > > > > response).
> > > > > >
> > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > *Body*
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com>
> > wrote:
> > > > > > >
> > > > > > > > And which "Response Field to check" is selected?
> > > > > > > >
> > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> wrote:
> > > > > > > > > Sebb
> > > > > > > > >
> > > > > > > > > yes you are right it is JDBC request only.
> > > > > > > > >
> > > > > > > > > I have used Regular expression extractor PP
> > > > > > > > >
> > > > > > > > > as a child to JDBC request.
> > > > > > > > >
> > > > > > > > > rgds
> > > > > > > > > Sudheer
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <sebbaz@gmail.com
> >
> > > > wrote:
> > > > > > > > >
> > > > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> > > wrote:
> > > > > > > > > > > How to use JDBC request defaults in other requests
> > > > > > > > > >
> > > > > > > > > > There is no such element as a JDBC Request Default.
> > > > > > > > > >
> > > > > > > > > > There is a JDBC Connection Configuration element which
> > can
> > > > only
> > > > > > be
> > > > > > > > > > used in a JDBC Request sampler.
> > > > > > > > > >
> > > > > > > > > > > I have written a sql query in JDBC request and I
> got
> > > the
> > > > > > result but
> > > > > > > > i
> > > > > > > > > > don't
> > > > > > > > > > > know how to use this variable in other HTTP
> request.
> > > > > > > > > > >
> > > > > > > > > > > scenario
> > > > > > > > > > >
> > > > > > > > > > > using JDBC request i have got result which is
> > assigned
> > > to
> > > > a
> > > > > > > > variable say
> > > > > > > > > > '*
> > > > > > > > > > > A'.*
> > > > > > > > > > > **
> > > > > > > > > > > Now I have to use this '*A' *in HTTP request for a
> > > > parameter
> > > > > > say '
> > > > > > > > *X* '
> > > > > > > > > > .
> > > > > > > > > > >
> > > > > > > > > > > I have associated a Regular expression extractor to
> > > this
> > > > JDBC
> > > > > > > > request
> > > > > > > > > > and
> > > > > > > > > >
> > > > > > > > > > What do you mean by "associated" ?
> > > > > > > > > >
> > > > > > > > > > > given values in this post processor as given below
> > > > > > > > > > >
> > > > > > > > > > > *reference name : variable*
> > > > > > > > > > > *regular expression : (.*)"*
> > > > > > > > > > > *template : $1$*
> > > > > > > > > > > *match number : 1*
> > > > > > > > > > > *default value : error*
> > > > > > > > > >
> > > > > > > > > > Looks OK.
> > > > > > > > > >
> > > > > > > > > > > **
> > > > > > > > > > > *here reference name and the variable name in JDBC
> > > > request is
> > > > > > same*
> > > > > > > > > > > **
> > > > > > > > > >
> > > > > > > > > > JMeter variables are not related in any way to SQL
> > names.
> > > > > > > > > >
> > > > > > > > > > > and in HTTP request for a parameter
> > > > > > > > > > >
> > > > > > > > > > > *number : ${variable}*
> > > > > > > > > >
> > > > > > > > > > OK
> > > > > > > > > >
> > > > > > > > > > > **
> > > > > > > > > > > when i run the test and check the response data
> > this
> > > > > > parameter in
> > > > > > > > HTTP
> > > > > > > > > > > request is taking default value of regular
> expression
> > > > instead
> > > > > > of
> > > > > > > > JDBC
> > > > > > > > > > > variable.
> > > > > > > > > >
> > > > > > > > > > That means the RE PostProcessor has been run OK, and
> the
> > > > HTTP
> > > > > > sampler
> > > > > > > > > > used the correct variable, but the RE PP was either
> > > applied
> > > > to
> > > > > > the
> > > > > > > > > > wrong input or the RE was incorrect. Given that the RE
> > is
> > > > very
> > > > > > simple,
> > > > > > > > > > it's probably because the RE PP was applied to the
> wrong
> > > > input.
> > > > > > > > > >
> > > > > > > > > > Did you add the RE PP as a child of the JDBC Sampler?
> > > > > > > > > >
> > > > > > > > > > > Assist me in solving ths issue
> > > > > > > > > > >
> > > > > > > > > > > rgds
> > > > > > > > > > > Sudheer
> > > > > > > > > > > **
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > > > 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: how to use JDBC request variables in HTTP requests
Posted by sudheer reddy <gs...@gmail.com>.
Hi Ravindra
thanks for ur reply.
Do I have to cange any in the Jmeter properties file.
it will be helpful for me if u give me some detailed information how to
workout with this with some example.
this is my scenario
in JDBC request i got the result frrom database now i have to use this
result in another HTTP request
I have associated a Regular expression extractor to this JDBC request and
given values in this post processor as given below
*reference name : variable*
*regular expression : (.*)"*
*template : $1$*
*match number : 1*
*default value : error*
**
*here reference name and the variable name in JDBC request is same*
**
and in HTTP request for a parameter
*number : ${variable}*
**
when i run the test and check the response data this parameter in HTTP
request is taking default value of regular expression instead of JDBC
variable.
rgds
Sudheer
On 10/22/08, Ravindra Gupta <ra...@gmail.com> wrote:
>
> it works for JDBC request also...there must be smthing wrong with your
> regex
>
> On Wed, Oct 22, 2008 at 12:05 PM, sudheer reddy <gsudheer.08@gmail.com
> >wrote:
>
> > Hi sebb
> >
> > I have tried to fix the problem but not successful.
> >
> > Regular expression extractor is working fine with HTTP request but for
> JDBC
> > request it is taking default value.
> >
> > can you suggest a solution for this please.
> >
> > thanks
> >
> > rgds
> > Sudheer
> >
> >
> >
> >
> > On 10/21/08, sebb <se...@gmail.com> wrote:
> > >
> > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > ok sebb
> > > > can u suggest another method for using this JDBC request result in
> > HTTP
> > > > request.
> > > >
> > >
> > > No.
> > >
> > > It is definitely possible to extract results from JDBC samplers; the
> > > way you have described it is the way I would have suggested doing it,
> > > so you just need to fix whatever is wrong...
> > >
> > > If the JDBC response data shows up in the View Results Tree Listener -
> > > I assume you have checked this? - then the RE PP can extract it.
> > >
> > > >
> > > > On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com> wrote:
> > > >
> > > > > In that case the only possibility is that the RE is wrong.
> > > > >
> > > > > Is it possible that there is trailing/leading white-space in the
> RE
> > > > > field? This might cause a match failure.
> > > > >
> > > > > BTW, for testing REs, the Java Request can be useful - just put
> some
> > > > > sample text in the ResultData field (this will be the Body of the
> > > > > response).
> > > > >
> > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > *Body*
> > > > > >
> > > > > >
> > > > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com>
> wrote:
> > > > > >
> > > > > > > And which "Response Field to check" is selected?
> > > > > > >
> > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > > Sebb
> > > > > > > >
> > > > > > > > yes you are right it is JDBC request only.
> > > > > > > >
> > > > > > > > I have used Regular expression extractor PP
> > > > > > > >
> > > > > > > > as a child to JDBC request.
> > > > > > > >
> > > > > > > > rgds
> > > > > > > > Sudheer
> > > > > > > >
> > > > > > > >
> > > > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com>
> > > wrote:
> > > > > > > >
> > > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> > wrote:
> > > > > > > > > > How to use JDBC request defaults in other requests
> > > > > > > > >
> > > > > > > > > There is no such element as a JDBC Request Default.
> > > > > > > > >
> > > > > > > > > There is a JDBC Connection Configuration element which
> can
> > > only
> > > > > be
> > > > > > > > > used in a JDBC Request sampler.
> > > > > > > > >
> > > > > > > > > > I have written a sql query in JDBC request and I got
> > the
> > > > > result but
> > > > > > > i
> > > > > > > > > don't
> > > > > > > > > > know how to use this variable in other HTTP request.
> > > > > > > > > >
> > > > > > > > > > scenario
> > > > > > > > > >
> > > > > > > > > > using JDBC request i have got result which is
> assigned
> > to
> > > a
> > > > > > > variable say
> > > > > > > > > '*
> > > > > > > > > > A'.*
> > > > > > > > > > **
> > > > > > > > > > Now I have to use this '*A' *in HTTP request for a
> > > parameter
> > > > > say '
> > > > > > > *X* '
> > > > > > > > > .
> > > > > > > > > >
> > > > > > > > > > I have associated a Regular expression extractor to
> > this
> > > JDBC
> > > > > > > request
> > > > > > > > > and
> > > > > > > > >
> > > > > > > > > What do you mean by "associated" ?
> > > > > > > > >
> > > > > > > > > > given values in this post processor as given below
> > > > > > > > > >
> > > > > > > > > > *reference name : variable*
> > > > > > > > > > *regular expression : (.*)"*
> > > > > > > > > > *template : $1$*
> > > > > > > > > > *match number : 1*
> > > > > > > > > > *default value : error*
> > > > > > > > >
> > > > > > > > > Looks OK.
> > > > > > > > >
> > > > > > > > > > **
> > > > > > > > > > *here reference name and the variable name in JDBC
> > > request is
> > > > > same*
> > > > > > > > > > **
> > > > > > > > >
> > > > > > > > > JMeter variables are not related in any way to SQL
> names.
> > > > > > > > >
> > > > > > > > > > and in HTTP request for a parameter
> > > > > > > > > >
> > > > > > > > > > *number : ${variable}*
> > > > > > > > >
> > > > > > > > > OK
> > > > > > > > >
> > > > > > > > > > **
> > > > > > > > > > when i run the test and check the response data
> this
> > > > > parameter in
> > > > > > > HTTP
> > > > > > > > > > request is taking default value of regular expression
> > > instead
> > > > > of
> > > > > > > JDBC
> > > > > > > > > > variable.
> > > > > > > > >
> > > > > > > > > That means the RE PostProcessor has been run OK, and the
> > > HTTP
> > > > > sampler
> > > > > > > > > used the correct variable, but the RE PP was either
> > applied
> > > to
> > > > > the
> > > > > > > > > wrong input or the RE was incorrect. Given that the RE
> is
> > > very
> > > > > simple,
> > > > > > > > > it's probably because the RE PP was applied to the wrong
> > > input.
> > > > > > > > >
> > > > > > > > > Did you add the RE PP as a child of the JDBC Sampler?
> > > > > > > > >
> > > > > > > > > > Assist me in solving ths issue
> > > > > > > > > >
> > > > > > > > > > rgds
> > > > > > > > > > Sudheer
> > > > > > > > > > **
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > 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: how to use JDBC request variables in HTTP requests
Posted by Ravindra Gupta <ra...@gmail.com>.
it works for JDBC request also...there must be smthing wrong with your regex
On Wed, Oct 22, 2008 at 12:05 PM, sudheer reddy <gs...@gmail.com>wrote:
> Hi sebb
>
> I have tried to fix the problem but not successful.
>
> Regular expression extractor is working fine with HTTP request but for JDBC
> request it is taking default value.
>
> can you suggest a solution for this please.
>
> thanks
>
> rgds
> Sudheer
>
>
>
>
> On 10/21/08, sebb <se...@gmail.com> wrote:
> >
> > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > ok sebb
> > > can u suggest another method for using this JDBC request result in
> HTTP
> > > request.
> > >
> >
> > No.
> >
> > It is definitely possible to extract results from JDBC samplers; the
> > way you have described it is the way I would have suggested doing it,
> > so you just need to fix whatever is wrong...
> >
> > If the JDBC response data shows up in the View Results Tree Listener -
> > I assume you have checked this? - then the RE PP can extract it.
> >
> > >
> > > On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com> wrote:
> > >
> > > > In that case the only possibility is that the RE is wrong.
> > > >
> > > > Is it possible that there is trailing/leading white-space in the RE
> > > > field? This might cause a match failure.
> > > >
> > > > BTW, for testing REs, the Java Request can be useful - just put some
> > > > sample text in the ResultData field (this will be the Body of the
> > > > response).
> > > >
> > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > *Body*
> > > > >
> > > > >
> > > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com> wrote:
> > > > >
> > > > > > And which "Response Field to check" is selected?
> > > > > >
> > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > Sebb
> > > > > > >
> > > > > > > yes you are right it is JDBC request only.
> > > > > > >
> > > > > > > I have used Regular expression extractor PP
> > > > > > >
> > > > > > > as a child to JDBC request.
> > > > > > >
> > > > > > > rgds
> > > > > > > Sudheer
> > > > > > >
> > > > > > >
> > > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com>
> > wrote:
> > > > > > >
> > > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com>
> wrote:
> > > > > > > > > How to use JDBC request defaults in other requests
> > > > > > > >
> > > > > > > > There is no such element as a JDBC Request Default.
> > > > > > > >
> > > > > > > > There is a JDBC Connection Configuration element which can
> > only
> > > > be
> > > > > > > > used in a JDBC Request sampler.
> > > > > > > >
> > > > > > > > > I have written a sql query in JDBC request and I got
> the
> > > > result but
> > > > > > i
> > > > > > > > don't
> > > > > > > > > know how to use this variable in other HTTP request.
> > > > > > > > >
> > > > > > > > > scenario
> > > > > > > > >
> > > > > > > > > using JDBC request i have got result which is assigned
> to
> > a
> > > > > > variable say
> > > > > > > > '*
> > > > > > > > > A'.*
> > > > > > > > > **
> > > > > > > > > Now I have to use this '*A' *in HTTP request for a
> > parameter
> > > > say '
> > > > > > *X* '
> > > > > > > > .
> > > > > > > > >
> > > > > > > > > I have associated a Regular expression extractor to
> this
> > JDBC
> > > > > > request
> > > > > > > > and
> > > > > > > >
> > > > > > > > What do you mean by "associated" ?
> > > > > > > >
> > > > > > > > > given values in this post processor as given below
> > > > > > > > >
> > > > > > > > > *reference name : variable*
> > > > > > > > > *regular expression : (.*)"*
> > > > > > > > > *template : $1$*
> > > > > > > > > *match number : 1*
> > > > > > > > > *default value : error*
> > > > > > > >
> > > > > > > > Looks OK.
> > > > > > > >
> > > > > > > > > **
> > > > > > > > > *here reference name and the variable name in JDBC
> > request is
> > > > same*
> > > > > > > > > **
> > > > > > > >
> > > > > > > > JMeter variables are not related in any way to SQL names.
> > > > > > > >
> > > > > > > > > and in HTTP request for a parameter
> > > > > > > > >
> > > > > > > > > *number : ${variable}*
> > > > > > > >
> > > > > > > > OK
> > > > > > > >
> > > > > > > > > **
> > > > > > > > > when i run the test and check the response data this
> > > > parameter in
> > > > > > HTTP
> > > > > > > > > request is taking default value of regular expression
> > instead
> > > > of
> > > > > > JDBC
> > > > > > > > > variable.
> > > > > > > >
> > > > > > > > That means the RE PostProcessor has been run OK, and the
> > HTTP
> > > > sampler
> > > > > > > > used the correct variable, but the RE PP was either
> applied
> > to
> > > > the
> > > > > > > > wrong input or the RE was incorrect. Given that the RE is
> > very
> > > > simple,
> > > > > > > > it's probably because the RE PP was applied to the wrong
> > input.
> > > > > > > >
> > > > > > > > Did you add the RE PP as a child of the JDBC Sampler?
> > > > > > > >
> > > > > > > > > Assist me in solving ths issue
> > > > > > > > >
> > > > > > > > > rgds
> > > > > > > > > Sudheer
> > > > > > > > > **
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > 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: how to use JDBC request variables in HTTP requests
Posted by sudheer reddy <gs...@gmail.com>.
Hi sebb
I have tried to fix the problem but not successful.
Regular expression extractor is working fine with HTTP request but for JDBC
request it is taking default value.
can you suggest a solution for this please.
thanks
rgds
Sudheer
On 10/21/08, sebb <se...@gmail.com> wrote:
>
> On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > ok sebb
> > can u suggest another method for using this JDBC request result in HTTP
> > request.
> >
>
> No.
>
> It is definitely possible to extract results from JDBC samplers; the
> way you have described it is the way I would have suggested doing it,
> so you just need to fix whatever is wrong...
>
> If the JDBC response data shows up in the View Results Tree Listener -
> I assume you have checked this? - then the RE PP can extract it.
>
> >
> > On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com> wrote:
> >
> > > In that case the only possibility is that the RE is wrong.
> > >
> > > Is it possible that there is trailing/leading white-space in the RE
> > > field? This might cause a match failure.
> > >
> > > BTW, for testing REs, the Java Request can be useful - just put some
> > > sample text in the ResultData field (this will be the Body of the
> > > response).
> > >
> > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > *Body*
> > > >
> > > >
> > > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com> wrote:
> > > >
> > > > > And which "Response Field to check" is selected?
> > > > >
> > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > Sebb
> > > > > >
> > > > > > yes you are right it is JDBC request only.
> > > > > >
> > > > > > I have used Regular expression extractor PP
> > > > > >
> > > > > > as a child to JDBC request.
> > > > > >
> > > > > > rgds
> > > > > > Sudheer
> > > > > >
> > > > > >
> > > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com>
> wrote:
> > > > > >
> > > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > > How to use JDBC request defaults in other requests
> > > > > > >
> > > > > > > There is no such element as a JDBC Request Default.
> > > > > > >
> > > > > > > There is a JDBC Connection Configuration element which can
> only
> > > be
> > > > > > > used in a JDBC Request sampler.
> > > > > > >
> > > > > > > > I have written a sql query in JDBC request and I got the
> > > result but
> > > > > i
> > > > > > > don't
> > > > > > > > know how to use this variable in other HTTP request.
> > > > > > > >
> > > > > > > > scenario
> > > > > > > >
> > > > > > > > using JDBC request i have got result which is assigned to
> a
> > > > > variable say
> > > > > > > '*
> > > > > > > > A'.*
> > > > > > > > **
> > > > > > > > Now I have to use this '*A' *in HTTP request for a
> parameter
> > > say '
> > > > > *X* '
> > > > > > > .
> > > > > > > >
> > > > > > > > I have associated a Regular expression extractor to this
> JDBC
> > > > > request
> > > > > > > and
> > > > > > >
> > > > > > > What do you mean by "associated" ?
> > > > > > >
> > > > > > > > given values in this post processor as given below
> > > > > > > >
> > > > > > > > *reference name : variable*
> > > > > > > > *regular expression : (.*)"*
> > > > > > > > *template : $1$*
> > > > > > > > *match number : 1*
> > > > > > > > *default value : error*
> > > > > > >
> > > > > > > Looks OK.
> > > > > > >
> > > > > > > > **
> > > > > > > > *here reference name and the variable name in JDBC
> request is
> > > same*
> > > > > > > > **
> > > > > > >
> > > > > > > JMeter variables are not related in any way to SQL names.
> > > > > > >
> > > > > > > > and in HTTP request for a parameter
> > > > > > > >
> > > > > > > > *number : ${variable}*
> > > > > > >
> > > > > > > OK
> > > > > > >
> > > > > > > > **
> > > > > > > > when i run the test and check the response data this
> > > parameter in
> > > > > HTTP
> > > > > > > > request is taking default value of regular expression
> instead
> > > of
> > > > > JDBC
> > > > > > > > variable.
> > > > > > >
> > > > > > > That means the RE PostProcessor has been run OK, and the
> HTTP
> > > sampler
> > > > > > > used the correct variable, but the RE PP was either applied
> to
> > > the
> > > > > > > wrong input or the RE was incorrect. Given that the RE is
> very
> > > simple,
> > > > > > > it's probably because the RE PP was applied to the wrong
> input.
> > > > > > >
> > > > > > > Did you add the RE PP as a child of the JDBC Sampler?
> > > > > > >
> > > > > > > > Assist me in solving ths issue
> > > > > > > >
> > > > > > > > rgds
> > > > > > > > Sudheer
> > > > > > > > **
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > 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: how to use JDBC request variables in HTTP requests
Posted by sebb <se...@gmail.com>.
On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> ok sebb
> can u suggest another method for using this JDBC request result in HTTP
> request.
>
No.
It is definitely possible to extract results from JDBC samplers; the
way you have described it is the way I would have suggested doing it,
so you just need to fix whatever is wrong...
If the JDBC response data shows up in the View Results Tree Listener -
I assume you have checked this? - then the RE PP can extract it.
>
> On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com> wrote:
>
> > In that case the only possibility is that the RE is wrong.
> >
> > Is it possible that there is trailing/leading white-space in the RE
> > field? This might cause a match failure.
> >
> > BTW, for testing REs, the Java Request can be useful - just put some
> > sample text in the ResultData field (this will be the Body of the
> > response).
> >
> > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > *Body*
> > >
> > >
> > > On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com> wrote:
> > >
> > > > And which "Response Field to check" is selected?
> > > >
> > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > Sebb
> > > > >
> > > > > yes you are right it is JDBC request only.
> > > > >
> > > > > I have used Regular expression extractor PP
> > > > >
> > > > > as a child to JDBC request.
> > > > >
> > > > > rgds
> > > > > Sudheer
> > > > >
> > > > >
> > > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com> wrote:
> > > > >
> > > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > > How to use JDBC request defaults in other requests
> > > > > >
> > > > > > There is no such element as a JDBC Request Default.
> > > > > >
> > > > > > There is a JDBC Connection Configuration element which can only
> > be
> > > > > > used in a JDBC Request sampler.
> > > > > >
> > > > > > > I have written a sql query in JDBC request and I got the
> > result but
> > > > i
> > > > > > don't
> > > > > > > know how to use this variable in other HTTP request.
> > > > > > >
> > > > > > > scenario
> > > > > > >
> > > > > > > using JDBC request i have got result which is assigned to a
> > > > variable say
> > > > > > '*
> > > > > > > A'.*
> > > > > > > **
> > > > > > > Now I have to use this '*A' *in HTTP request for a parameter
> > say '
> > > > *X* '
> > > > > > .
> > > > > > >
> > > > > > > I have associated a Regular expression extractor to this JDBC
> > > > request
> > > > > > and
> > > > > >
> > > > > > What do you mean by "associated" ?
> > > > > >
> > > > > > > given values in this post processor as given below
> > > > > > >
> > > > > > > *reference name : variable*
> > > > > > > *regular expression : (.*)"*
> > > > > > > *template : $1$*
> > > > > > > *match number : 1*
> > > > > > > *default value : error*
> > > > > >
> > > > > > Looks OK.
> > > > > >
> > > > > > > **
> > > > > > > *here reference name and the variable name in JDBC request is
> > same*
> > > > > > > **
> > > > > >
> > > > > > JMeter variables are not related in any way to SQL names.
> > > > > >
> > > > > > > and in HTTP request for a parameter
> > > > > > >
> > > > > > > *number : ${variable}*
> > > > > >
> > > > > > OK
> > > > > >
> > > > > > > **
> > > > > > > when i run the test and check the response data this
> > parameter in
> > > > HTTP
> > > > > > > request is taking default value of regular expression instead
> > of
> > > > JDBC
> > > > > > > variable.
> > > > > >
> > > > > > That means the RE PostProcessor has been run OK, and the HTTP
> > sampler
> > > > > > used the correct variable, but the RE PP was either applied to
> > the
> > > > > > wrong input or the RE was incorrect. Given that the RE is very
> > simple,
> > > > > > it's probably because the RE PP was applied to the wrong input.
> > > > > >
> > > > > > Did you add the RE PP as a child of the JDBC Sampler?
> > > > > >
> > > > > > > Assist me in solving ths issue
> > > > > > >
> > > > > > > rgds
> > > > > > > Sudheer
> > > > > > > **
> > > > > > >
> > > > > >
> > > > >
> > > > > >
> > ---------------------------------------------------------------------
> > > > > > 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: how to use JDBC request variables in HTTP requests
Posted by sudheer reddy <gs...@gmail.com>.
ok sebb
can u suggest another method for using this JDBC request result in HTTP
request.
On Tue, Oct 21, 2008 at 10:33 PM, sebb <se...@gmail.com> wrote:
> In that case the only possibility is that the RE is wrong.
>
> Is it possible that there is trailing/leading white-space in the RE
> field? This might cause a match failure.
>
> BTW, for testing REs, the Java Request can be useful - just put some
> sample text in the ResultData field (this will be the Body of the
> response).
>
> On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > *Body*
> >
> >
> > On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com> wrote:
> >
> > > And which "Response Field to check" is selected?
> > >
> > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > Sebb
> > > >
> > > > yes you are right it is JDBC request only.
> > > >
> > > > I have used Regular expression extractor PP
> > > >
> > > > as a child to JDBC request.
> > > >
> > > > rgds
> > > > Sudheer
> > > >
> > > >
> > > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com> wrote:
> > > >
> > > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > > How to use JDBC request defaults in other requests
> > > > >
> > > > > There is no such element as a JDBC Request Default.
> > > > >
> > > > > There is a JDBC Connection Configuration element which can only
> be
> > > > > used in a JDBC Request sampler.
> > > > >
> > > > > > I have written a sql query in JDBC request and I got the
> result but
> > > i
> > > > > don't
> > > > > > know how to use this variable in other HTTP request.
> > > > > >
> > > > > > scenario
> > > > > >
> > > > > > using JDBC request i have got result which is assigned to a
> > > variable say
> > > > > '*
> > > > > > A'.*
> > > > > > **
> > > > > > Now I have to use this '*A' *in HTTP request for a parameter
> say '
> > > *X* '
> > > > > .
> > > > > >
> > > > > > I have associated a Regular expression extractor to this JDBC
> > > request
> > > > > and
> > > > >
> > > > > What do you mean by "associated" ?
> > > > >
> > > > > > given values in this post processor as given below
> > > > > >
> > > > > > *reference name : variable*
> > > > > > *regular expression : (.*)"*
> > > > > > *template : $1$*
> > > > > > *match number : 1*
> > > > > > *default value : error*
> > > > >
> > > > > Looks OK.
> > > > >
> > > > > > **
> > > > > > *here reference name and the variable name in JDBC request is
> same*
> > > > > > **
> > > > >
> > > > > JMeter variables are not related in any way to SQL names.
> > > > >
> > > > > > and in HTTP request for a parameter
> > > > > >
> > > > > > *number : ${variable}*
> > > > >
> > > > > OK
> > > > >
> > > > > > **
> > > > > > when i run the test and check the response data this
> parameter in
> > > HTTP
> > > > > > request is taking default value of regular expression instead
> of
> > > JDBC
> > > > > > variable.
> > > > >
> > > > > That means the RE PostProcessor has been run OK, and the HTTP
> sampler
> > > > > used the correct variable, but the RE PP was either applied to
> the
> > > > > wrong input or the RE was incorrect. Given that the RE is very
> simple,
> > > > > it's probably because the RE PP was applied to the wrong input.
> > > > >
> > > > > Did you add the RE PP as a child of the JDBC Sampler?
> > > > >
> > > > > > Assist me in solving ths issue
> > > > > >
> > > > > > rgds
> > > > > > Sudheer
> > > > > > **
> > > > > >
> > > > >
> > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > 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: how to use JDBC request variables in HTTP requests
Posted by sebb <se...@gmail.com>.
In that case the only possibility is that the RE is wrong.
Is it possible that there is trailing/leading white-space in the RE
field? This might cause a match failure.
BTW, for testing REs, the Java Request can be useful - just put some
sample text in the ResultData field (this will be the Body of the
response).
On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> *Body*
>
>
> On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com> wrote:
>
> > And which "Response Field to check" is selected?
> >
> > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > Sebb
> > >
> > > yes you are right it is JDBC request only.
> > >
> > > I have used Regular expression extractor PP
> > >
> > > as a child to JDBC request.
> > >
> > > rgds
> > > Sudheer
> > >
> > >
> > > On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com> wrote:
> > >
> > > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > > How to use JDBC request defaults in other requests
> > > >
> > > > There is no such element as a JDBC Request Default.
> > > >
> > > > There is a JDBC Connection Configuration element which can only be
> > > > used in a JDBC Request sampler.
> > > >
> > > > > I have written a sql query in JDBC request and I got the result but
> > i
> > > > don't
> > > > > know how to use this variable in other HTTP request.
> > > > >
> > > > > scenario
> > > > >
> > > > > using JDBC request i have got result which is assigned to a
> > variable say
> > > > '*
> > > > > A'.*
> > > > > **
> > > > > Now I have to use this '*A' *in HTTP request for a parameter say '
> > *X* '
> > > > .
> > > > >
> > > > > I have associated a Regular expression extractor to this JDBC
> > request
> > > > and
> > > >
> > > > What do you mean by "associated" ?
> > > >
> > > > > given values in this post processor as given below
> > > > >
> > > > > *reference name : variable*
> > > > > *regular expression : (.*)"*
> > > > > *template : $1$*
> > > > > *match number : 1*
> > > > > *default value : error*
> > > >
> > > > Looks OK.
> > > >
> > > > > **
> > > > > *here reference name and the variable name in JDBC request is same*
> > > > > **
> > > >
> > > > JMeter variables are not related in any way to SQL names.
> > > >
> > > > > and in HTTP request for a parameter
> > > > >
> > > > > *number : ${variable}*
> > > >
> > > > OK
> > > >
> > > > > **
> > > > > when i run the test and check the response data this parameter in
> > HTTP
> > > > > request is taking default value of regular expression instead of
> > JDBC
> > > > > variable.
> > > >
> > > > That means the RE PostProcessor has been run OK, and the HTTP sampler
> > > > used the correct variable, but the RE PP was either applied to the
> > > > wrong input or the RE was incorrect. Given that the RE is very simple,
> > > > it's probably because the RE PP was applied to the wrong input.
> > > >
> > > > Did you add the RE PP as a child of the JDBC Sampler?
> > > >
> > > > > Assist me in solving ths issue
> > > > >
> > > > > rgds
> > > > > Sudheer
> > > > > **
> > > > >
> > > >
> > >
> > > > ---------------------------------------------------------------------
> > > > 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: how to use JDBC request variables in HTTP requests
Posted by sudheer reddy <gs...@gmail.com>.
*Body*
On Tue, Oct 21, 2008 at 10:17 PM, sebb <se...@gmail.com> wrote:
> And which "Response Field to check" is selected?
>
> On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > Sebb
> >
> > yes you are right it is JDBC request only.
> >
> > I have used Regular expression extractor PP
> >
> > as a child to JDBC request.
> >
> > rgds
> > Sudheer
> >
> >
> > On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com> wrote:
> >
> > > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > > How to use JDBC request defaults in other requests
> > >
> > > There is no such element as a JDBC Request Default.
> > >
> > > There is a JDBC Connection Configuration element which can only be
> > > used in a JDBC Request sampler.
> > >
> > > > I have written a sql query in JDBC request and I got the result but
> i
> > > don't
> > > > know how to use this variable in other HTTP request.
> > > >
> > > > scenario
> > > >
> > > > using JDBC request i have got result which is assigned to a
> variable say
> > > '*
> > > > A'.*
> > > > **
> > > > Now I have to use this '*A' *in HTTP request for a parameter say '
> *X* '
> > > .
> > > >
> > > > I have associated a Regular expression extractor to this JDBC
> request
> > > and
> > >
> > > What do you mean by "associated" ?
> > >
> > > > given values in this post processor as given below
> > > >
> > > > *reference name : variable*
> > > > *regular expression : (.*)"*
> > > > *template : $1$*
> > > > *match number : 1*
> > > > *default value : error*
> > >
> > > Looks OK.
> > >
> > > > **
> > > > *here reference name and the variable name in JDBC request is same*
> > > > **
> > >
> > > JMeter variables are not related in any way to SQL names.
> > >
> > > > and in HTTP request for a parameter
> > > >
> > > > *number : ${variable}*
> > >
> > > OK
> > >
> > > > **
> > > > when i run the test and check the response data this parameter in
> HTTP
> > > > request is taking default value of regular expression instead of
> JDBC
> > > > variable.
> > >
> > > That means the RE PostProcessor has been run OK, and the HTTP sampler
> > > used the correct variable, but the RE PP was either applied to the
> > > wrong input or the RE was incorrect. Given that the RE is very simple,
> > > it's probably because the RE PP was applied to the wrong input.
> > >
> > > Did you add the RE PP as a child of the JDBC Sampler?
> > >
> > > > Assist me in solving ths issue
> > > >
> > > > rgds
> > > > Sudheer
> > > > **
> > > >
> > >
> >
> > > ---------------------------------------------------------------------
> > > 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: how to use JDBC request variables in HTTP requests
Posted by sebb <se...@gmail.com>.
And which "Response Field to check" is selected?
On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> Sebb
>
> yes you are right it is JDBC request only.
>
> I have used Regular expression extractor PP
>
> as a child to JDBC request.
>
> rgds
> Sudheer
>
>
> On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com> wrote:
>
> > On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > > How to use JDBC request defaults in other requests
> >
> > There is no such element as a JDBC Request Default.
> >
> > There is a JDBC Connection Configuration element which can only be
> > used in a JDBC Request sampler.
> >
> > > I have written a sql query in JDBC request and I got the result but i
> > don't
> > > know how to use this variable in other HTTP request.
> > >
> > > scenario
> > >
> > > using JDBC request i have got result which is assigned to a variable say
> > '*
> > > A'.*
> > > **
> > > Now I have to use this '*A' *in HTTP request for a parameter say ' *X* '
> > .
> > >
> > > I have associated a Regular expression extractor to this JDBC request
> > and
> >
> > What do you mean by "associated" ?
> >
> > > given values in this post processor as given below
> > >
> > > *reference name : variable*
> > > *regular expression : (.*)"*
> > > *template : $1$*
> > > *match number : 1*
> > > *default value : error*
> >
> > Looks OK.
> >
> > > **
> > > *here reference name and the variable name in JDBC request is same*
> > > **
> >
> > JMeter variables are not related in any way to SQL names.
> >
> > > and in HTTP request for a parameter
> > >
> > > *number : ${variable}*
> >
> > OK
> >
> > > **
> > > when i run the test and check the response data this parameter in HTTP
> > > request is taking default value of regular expression instead of JDBC
> > > variable.
> >
> > That means the RE PostProcessor has been run OK, and the HTTP sampler
> > used the correct variable, but the RE PP was either applied to the
> > wrong input or the RE was incorrect. Given that the RE is very simple,
> > it's probably because the RE PP was applied to the wrong input.
> >
> > Did you add the RE PP as a child of the JDBC Sampler?
> >
> > > Assist me in solving ths issue
> > >
> > > rgds
> > > Sudheer
> > > **
> > >
> >
>
> > ---------------------------------------------------------------------
> > 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: how to use JDBC request variables in HTTP requests
Posted by sudheer reddy <gs...@gmail.com>.
Sebb
yes you are right it is JDBC request only.
I have used Regular expression extractor PP
as a child to JDBC request.
rgds
Sudheer
On Tue, Oct 21, 2008 at 9:59 PM, sebb <se...@gmail.com> wrote:
> On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> > How to use JDBC request defaults in other requests
>
> There is no such element as a JDBC Request Default.
>
> There is a JDBC Connection Configuration element which can only be
> used in a JDBC Request sampler.
>
> > I have written a sql query in JDBC request and I got the result but i
> don't
> > know how to use this variable in other HTTP request.
> >
> > scenario
> >
> > using JDBC request i have got result which is assigned to a variable say
> '*
> > A'.*
> > **
> > Now I have to use this '*A' *in HTTP request for a parameter say ' *X* '
> .
> >
> > I have associated a Regular expression extractor to this JDBC request
> and
>
> What do you mean by "associated" ?
>
> > given values in this post processor as given below
> >
> > *reference name : variable*
> > *regular expression : (.*)"*
> > *template : $1$*
> > *match number : 1*
> > *default value : error*
>
> Looks OK.
>
> > **
> > *here reference name and the variable name in JDBC request is same*
> > **
>
> JMeter variables are not related in any way to SQL names.
>
> > and in HTTP request for a parameter
> >
> > *number : ${variable}*
>
> OK
>
> > **
> > when i run the test and check the response data this parameter in HTTP
> > request is taking default value of regular expression instead of JDBC
> > variable.
>
> That means the RE PostProcessor has been run OK, and the HTTP sampler
> used the correct variable, but the RE PP was either applied to the
> wrong input or the RE was incorrect. Given that the RE is very simple,
> it's probably because the RE PP was applied to the wrong input.
>
> Did you add the RE PP as a child of the JDBC Sampler?
>
> > Assist me in solving ths issue
> >
> > rgds
> > Sudheer
> > **
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
Re: how to use JDBC request variables in HTTP requests
Posted by sebb <se...@gmail.com>.
On 21/10/2008, sudheer reddy <gs...@gmail.com> wrote:
> How to use JDBC request defaults in other requests
There is no such element as a JDBC Request Default.
There is a JDBC Connection Configuration element which can only be
used in a JDBC Request sampler.
> I have written a sql query in JDBC request and I got the result but i don't
> know how to use this variable in other HTTP request.
>
> scenario
>
> using JDBC request i have got result which is assigned to a variable say '*
> A'.*
> **
> Now I have to use this '*A' *in HTTP request for a parameter say ' *X* ' .
>
> I have associated a Regular expression extractor to this JDBC request and
What do you mean by "associated" ?
> given values in this post processor as given below
>
> *reference name : variable*
> *regular expression : (.*)"*
> *template : $1$*
> *match number : 1*
> *default value : error*
Looks OK.
> **
> *here reference name and the variable name in JDBC request is same*
> **
JMeter variables are not related in any way to SQL names.
> and in HTTP request for a parameter
>
> *number : ${variable}*
OK
> **
> when i run the test and check the response data this parameter in HTTP
> request is taking default value of regular expression instead of JDBC
> variable.
That means the RE PostProcessor has been run OK, and the HTTP sampler
used the correct variable, but the RE PP was either applied to the
wrong input or the RE was incorrect. Given that the RE is very simple,
it's probably because the RE PP was applied to the wrong input.
Did you add the RE PP as a child of the JDBC Sampler?
> Assist me in solving ths issue
>
> rgds
> Sudheer
> **
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org