You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jose Castro <ok...@gmail.com> on 2008/07/16 22:40:04 UTC

Correctly using sql query call

I want to call a sql query and then have the data populate a soap request

I would expect I could do something like

THREAD GROUP
JDBC_REQUEST (select col1, col2 from table)
FOREACH CONTROLLER
---SOAP REQUEST USING ${col1} and ${col2)


But no luck.

Could someone please provide the correct format to do this.

Thank you

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


Re: Correctly using sql query call

Posted by sebb <se...@gmail.com>.
On 17/07/2008, Jose Castro <ok...@gmail.com> wrote:
> It will be nice if jmeter has an output that shows the whole key/value
>  pairs. That way I could see what variables I have to work.
>

The Debug Sampler shows these:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Debug_Sampler


>  Now you got me confuse in something else.
>
>  If I want to loop through each line of a text file OR loop through
>  each row of data of a database. Is the for loop controller the one to
>  use??? Now, it seem to me that the forloop is too loop  only on , for
>  example, the results of a regular expression found in ONE line or ONE
>  row and NOT to loop through each line.
>
>
>
>  On Thu, Jul 17, 2008 at 3:45 AM, Andrey Beznogov <an...@googlemail.com> wrote:
>  > Hi,
>  >
>  > this is how it works.
>  >
>  > JMeter has a map (i.e. a list of key/value pairs) of variables, a
>  > separate one for every thread/loop. When you run the RegExp Extractor,
>  > you are basically adding more key/value pairs to that map.
>  >
>  > If, for example, you set the RegExp Extractor options like
>  >
>  > Reference Name     = refName
>  > Regular Expression = (.*),(.*)
>  > Template                = My request is $1$ and $2$
>  > Match No.              = -1
>  > Default Value          = ERROR
>  >
>  > and it matches, what happens is some key/value pairs are added to the
>  > map. Among others, the variables "refName_X" (X is the match number)
>  > are set to the the strings as generated by the template.
>  >
>  > Read more about it in the manual
>  > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor
>  >
>  > Lets say that for some thread your RegExp matched two strings, "A,B"
>  > and "C,D". Then (among others) you get two key/value pairs added to
>  > the JMeter variables map: ("refName_1","My request is A and B") and
>  > ("refName_2","My request is C and D"). "refName_3" etc are null. Those
>  > generated strings depend on how you set the Template.
>  >
>  > Then you can use those new key/value pairs in the ForEach Controller.
>  > If you set its options like this
>  >
>  > Input variable prefix = refName
>  > Output variable       = outputVar
>  > Use Separator       = yes
>  >
>  > It will keep setting the value of "outputVar" to the value "refName_X"
>  > (X = 1,2 ... is the loop counter) and running whats inside the
>  > controller until it encounters a "refName_X" which is not initialized
>  > (is null).
>  >
>  > In our example with two matches such ForeEach Controller will:
>  > 1) check the value of "refName_1", see that its not null, set the
>  > "outputVar" value to the value of "refName_1" ("My request is A and
>  > B") and run whats inside the controller
>  > 2) check the value of "refName_2", see that its not null, set the
>  > "outputVar" value to the value of "refName_2" ("My request is C and
>  > D") and run whats inside the controller
>  > 3) check the value of "refName_3", see that it is indeed null and stop the loop
>  >
>  > Then just use the value of outputVar (reference it like ${outputVar})
>  > inside the ForEach controller to customize your elements.
>  >
>  > I am not 100% sure about all the details and implementation, but it
>  > seems to work as described above.
>  >
>  > I hope that helps.
>  >
>  > Regards,
>  > Andrey
>  >
>  > On Thu, Jul 17, 2008 at 7:40 AM, Jose Castro <ok...@gmail.com> wrote:
>  >> So what you are saying I should do something like
>  >>
>  >> Thread Group
>  >> JDBC Reuqest select col1 || ',' || col2 from table
>  >> -----Reg Exp
>  >>      Ref Name                = inputVar
>  >>      Refular Expresssion = (.*),(.*)
>  >>      Template                  = $1$$2$
>  >>       Match No.               = -1
>  >>      Default Value            = 0,0
>  >> FOR EACH CONTROLLER
>  >>     INPUT VAR        = InputVar
>  >>    OUTPUTVAR      = OutputVar
>  >>
>  >>
>  >> And I am lost again.  I dont see how to get the data once I am in the foreach.
>  >>  Do I use user parameters?  How do I get those 2 columns??
>  >>
>  >> Thank you
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >>
>  >> On Wed, Jul 16, 2008 at 5:20 PM, sebb <se...@gmail.com> wrote:
>  >>> On 16/07/2008, Jose Castro <ok...@gmail.com> wrote:
>  >>>> I want to call a sql query and then have the data populate a soap request
>  >>>>
>  >>>>  I would expect I could do something like
>  >>>>
>  >>>>  THREAD GROUP
>  >>>>  JDBC_REQUEST (select col1, col2 from table)
>  >>>>  FOREACH CONTROLLER
>  >>>>  ---SOAP REQUEST USING ${col1} and ${col2)
>  >>>>
>  >>>>
>  >>>>  But no luck.
>  >>>>
>  >>>
>  >>> The SQL Sampler does not save results in variables.
>  >>>
>  >>> You can extract the values from the response data using the Regex
>  >>> Post-Processor.
>  >>>
>  >>>>  Could someone please provide the correct format to do this.
>  >>>>
>  >>>>  Thank you
>  >>>>
>  >>>>  ---------------------------------------------------------------------
>  >>>>  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
>  >>
>  >>
>  >
>  >
>  >
>  > --
>  > diem perdidi
>  >
>  > ---------------------------------------------------------------------
>  > 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: Correctly using sql query call

