JDBC Request - all queries not getting executed for User 1 & User 2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

JDBC Request - all queries not getting executed for User 1 & User 2

prateekgommt
Hi,

I'm trying to execute DB queries ( input via CSV Config file) for multiple Users. But problem is that for every user , query is getting executed as per single row i.e. row 1 query is getting executed for User 1;  row 2  query is getting executed for User 2 ..

What I needed is that row 1 query & row 2 query should get execute for both User 1 & User 2.   please find attached screenshots of  Test Plan. 





::DISCLAIMER::

----------------------------------------------------------------------------------------------------------------------------------------------------


This message is intended only for the use of the addressee and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify us immediately by return e-mail and delete this e-mail and all attachments from your system.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: JDBC Request - all queries not getting executed for User 1 & User 2

Felix Schumacher


Am 20.08.2018 um 12:23 schrieb Prateek Dua:
> Hi,
>
> I'm trying to execute DB queries ( input via CSV Config file) for
> multiple Users. But problem is that for every user , query is getting
> executed as per single row i.e. row 1 query is getting executed for
> User 1;  row 2  query is getting executed for User 2 ..
>
> What I needed is that row 1 query & row 2 query should get execute for
> both User 1 & User 2.   please find attached screenshots of  Test Plan.
Screenshots get regularly removed by the mailing list, so we can't see
your screenshot. Try to describe what you see by text, only.

Have you tried to set "Max Number of Connections" to "0"? See
http://jmeter.apache.org/usermanual/component_reference.html#JDBC_Connection_Configuration 
for more information about the possible values of that field.

Regards,
  Felix

>
>
>
>
>
> ::DISCLAIMER::
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> This message is intended only for the use of the addressee and may
> contain information that is privileged, confidential and exempt from
> disclosure under applicable law. If the reader of this message is not
> the intended recipient, or the employee or agent responsible for
> delivering the message to the intended recipient, you are hereby
> notified that any dissemination, distribution or copying of this
> communication is strictly prohibited. If you have received this e-mail
> in error, please notify us immediately by return e-mail and delete
> this e-mail and all attachments from your system.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: JDBC Request - all queries not getting executed for User 1 & User 2

prateekgommt
Hey Felix,

Yes by default "Max Number of Connections" to "0". Let me explain my Config
& test plan hierarchy..  Under Thread group  ->  CSV Data Set config, Jdbc
request & View Results Tree components are added as per mentioned order.

*1. Thread group* : No of threads: 2  ; Ramp up time : 1 Sec ; Loop count
:2

*2. CSV Data Set Config *- *Filename*: changelog_mysql.sql ; *Variable name*:
conn ;* ignore first line:*false ; *Allow quoted data*: false ; *Recycle on
EOF:* True;  *Stop thread on  Eof *; *sharing mode*: All threads

*3. **Jdbc request - Query* *: *${conn} ; *Handle Resultset* : Store as
String

*4*. *JDBC config *:*Connection Pool Configuration : Max no of connections*:
0 ; *Transaction isolation* : default & rest of settings of this config are
kept same as by default.


So problem statement is  --- query#1 is getting executed twice for User 1 &
query#2( next query ) is getting twice executed for User 2.

*But what I want is that --query #1 & query#2 should get executed for User
1 & User 2*



On Mon, Aug 20, 2018 at 5:19 PM, Felix Schumacher <
[hidden email]> wrote:

>
>
> Am 20.08.2018 um 12:23 schrieb Prateek Dua:
>
>> Hi,
>>
>> I'm trying to execute DB queries ( input via CSV Config file) for
>> multiple Users. But problem is that for every user , query is getting
>> executed as per single row i.e. row 1 query is getting executed for User
>> 1;  row 2  query is getting executed for User 2 ..
>>
>> What I needed is that row 1 query & row 2 query should get execute for
>> both User 1 & User 2.   please find attached screenshots of  Test Plan.
>>
> Screenshots get regularly removed by the mailing list, so we can't see
> your screenshot. Try to describe what you see by text, only.
>
> Have you tried to set "Max Number of Connections" to "0"? See
> http://jmeter.apache.org/usermanual/component_reference.
> html#JDBC_Connection_Configuration for more information about the
> possible values of that field.
>
> Regards,
>  Felix
>
>
>>
>>
>>
>>
>> ::DISCLAIMER::
>>
>> ------------------------------------------------------------
>> ------------------------------------------------------------
>> ----------------------------
>>
>>
>> This message is intended only for the use of the addressee and may
>> contain information that is privileged, confidential and exempt from
>> disclosure under applicable law. If the reader of this message is not the
>> intended recipient, or the employee or agent responsible for delivering the
>> message to the intended recipient, you are hereby notified that any
>> dissemination, distribution or copying of this communication is strictly
>> prohibited. If you have received this e-mail in error, please notify us
>> immediately by return e-mail and delete this e-mail and all attachments
>> from your system.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>

