jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Passing the JDBC query values list from one thread group to another
Date Mon, 06 Jan 2020 22:43:28 GMT
Hi
if you want to pass complex data between thread groups /threads , you can
a. Use properties like you mentioned. Complex data needs complex schemes
(e.g. Store a JSON string which can have an array of objects and parse it)
- Messy for most,non simple, use cases
b. Use a plugin like
https://jmeter-plugins.org/wiki/InterThreadCommunication/ . Useful when
data is to be generated and consumed at the same time.
c. Use something that can be shared across thread groups - e.g. Files /
RDBMS / Redis etc. So in your example use a setup thread group and write
the data you want to a CSV file and then read it from the following
threadgroups that need it. In your case you seem to be implying that you
want to generate the data once and then read it from multiple thread groups.
d. Write your own java code that can deal with data as it wishes.
Bear in mind , what you want to happen if you distribute this script across
multiple JMeter servers - some sharing methods are scoped to the JVM(in
memory) , others to the host (files) and others to the script (DB)

regards
dee[al

On Mon, Jan 6, 2020 at 1:01 AM Soumya Nayak <snayak@firstam.com> wrote:

> Hi Divyang,
>
> For same thread group I am able to achieve.
> But my requirement is like I have the JDBC request in one thread group and
> want to pass the values from the JDBC request to another thread group. Why
> am asking so is there are 16 thread groups which will use the data from the
> JDBC request , so rather than calling it 16 times I wanted to call once.
>
> Regards,
> Soumya
>
> From: Divyang Raval <divyagraval@gmail.com>
> Sent: Monday, January 6, 2020 2:28 PM
> To: Soumya Nayak <snayak@firstam.com>
> Cc: JMeter Users List <user@jmeter.apache.org>
> Subject: Re: Passing the JDBC query values list from one thread group to
> another
>
> I would prefer in same thread group.
>
>
> On Mon, Jan 6, 2020 at 1:32 PM Soumya Nayak <snayak@firstam.com<mailto:
> snayak@firstam.com>> wrote:
> Hi Divyang,
>
> So the Step – 1 will be in one thread group.
> And the Step-2 will be in the other thread group right?
>
> Regards,
> Soumya
>
> From: Divyang Raval <divyagraval@gmail.com<mailto:divyagraval@gmail.com>>
> Sent: Monday, January 6, 2020 12:53 PM
> To: Soumya Nayak <snayak@firstam.com<mailto:snayak@firstam.com>>
> Cc: JMeter Users List <user@jmeter.apache.org<mailto:
> user@jmeter.apache.org>>
> Subject: Re: Passing the JDBC query values list from one thread group to
> another
>
> Hi Soumya,
>
> It can be achieved in 2 steps.
>
> Step-1:
> Add Regx extractor on JDBC query response to extract target field.
> While extracting list of values you can set Match No.= -1.
> Let's say variable name in Regx extractor is "listdata".
>
> Step-2 : Add For each controller in test plan and give input variable=
> listdata.
> And output variable let's say "data".
> Check the check box of add _.
>
> Under this controller add your next request where you want to iterate
> based on JDBC output you recieved and use ${data} to achieve the target.
>
> Feel free to let me know if you find any difficulty while execution.
>
> Regards,
> Divyang
>
>
> On Mon, Jan 6, 2020, 12:33 PM Soumya Nayak <snayak@firstam.com<mailto:
> snayak@firstam.com><mailto:snayak@firstam.com<mailto:snayak@firstam.com>>>
> wrote:
> Hi Team,
>
> I have a set up thread group where I am running a JDBC request to get some
> "n" no of row data into 4 variables.
> Now I want to access all the above variable values in a loop(for n DB
> records) in another thread group. How can I achieve this?
>
> For a single variable value access I was able to achieve by defining a
> bean shell assertion and setting the variable as a property
> (${__setProperty()) and accessing the property({__property()} in another
> thread group.  But , how to achieve the same when we have a list of values
> fetched from JDBC request in one thread group and access all the list
> another thread group ?
>
> Regards,
> Soumya
>
>
> ******************************************************************************************
> This message may contain confidential or proprietary information intended
> only for the use of the
> addressee(s) named above or may contain information that is legally
> privileged. If you are
> not the intended addressee, or the person responsible for delivering it to
> the intended addressee,
> you are hereby notified that reading, disseminating, distributing or
> copying this message is strictly
> prohibited. If you have received this message by mistake, please
> immediately notify us by
> replying to the message and delete the original message and any copies
> immediately thereafter.
>
> If you received this email as a commercial message and would like to opt
> out of future commercial
> messages, please let us know and we will remove you from our distribution
> list.
>
> Thank you.~
>
> ******************************************************************************************
> FAFLD
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message