Re: Error - csNoServiceDefined,Content-Transfer-Encoding: 8bit

2008-07-17 Thread Anand79


The observation during my run is as follows:
1. Run the test as Sysadmin (Oracle Content Management) works fine
2. Change the Authentication Manager to use an exter user getting
authenticated using Active Directory - Fails with the below error
In other words - We have NTLM authentication as the default and fails in
this case, were as when made Basic it works fine

Can you provide any pointers why this could happen..

- Anand


sebb-2-2 wrote:
> 
> On 17/07/2008, Anand79 <[EMAIL PROTECTED]> wrote:
>>
>>  Hi All,
>>
>>  When I run a HTTP Request sampler of a POST method I get the following
>> error
>>  message:
>>
>>  }!csNoServiceDefined,Content-Transfer-Encoding:
>>  8bitCHECKIN_NEW!syExceptionType,java.lang.Throwable
>>  java.lang.Throwable
>> at intradoc.common.IdcLogWriter.doMessageAppend(Unknown Source)
>> at intradoc.common.Log.addMessage(Unknown Source)
>> at intradoc.common.Log.errorEx2(Unknown Source)
>> at intradoc.common.LoggingUtils.logMessage(Unknown Source)
>> at intradoc.common.SystemUtils.reportErrorEx(Unknown Source)
>> at intradoc.common.SystemUtils.errEx(Unknown Source)
>> at intradoc.common.SystemUtils.err(Unknown Source)
>> at intradoc.server.ServiceManager.onError(Unknown Source)
>> at intradoc.server.ServiceManager.processCommand(Unknown Source)
>> at intradoc.server.IdcServerThread.run(Unknown Source)
>>
> 
> The above is not a JMeter errror message; I've no idea what it means.
> 
>>  Is there a configuration in JMeter where I can configure the
>>  'Content-Transfer-Encoding: 8bit' entry.
>>
> 
> The Header Manager can be used to send any headers you want:
> 
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#HTTP_Header_Manager
> 
> but it does not affect the data format, so it may not help.
> 
>>  - Anand
>>
>> --
>>  View this message in context:
>> http://www.nabble.com/Error---csNoServiceDefined%2CContent-Transfer-Encoding%3A-8bit-tp18501857p18501857.html
>>  Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Error---csNoServiceDefined%2CContent-Transfer-Encoding%3A-8bit-tp18501857p18523631.html
Sent from the JMeter - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JMeter tests stops abruptly

2008-07-17 Thread sebb
On 18/07/2008, msmolyak <[EMAIL PROTECTED]> wrote:
>
>  I am running stress tests against a EJB3 application deployed on Oracle
>  Application Server 10.1.3. In the development environment (small company
>  network) the JMeter tests run fine. When I try running the same tests in the
>  target environment (large corporate network) the tests runs for a certain
>  number of iterations and then stops.
>
>  The test includes a series of HTTP requests. I tried thread running 40, 20
>  and 10 users, 50 iterations each. The point where JMeter stops generating
>  request looks rather random. The test is definitely not complete (although
>  usually one thread usually completes by the time it stops). There are no
>  error messages. I waited for up to 30 minutes with no results. The only
>  thing I do it to stop the test. All the requests up to the point where test
>  stops are successful.
>
>  I tried setting httpclient.timeout value to 6 (ms) in jmeter.properties
>  file hoping that requests would time out. The property had no effect on the
>  test.
>
>  How do I discover the reason for interrupted tests?
>

Given that the tests work fine with the development server, it sounds
like there is a problem with the target server or network, especially
since the problem occurs with just 10 threads.

I suggest you speak to the server administrators and ask them to check
the logs to see if there are any problems.

>  Thank you,
>
>  Michael
>
> --
>  View this message in context: 
> http://www.nabble.com/JMeter-tests-stops-abruptly-tp18520055p18520055.html
>  Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JMeter tests stop abruptly

2008-07-17 Thread msmolyak

I am running stress tests against a EJB3 application deployed on Oracle
Application Server 10.1.3. In the development environment (small company
network) the JMeter tests run fine. When I try running the same tests in the
target environment (large corporate network) the tests runs for a certain
number of iterations and then stops.

The test includes a series of HTTP requests. I tried thread running 40, 20
and 10 users, 50 iterations each. The point where JMeter stops generating
request looks rather random. The test is definitely not complete (although
usually one thread usually completes by the time it stops). There are no
error messages. I waited for up to 30 minutes with no results. The only
thing I do it to stop the test. All the requests up to the point where test
stops are successful.