Posted by Andrey Beznogov <an...@googlemail.com>.
Hi,

RegExp Controller is only generating those key/value pairs. How you
use them is totally up to you.

If you want to RegExp extract the data from your SQL query, and then
use the extracted values together - all at once - to format a big SOAP
query string... Well, its a bit more complicated then just running a
ForEach loop.

Basically, you should use a new key/value pair, and put together
"something" which will modify that new variable by adding extracted
values plus the needed syntax to it. Then you can use that big
formatted string in your request.

I myself would do such thing by adding a BeanShell Sampler, which
allows you to run custom Java script. There you have full access to
those key/value pairs etc. It wont be a problem if you are familiar
with Java.

Read about it in the manual.
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#BeanShell_Sampler

Regards,
Andrey

On Thu, Jul 17, 2008 at 1:14 PM, Jose Castro <ok...@gmail.com> wrote:
> It will be nice if jmeter has an output that shows the whole key/value
> pairs. That way I could see what variables I have to work.
>
> Now you got me confuse in something else.
>
> If I want to loop through each line of a text file OR loop through
> each row of data of a database. Is the for loop controller the one to
> use??? Now, it seem to me that the forloop is too loop  only on , for
> example, the results of a regular expression found in ONE line or ONE
> row and NOT to loop through each line.
>
>
> On Thu, Jul 17, 2008 at 3:45 AM, Andrey Beznogov <an...@googlemail.com> wrote:
>> Hi,
>>
>> this is how it works.
>>
>> JMeter has a map (i.e. a list of key/value pairs) of variables, a
>> separate one for every thread/loop. When you run the RegExp Extractor,
>> you are basically adding more key/value pairs to that map.
>>
>> If, for example, you set the RegExp Extractor options like
>>
>> Reference Name     = refName
>> Regular Expression = (.*),(.*)
>> Template                = My request is $1$ and $2$
>> Match No.              = -1
>> Default Value          = ERROR
>>
>> and it matches, what happens is some key/value pairs are added to the
>> map. Among others, the variables "refName_X" (X is the match number)
>> are set to the the strings as generated by the template.
>>
>> Read more about it in the manual
>> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor
>>
>> Lets say that for some thread your RegExp matched two strings, "A,B"
>> and "C,D". Then (among others) you get two key/value pairs added to
>> the JMeter variables map: ("refName_1","My request is A and B") and
>> ("refName_2","My request is C and D"). "refName_3" etc are null. Those
>> generated strings depend on how you set the Template.
>>
>> Then you can use those new key/value pairs in the ForEach Controller.
>> If you set its options like this
>>
>> Input variable prefix = refName
>> Output variable       = outputVar
>> Use Separator       = yes
>>
>> It will keep setting the value of "outputVar" to the value "refName_X"
>> (X = 1,2 ... is the loop counter) and running whats inside the
>> controller until it encounters a "refName_X" which is not initialized
>> (is null).
>>
>> In our example with two matches such ForeEach Controller will:
>> 1) check the value of "refName_1", see that its not null, set the
>> "outputVar" value to the value of "refName_1" ("My request is A and
>> B") and run whats inside the controller
>> 2) check the value of "refName_2", see that its not null, set the
>> "outputVar" value to the value of "refName_2" ("My request is C and
>> D") and run whats inside the controller
>> 3) check the value of "refName_3", see that it is indeed null and stop the loop
>>
>> Then just use the value of outputVar (reference it like ${outputVar})
>> inside the ForEach controller to customize your elements.
>>
>> I am not 100% sure about all the details and implementation, but it
>> seems to work as described above.
>>
>> I hope that helps.
>>
>> Regards,
>> Andrey
>>
>> On Thu, Jul 17, 2008 at 7:40 AM, Jose Castro <ok...@gmail.com> wrote:
>>> So what you are saying I should do something like
>>>
>>> Thread Group
>>> JDBC Reuqest select col1 || ',' || col2 from table
>>> -----Reg Exp
>>>      Ref Name                = inputVar
>>>      Refular Expresssion = (.*),(.*)
>>>      Template                  = $1$$2$
>>>       Match No.               = -1
>>>      Default Value            = 0,0
>>> FOR EACH CONTROLLER
>>>     INPUT VAR        = InputVar
>>>    OUTPUTVAR      = OutputVar
>>>
>>>
>>> And I am lost again.  I dont see how to get the data once I am in the foreach.
>>>  Do I use user parameters?  How do I get those 2 columns??
>>>
>>> Thank you
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Jul 16, 2008 at 5:20 PM, sebb <se...@gmail.com> wrote:
>>>> On 16/07/2008, Jose Castro <ok...@gmail.com> wrote:
>>>>> I want to call a sql query and then have the data populate a soap request
>>>>>
>>>>>  I would expect I could do something like
>>>>>
>>>>>  THREAD GROUP
>>>>>  JDBC_REQUEST (select col1, col2 from table)
>>>>>  FOREACH CONTROLLER
>>>>>  ---SOAP REQUEST USING ${col1} and ${col2)
>>>>>
>>>>>
>>>>>  But no luck.
>>>>>
>>>>
>>>> The SQL Sampler does not save results in variables.
>>>>
>>>> You can extract the values from the response data using the Regex
>>>> Post-Processor.
>>>>
>>>>>  Could someone please provide the correct format to do this.
>>>>>
>>>>>  Thank you
>>>>>
>>>>>  ---------------------------------------------------------------------
>>>>>  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
>>>
>>>
>>
>>
>>
>> --
>> diem perdidi
>>
>> ---------------------------------------------------------------------
>> 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
>
>