--


::DISCLAIMER::


----------------------------------------------------------------------------------------------------------------------------------------------------





This message is intended only for the use of the addressee and may
contain information that is privileged, confidential and exempt from
disclosure under applicable law. If the reader of this message is not the
intended recipient, or the employee or agent responsible for delivering the
message to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this e-mail in error, please notify us
immediately by return e-mail and delete this e-mail and all attachments
from your system.
Reply | Threaded
Open this post in threaded view
|

Re: JDBC Request - all queries not getting executed for User 1 & User 2

Felix Schumacher


Am 20.08.2018 um 15:52 schrieb Prateek Dua:

> Hey Felix,
>
> Yes by default "Max Number of Connections" to "0". Let me explain my Config
> & test plan hierarchy..  Under Thread group  ->  CSV Data Set config, Jdbc
> request & View Results Tree components are added as per mentioned order.
>
> *1. Thread group* : No of threads: 2  ; Ramp up time : 1 Sec ; Loop count
> :2
>
> *2. CSV Data Set Config *- *Filename*: changelog_mysql.sql ; *Variable name*:
> conn ;* ignore first line:*false ; *Allow quoted data*: false ; *Recycle on
> EOF:* True;  *Stop thread on  Eof *; *sharing mode*: All threads
>
> *3. **Jdbc request - Query* *: *${conn} ; *Handle Resultset* : Store as
> String
>
> *4*. *JDBC config *:*Connection Pool Configuration : Max no of connections*:
> 0 ; *Transaction isolation* : default & rest of settings of this config are
> kept same as by default.
>
>
> So problem statement is  --- query#1 is getting executed twice for User 1 &
> query#2( next query ) is getting twice executed for User 2.
>
> *But what I want is that --query #1 & query#2 should get executed for User
> 1 & User 2*

So your statements are saved in the csv file, say something like:

select a from a;
select b from b;

(; being the separator for the csv and not the end char for SQL :)

Now your thread group is started with CSV in shared mode. Thread 1 is
getting first row of the csv and Thread 2 is getting the second row.
Then Thread 1 is ready to execute the next sample and reads again from
CSV and gets (again) row one.

Is this what you experience and don't want? Then try to use another
sharing mode for CSV Data Set.

Regards,
  Felix

>
>
>
> On Mon, Aug 20, 2018 at 5:19 PM, Felix Schumacher <
> [hidden email]> wrote:
>
>>
>> Am 20.08.2018 um 12:23 schrieb Prateek Dua:
>>
>>> Hi,
>>>
>>> I'm trying to execute DB queries ( input via CSV Config file) for
>>> multiple Users. But problem is that for every user , query is getting
>>> executed as per single row i.e. row 1 query is getting executed for User
>>> 1;  row 2  query is getting executed for User 2 ..
>>>
>>> What I needed is that row 1 query & row 2 query should get execute for
>>> both User 1 & User 2.   please find attached screenshots of  Test Plan.
>>>
>> Screenshots get regularly removed by the mailing list, so we can't see
>> your screenshot. Try to describe what you see by text, only.
>>
>> Have you tried to set "Max Number of Connections" to "0"? See
>> http://jmeter.apache.org/usermanual/component_reference.
>> html#JDBC_Connection_Configuration for more information about the
>> possible values of that field.
>>
>> Regards,
>>   Felix
>>
>>
>>>
>>>
>>>
>>> ::DISCLAIMER::
>>>
>>> ------------------------------------------------------------
>>> ------------------------------------------------------------
>>> ----------------------------
>>>
>>>
>>> This message is intended only for the use of the addressee and may
>>> contain information that is privileged, confidential and exempt from
>>> disclosure under applicable law. If the reader of this message is not the
>>> intended recipient, or the employee or agent responsible for delivering the
>>> message to the intended recipient, you are hereby notified that any
>>> dissemination, distribution or copying of this communication is strictly
>>> prohibited. If you have received this e-mail in error, please notify us
>>> immediately by return e-mail and delete this e-mail and all attachments
>>> from your system.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: JDBC Request - all queries not getting executed for User 1 & User 2

