You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Nithya Prakash <ni...@gmail.com> on 2010/07/16 11:44:32 UTC

Help needed regarding Jmeter JDBC request

Hi all,

I'm able to fetch the ID from the DB, when i do this operation i get many
rows of different ID....

Example
ID
7584
7563
7542
7524
.
.
.
.
7400

When i use this expression "ID(\s+)(.+)" for extracting the ID's am getting
only "7584" selected... i need all to be used in my HTTP request..
Which expression to be used for using all the ID's from the above result??


Thanks & Regards
-- 
Nithya Prakash.L

RE: Help needed regarding Jmeter JDBC request

Posted by Steve Eckhart <St...@wausaufs.com>.
You may need to use a Bean Shell script to loop through the full result and find as many IDs as possible.  You might also be able to use the XPath Extractor (http://jakarta.apache.org/jmeter/usermanual/component_reference.html#XPath_Extractor) to retrieve all of the IDs.

Steve Eckhart
Business Analyst/Project Manager

WAUSAU Financial Systems
14010 FNB PKWY STE500
Omaha, NE 68154-5206
Email: steve.eckhart@wausaufs.com
 
Enterprise Payment Solutions.
CONFIDENTIALITY NOTICE:  This electronic transmission (including files attached hereto) is intended only for the use of the individual or entity named above.  If the reader of this message is not the intended recipient, you are hereby notified that any disclosure, dissemination, copying, distribution or taking of any action in reliance on the contents of this confidential information is strictly prohibited.  If you have received this communication in error, please destroy it and immediately notify us by return email.  Thank you.



-----Original Message-----
From: Felix Frank [mailto:ff@mpexnet.de] 
Sent: Friday, July 16, 2010 5:09 AM
To: JMeter Users List
Subject: Re: Help needed regarding Jmeter JDBC request

In
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor
be mindful on the MatchNo. entry.

To extract multiple values with one Extractor, the pattern you propose
would be more appropriate. I don't see a way to retrieve an arbitrary
number of matches, though. One should think that the Foreach Controller
made such things possible, but I don't know how that would work (and it
probably doesn't).

Cheers
Felix

On 07/16/2010 11:58 AM, Nithya Prakash wrote:
> Thanks Felix
> 
> Regarding your reply, you mean to say we have to use
> (\d+)(\d+)(\d+)(\d+)(\d+)(\d+)(\d+) for the ID's to be fetched??
> 
> But for cetain things i can use coz i know how many ID the DB is
> fetching.... In the case where i don't know how many ID's will be fetched
> from the DB what is the way out??

---------------------------------------------------------------------
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: Help needed regarding Jmeter JDBC request

Posted by Felix Frank <ff...@mpexnet.de>.
In
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor
be mindful on the MatchNo. entry.

To extract multiple values with one Extractor, the pattern you propose
would be more appropriate. I don't see a way to retrieve an arbitrary
number of matches, though. One should think that the Foreach Controller
made such things possible, but I don't know how that would work (and it
probably doesn't).

Cheers
Felix

On 07/16/2010 11:58 AM, Nithya Prakash wrote:
> Thanks Felix
> 
> Regarding your reply, you mean to say we have to use
> (\d+)(\d+)(\d+)(\d+)(\d+)(\d+)(\d+) for the ID's to be fetched??
> 
> But for cetain things i can use coz i know how many ID the DB is
> fetching.... In the case where i don't know how many ID's will be fetched
> from the DB what is the way out??

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


Re: Help needed regarding Jmeter JDBC request

Posted by Nithya Prakash <ni...@gmail.com>.
Thanks Felix

Regarding your reply, you mean to say we have to use
(\d+)(\d+)(\d+)(\d+)(\d+)(\d+)(\d+) for the ID's to be fetched??

But for cetain things i can use coz i know how many ID the DB is
fetching.... In the case where i don't know how many ID's will be fetched
from the DB what is the way out??

Thanks
Nithya

On Fri, Jul 16, 2010 at 3:18 PM, Felix Frank <ff...@mpexnet.de> wrote:

> The Pattern (\d+) should Just Work (and match each of the numbers). Be
> mindful of the template you use in the Regex Extractor.
>
> HTH
> Felix
>
> On 07/16/2010 11:44 AM, Nithya Prakash wrote:
> > Hi all,
> >
> > I'm able to fetch the ID from the DB, when i do this operation i get many
> > rows of different ID....
> >
> > Example
> > ID
> > 7584
> > 7563
> > 7542
> > 7524
> > .
> > .
> > .
> > .
> > 7400
> >
> > When i use this expression "ID(\s+)(.+)" for extracting the ID's am
> getting
> > only "7584" selected... i need all to be used in my HTTP request..
> > Which expression to be used for using all the ID's from the above
> result??
> >
> >
> > Thanks & Regards
>
> --
> MPeX.net GmbH / Werner-Voß-Damm 62 / D-12101 Berlin / Germany
> MPeXnetworks / www.mpexnetworks.de
> Tel: ++49-30-78097 180 / Fax: ++49-30-78097 181
>
> Sitz, Registergericht: Berlin, Amtsgericht Charlottenburg, HRB 76688
> Geschäftsführer: Lars Bräuer, Gregor Lawatscheck
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


-- 
Nithya Prakash.L
nithyaprakash86@gmail.com
+919623320453

Re: Help needed regarding Jmeter JDBC request

Posted by Felix Frank <ff...@mpexnet.de>.
The Pattern (\d+) should Just Work (and match each of the numbers). Be
mindful of the template you use in the Regex Extractor.

HTH
Felix

On 07/16/2010 11:44 AM, Nithya Prakash wrote:
> Hi all,
> 
> I'm able to fetch the ID from the DB, when i do this operation i get many
> rows of different ID....
> 
> Example
> ID
> 7584
> 7563
> 7542
> 7524
> .
> .
> .
> .
> 7400
> 
> When i use this expression "ID(\s+)(.+)" for extracting the ID's am getting
> only "7584" selected... i need all to be used in my HTTP request..
> Which expression to be used for using all the ID's from the above result??
> 
> 
> Thanks & Regards

-- 
MPeX.net GmbH / Werner-Voß-Damm 62 / D-12101 Berlin / Germany
MPeXnetworks / www.mpexnetworks.de
Tel: ++49-30-78097 180 / Fax: ++49-30-78097 181

Sitz, Registergericht: Berlin, Amtsgericht Charlottenburg, HRB 76688
Geschäftsführer: Lars Bräuer, Gregor Lawatscheck

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


Re: Help needed regarding Jmeter JDBC request

Posted by Deepak Shetty <sh...@gmail.com>.
why not just use the variables feature?
> i need all to be used in my HTTP request
At the same time or in a loop?
regards
deepak

On Fri, Jul 16, 2010 at 2:44 AM, Nithya Prakash
<ni...@gmail.com>wrote:

> Hi all,
>
> I'm able to fetch the ID from the DB, when i do this operation i get many
> rows of different ID....
>
> Example
> ID
> 7584
> 7563
> 7542
> 7524
> .
> .
> .
> .
> 7400
>
> When i use this expression "ID(\s+)(.+)" for extracting the ID's am getting
> only "7584" selected... i need all to be used in my HTTP request..
> Which expression to be used for using all the ID's from the above result??
>
>
> Thanks & Regards
> --
> Nithya Prakash.L
>