-- 
diem perdidi

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


Re: Correctly using sql query call

Posted by Jose Castro <ok...@gmail.com>.
It will be nice if jmeter has an output that shows the whole key/value
pairs. That way I could see what variables I have to work.

Now you got me confuse in something else.

If I want to loop through each line of a text file OR loop through
each row of data of a database. Is the for loop controller the one to
use??? Now, it seem to me that the forloop is too loop  only on , for
example, the results of a regular expression found in ONE line or ONE
row and NOT to loop through each line.


On Thu, Jul 17, 2008 at 3:45 AM, Andrey Beznogov <an...@googlemail.com> wrote:
> Hi,
>
> this is how it works.
>
> JMeter has a map (i.e. a list of key/value pairs) of variables, a
> separate one for every thread/loop. When you run the RegExp Extractor,
> you are basically adding more key/value pairs to that map.
>
> If, for example, you set the RegExp Extractor options like
>
> Reference Name     = refName
> Regular Expression = (.*),(.*)
> Template                = My request is $1$ and $2$
> Match No.              = -1
> Default Value          = ERROR
>
> and it matches, what happens is some key/value pairs are added to the
> map. Among others, the variables "refName_X" (X is the match number)
> are set to the the strings as generated by the template.
>
> Read more about it in the manual
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor
>
> Lets say that for some thread your RegExp matched two strings, "A,B"
> and "C,D". Then (among others) you get two key/value pairs added to
> the JMeter variables map: ("refName_1","My request is A and B") and
> ("refName_2","My request is C and D"). "refName_3" etc are null. Those
> generated strings depend on how you set the Template.
>
> Then you can use those new key/value pairs in the ForEach Controller.
> If you set its options like this
>
> Input variable prefix = refName
> Output variable       = outputVar
> Use Separator       = yes
>
> It will keep setting the value of "outputVar" to the value "refName_X"
> (X = 1,2 ... is the loop counter) and running whats inside the
> controller until it encounters a "refName_X" which is not initialized
> (is null).
>
> In our example with two matches such ForeEach Controller will:
> 1) check the value of "refName_1", see that its not null, set the
> "outputVar" value to the value of "refName_1" ("My request is A and
> B") and run whats inside the controller
> 2) check the value of "refName_2", see that its not null, set the
> "outputVar" value to the value of "refName_2" ("My request is C and
> D") and run whats inside the controller
> 3) check the value of "refName_3", see that it is indeed null and stop the loop
>
> Then just use the value of outputVar (reference it like ${outputVar})
> inside the ForEach controller to customize your elements.
>
> I am not 100% sure about all the details and implementation, but it
> seems to work as described above.
>
> I hope that helps.
>
> Regards,
> Andrey
>
> On Thu, Jul 17, 2008 at 7:40 AM, Jose Castro <ok...@gmail.com> wrote:
>> So what you are saying I should do something like
>>
>> Thread Group
>> JDBC Reuqest select col1 || ',' || col2 from table
>> -----Reg Exp
>>      Ref Name                = inputVar
>>      Refular Expresssion = (.*),(.*)
>>      Template                  = $1$$2$
>>       Match No.               = -1
>>      Default Value            = 0,0
>> FOR EACH CONTROLLER
>>     INPUT VAR        = InputVar
>>    OUTPUTVAR      = OutputVar
>>
>>
>> And I am lost again.  I dont see how to get the data once I am in the foreach.
>>  Do I use user parameters?  How do I get those 2 columns??
>>
>> Thank you
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Jul 16, 2008 at 5:20 PM, sebb <se...@gmail.com> wrote:
>>> On 16/07/2008, Jose Castro <ok...@gmail.com> wrote:
>>>> I want to call a sql query and then have the data populate a soap request
>>>>
>>>>  I would expect I could do something like
>>>>
>>>>  THREAD GROUP
>>>>  JDBC_REQUEST (select col1, col2 from table)
>>>>  FOREACH CONTROLLER
>>>>  ---SOAP REQUEST USING ${col1} and ${col2)
>>>>
>>>>
>>>>  But no luck.
>>>>
>>>
>>> The SQL Sampler does not save results in variables.
>>>
>>> You can extract the values from the response data using the Regex
>>> Post-Processor.
>>>
>>>>  Could someone please provide the correct format to do this.
>>>>
>>>>  Thank you
>>>>
>>>>  ---------------------------------------------------------------------
>>>>  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
>>
>>
>
>
>
> --
> diem perdidi
>
> ---------------------------------------------------------------------
> 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: Correctly using sql query call