I tried setting httpclient.timeout value to 6 (ms) in jmeter.properties
file hoping that requests would time out. The property had no effect on the
test.

How do I discover the reason for interrupted tests?

Thank you,

Michael
-- 
View this message in context: 
http://www.nabble.com/JMeter-tests-stop-abruptly-tp18520055p18520055.html
Sent from the JMeter - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SQL call returns header as the first line

2008-07-17 Thread sebb
On 17/07/2008, Jose Castro <[EMAIL PROTECTED]> wrote:
> I am using a sql call to drive my test plan.  It works, except that
>  the sql call returns the column name as part of the returned data(in
>  the first row). So My first test will fail(because it contains the
>  column name instead of the data).
>
>  Is there any way to fix it?

Skip the first row?

You don't say how you are using the data, so it's difficult to offer a
sensible suggestion.

>
>  I dont see any benefits in having that columns name returned as part
>  of the data.

That is how many SQL selects work.

>  Thank you
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error - csNoServiceDefined,Content-Transfer-Encoding: 8bit

2008-07-17 Thread sebb
On 17/07/2008, Anand79 <[EMAIL PROTECTED]> wrote:
>
>  Hi All,
>
>  When I run a HTTP Request sampler of a POST method I get the following error
>  message:
>
>  }!csNoServiceDefined,Content-Transfer-Encoding:
>  8bitCHECKIN_NEW!syExceptionType,java.lang.Throwable
>  java.lang.Throwable
> at intradoc.common.IdcLogWriter.doMessageAppend(Unknown Source)
> at intradoc.common.Log.addMessage(Unknown Source)
> at intradoc.common.Log.errorEx2(Unknown Source)
> at intradoc.common.LoggingUtils.logMessage(Unknown Source)
> at intradoc.common.SystemUtils.reportErrorEx(Unknown Source)
> at intradoc.common.SystemUtils.errEx(Unknown Source)
> at intradoc.common.SystemUtils.err(Unknown Source)
> at intradoc.server.ServiceManager.onError(Unknown Source)
> at intradoc.server.ServiceManager.processCommand(Unknown Source)
> at intradoc.server.IdcServerThread.run(Unknown Source)
>

The above is not a JMeter errror message; I've no idea what it means.

>  Is there a configuration in JMeter where I can configure the
>  'Content-Transfer-Encoding: 8bit' entry.
>

The Header Manager can be used to send any headers you want:

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

but it does not affect the data format, so it may not help.

>  - Anand
>
> --
>  View this message in context: 
> http://www.nabble.com/Error---csNoServiceDefined%2CContent-Transfer-Encoding%3A-8bit-tp18501857p18501857.html
>  Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Correctly using sql query call

2008-07-17 Thread sebb
On 17/07/2008, Jose Castro <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
>  >>> On 16/07/2008, Jose Castro <[EMAIL PROTECTED]> 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
>  
>    

how to print all jmeter variables

2008-07-17 Thread Jose Castro
in my previous email ,I asked this. The answer is debug sampler

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: JMS in combination with authentication

2008-07-17 Thread Fitzpatrick, Adrian

Hi,

We have used the JMS sampler with authentication with WebLogic and it
(nearly) works - I think what we have done should be applicable for you as
well. The "nearly" is because we have had to open a support case with BEA on
an issue we are having with JMS authorisation (i.e. after authentication),
but I dont think this will affect you.

Anyway, what we needed to do to use authentication was to add the properties
for authentication to the JNDI properties section of the JMS sampler. 

The properties we added were "java.naming.security.principal" (username) and
"java.naming.security.credentials" (password). 

If you look at the JMeter code, you will see it adds all properties from this
section to the Initial context, so you shouldn't have to change the code at
all. 

Note - the two properties we are adding correspond to the values of the Java
static variables Context.SECURITY_PRINCIPAL and Context.SECURITY_CREDENTIALS.
If we were coding a standalone Java client to connect our JMS server, these
are the variables we would reference when supplying authentication details.
Eg. - 

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "http://127.0.0.1:7001";);
env.put(Context.SECURITY_PRINCIPAL, "weblogic"); 
env.put(Context.SECURITY_CREDENTIALS, "weblogic"); 
InitialContext ic = new InitialContext(env);
QueueConnectionFactory qconFactory = (QueueConnectionFactory)
ic.lookup("myConnFact");
QueueConnection qcon = qconFactory.createQueueConnection();
qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueSession queue = (Queue) ic.lookup("myQueue");
QueueSender qsender = qsession.createSender(queue);