shettyd
In reply to this post by prateekgommt
Hi
you need sharing mode "Current thread" if you want each thread to read the
same data
https://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config
- See sharing mode

On Mon, Aug 20, 2018 at 6:53 AM Prateek Dua <[hidden email]> wrote:

> Hey Felix,
>
> Yes by default "Max Number of Connections" to "0". Let me explain my Config
> & test plan hierarchy..  Under Thread group  ->  CSV Data Set config, Jdbc
> request & View Results Tree components are added as per mentioned order.
>
> *1. Thread group* : No of threads: 2  ; Ramp up time : 1 Sec ; Loop count
> :2
>
> *2. CSV Data Set Config *- *Filename*: changelog_mysql.sql ; *Variable
> name*:
> conn ;* ignore first line:*false ; *Allow quoted data*: false ; *Recycle on
> EOF:* True;  *Stop thread on  Eof *; *sharing mode*: All threads
>
> *3. **Jdbc request - Query* *: *${conn} ; *Handle Resultset* : Store as
> String
>
> *4*. *JDBC config *:*Connection Pool Configuration : Max no of
> connections*:
> 0 ; *Transaction isolation* : default & rest of settings of this config are
> kept same as by default.
>
>
> So problem statement is  --- query#1 is getting executed twice for User 1 &
> query#2( next query ) is getting twice executed for User 2.
>
> *But what I want is that --query #1 & query#2 should get executed for User
> 1 & User 2*
>
>
>
> On Mon, Aug 20, 2018 at 5:19 PM, Felix Schumacher <
> [hidden email]> wrote:
>
> >
> >
> > Am 20.08.2018 um 12:23 schrieb Prateek Dua:
> >
> >> Hi,
> >>
> >> I'm trying to execute DB queries ( input via CSV Config file) for
> >> multiple Users. But problem is that for every user , query is getting
> >> executed as per single row i.e. row 1 query is getting executed for User
> >> 1;  row 2  query is getting executed for User 2 ..
> >>
> >> What I needed is that row 1 query & row 2 query should get execute for
> >> both User 1 & User 2.   please find attached screenshots of  Test Plan.
> >>
> > Screenshots get regularly removed by the mailing list, so we can't see
> > your screenshot. Try to describe what you see by text, only.
> >
> > Have you tried to set "Max Number of Connections" to "0"? See
> > http://jmeter.apache.org/usermanual/component_reference.
> > html#JDBC_Connection_Configuration for more information about the
> > possible values of that field.
> >
> > Regards,
> >  Felix
> >
> >
> >>
> >>
> >>
> >>
> >> ::DISCLAIMER::
> >>
> >> ------------------------------------------------------------
> >> ------------------------------------------------------------
> >> ----------------------------
> >>
> >>
> >> This message is intended only for the use of the addressee and may
> >> contain information that is privileged, confidential and exempt from
> >> disclosure under applicable law. If the reader of this message is not
> the
> >> intended recipient, or the employee or agent responsible for delivering
> the
> >> message to the intended recipient, you are hereby notified that any
> >> dissemination, distribution or copying of this communication is strictly
> >> prohibited. If you have received this e-mail in error, please notify us
> >> immediately by return e-mail and delete this e-mail and all attachments
> >> from your system.
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [hidden email]
> >> For additional commands, e-mail: [hidden email]
> >>
> >
> >
>
> --
>
>
> ::DISCLAIMER::
>
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>
>
>
> This message is intended only for the use of the addressee and may
> contain information that is privileged, confidential and exempt from
> disclosure under applicable law. If the reader of this message is not the
> intended recipient, or the employee or agent responsible for delivering
> the
> message to the intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this communication is strictly
> prohibited. If you have received this e-mail in error, please notify us
> immediately by return e-mail and delete this e-mail and all attachments
> from your system.
>