Posted by Andrey Beznogov <an...@googlemail.com>.
Hi,

this is how it works.

JMeter has a map (i.e. a list of key/value pairs) of variables, a
separate one for every thread/loop. When you run the RegExp Extractor,
you are basically adding more key/value pairs to that map.

If, for example, you set the RegExp Extractor options like

Reference Name     = refName
Regular Expression = (.*),(.*)
Template                = My request is $1$ and $2$
Match No.              = -1
Default Value          = ERROR

and it matches, what happens is some key/value pairs are added to the
map. Among others, the variables "refName_X" (X is the match number)
are set to the the strings as generated by the template.

Read more about it in the manual
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor

Lets say that for some thread your RegExp matched two strings, "A,B"
and "C,D". Then (among others) you get two key/value pairs added to
the JMeter variables map: ("refName_1","My request is A and B") and
("refName_2","My request is C and D"). "refName_3" etc are null. Those
generated strings depend on how you set the Template.

Then you can use those new key/value pairs in the ForEach Controller.
If you set its options like this

Input variable prefix = refName
Output variable       = outputVar
Use Separator       = yes

It will keep setting the value of "outputVar" to the value "refName_X"
(X = 1,2 ... is the loop counter) and running whats inside the
controller until it encounters a "refName_X" which is not initialized
(is null).