I'm not familar with MQSeries, but if that Java code would look different for
you JMS clients, then you'll need to adjust the way you use the JMS sampler
accordingly.

Hope this helps - let me know how you get on!

Regards,

Adrian


-Original Message-
From: Ronald Van de Kuil [mailto:[EMAIL PROTECTED]
Sent: 17 July 2008 15:24
To: JMeter Users List
Cc: Dick Sol
Subject: JMS in combination with authentication


Hello JMeter users,

I have figured out how to send JMS messages to IBM MQSeries. We can send 
messages to a queue manager which is not secured with a user and a 
password.

The trick is easy:
- use the com.sun.jndi.fscontext.RefFSContextFactory class as initial 
context factory with a url to the JNDI repository;
- use IBM JMSAdmin tool to create a JNDI mapping between your JMS world 
and the MQ world in your JNDI repository;

We are trying to take it a step further by sending a message to a 
queuemanager that has a user and a password set.

Unfortunatly we have been struggling with getting it to work for a two 
days now after having tried various approaches.

I can see in the source of jmeter that all calls to the queue connection 
factory are of the type:

public QueueConnection createQueueConnection() throws JMSException

Am I right that I will have to modify the code of jmeter to get it to 
supply the user and password. Like as in:

public QueueConnection createQueueConnection(String userName, String 
password) throws JMSException

Can anyone advise me on what to do next?


Thanx / Met Vriendelijke Groet,
Ronald van de Kuil

Stuck in the past somewhere in the future? NO WAY!!!

Tenzij hierboven anders aangegeven: / Unless stated otherwise above:
IBM Nederland B.V.
Gevestigd te Amsterdam
Inschrijving Handelsregister Amsterdam Nr. 33054214




This message has been delivered to the Internet by the Revenue Internet e-mail 
service (OP)

*

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SQL call returns header as the first line

2008-07-17 Thread Jose Castro
I am using a sql call to drive my test plan.  It works, except that
the sql call returns the column name as part of the returned data(in
the first row). So My first test will fail(because it contains the
column name instead of the data).

Is there any way to fix it?

I dont see any benefits in having that columns name returned as part
of the data.

Thank you

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JMS in combination with authentication

2008-07-17 Thread Ronald Van de Kuil
Hello JMeter users,

I have figured out how to send JMS messages to IBM MQSeries. We can send 
messages to a queue manager which is not secured with a user and a 
password.

The trick is easy:
- use the com.sun.jndi.fscontext.RefFSContextFactory class as initial 
context factory with a url to the JNDI repository;
- use IBM JMSAdmin tool to create a JNDI mapping between your JMS world 
and the MQ world in your JNDI repository;

We are trying to take it a step further by sending a message to a 
queuemanager that has a user and a password set.

Unfortunatly we have been struggling with getting it to work for a two 
days now after having tried various approaches.

I can see in the source of jmeter that all calls to the queue connection 
factory are of the type:

public QueueConnection createQueueConnection() throws JMSException

Am I right that I will have to modify the code of jmeter to get it to 
supply the user and password. Like as in:

public QueueConnection createQueueConnection(String userName, String 
password) throws JMSException

Can anyone advise me on what to do next?


Thanx / Met Vriendelijke Groet,
Ronald van de Kuil

Stuck in the past somewhere in the future? NO WAY!!!

Tenzij hierboven anders aangegeven: / Unless stated otherwise above:
IBM Nederland B.V.
Gevestigd te Amsterdam
Inschrijving Handelsregister Amsterdam Nr. 33054214


Re: Correctly using sql query call

2008-07-17 Thread Andrey Beznogov
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
 On 16/07/2008, Jose Castro <[EMAIL PROTECTED]> wrote:
> I want to call a sql query and then have the data populate a soap request
>
>  I

Re: Correctly using sql query call

2008-07-17 Thread Jose Castro
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
>>> On 16/07/2008, Jose Castro <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
> --
> diem perdidi
>
> -

Re: Correctly using sql query call

2008-07-17 Thread Andrey Beznogov
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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> wrote:
>> On 16/07/2008, Jose Castro <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
>>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
diem perdidi

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]