In our example with two matches such ForeEach Controller will:
1) check the value of "refName_1", see that its not null, set the
"outputVar" value to the value of "refName_1" ("My request is A and
B") and run whats inside the controller
2) check the value of "refName_2", see that its not null, set the
"outputVar" value to the value of "refName_2" ("My request is C and
D") and run whats inside the controller
3) check the value of "refName_3", see that it is indeed null and stop the loop

Then just use the value of outputVar (reference it like ${outputVar})
inside the ForEach controller to customize your elements.

I am not 100% sure about all the details and implementation, but it
seems to work as described above.

I hope that helps.

Regards,
Andrey

On Thu, Jul 17, 2008 at 7:40 AM, Jose Castro <ok...@gmail.com> wrote:
> So what you are saying I should do something like
>
> Thread Group
> JDBC Reuqest select col1 || ',' || col2 from table
> -----Reg Exp
>      Ref Name                = inputVar
>      Refular Expresssion = (.*),(.*)
>      Template                  = $1$$2$
>       Match No.               = -1
>      Default Value            = 0,0
> FOR EACH CONTROLLER
>     INPUT VAR        = InputVar
>    OUTPUTVAR      = OutputVar
>
>
> And I am lost again.  I dont see how to get the data once I am in the foreach.
>  Do I use user parameters?  How do I get those 2 columns??
>
> Thank you
>
>
>
>
>
>
>
>
>
>
>
> On Wed, Jul 16, 2008 at 5:20 PM, sebb <se...@gmail.com> wrote:
>> On 16/07/2008, Jose Castro <ok...@gmail.com> wrote:
>>> I want to call a sql query and then have the data populate a soap request
>>>
>>>  I would expect I could do something like
>>>
>>>  THREAD GROUP
>>>  JDBC_REQUEST (select col1, col2 from table)
>>>  FOREACH CONTROLLER
>>>  ---SOAP REQUEST USING ${col1} and ${col2)
>>>
>>>
>>>  But no luck.
>>>
>>
>> The SQL Sampler does not save results in variables.
>>
>> You can extract the values from the response data using the Regex
>> Post-Processor.
>>
>>>  Could someone please provide the correct format to do this.
>>>
>>>  Thank you
>>>
>>>  ---------------------------------------------------------------------
>>>  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
>
>



-- 
diem perdidi

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


Re: Correctly using sql query call

Posted by Jose Castro <ok...@gmail.com>.
So what you are saying I should do something like

Thread Group
JDBC Reuqest select col1 || ',' || col2 from table
-----Reg Exp
      Ref Name                = inputVar
      Refular Expresssion = (.*),(.*)
      Template                  = $1$$2$
       Match No.               = -1
      Default Value            = 0,0
FOR EACH CONTROLLER
     INPUT VAR        = InputVar
    OUTPUTVAR      = OutputVar


And I am lost again.  I dont see how to get the data once I am in the foreach.
 Do I use user parameters?  How do I get those 2 columns??

Thank you











On Wed, Jul 16, 2008 at 5:20 PM, sebb <se...@gmail.com> wrote:
> On 16/07/2008, Jose Castro <ok...@gmail.com> wrote:
>> I want to call a sql query and then have the data populate a soap request
>>
>>  I would expect I could do something like
>>
>>  THREAD GROUP
>>  JDBC_REQUEST (select col1, col2 from table)
>>  FOREACH CONTROLLER
>>  ---SOAP REQUEST USING ${col1} and ${col2)
>>
>>
>>  But no luck.
>>
>
> The SQL Sampler does not save results in variables.
>
> You can extract the values from the response data using the Regex
> Post-Processor.
>
>>  Could someone please provide the correct format to do this.
>>
>>  Thank you
>>
>>  ---------------------------------------------------------------------
>>  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: Correctly using sql query call

Posted by sebb <se...@gmail.com>.
On 16/07/2008, Jose Castro <ok...@gmail.com> wrote:
> I want to call a sql query and then have the data populate a soap request
>
>  I would expect I could do something like
>
>  THREAD GROUP
>  JDBC_REQUEST (select col1, col2 from table)
>  FOREACH CONTROLLER
>  ---SOAP REQUEST USING ${col1} and ${col2)
>
>
>  But no luck.
>

The SQL Sampler does not save results in variables.

You can extract the values from the response data using the Regex
Post-Processor.

>  Could someone please provide the correct format to do this.
>
>  Thank you
>
>  ---------------------------------------------------------------------
>  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