Re: Generate User Id dynamically

2019-03-10 Thread Prateek Dua
Ok..got it, thanks

On Sun, Mar 10, 2019 at 3:27 AM Deepak Shetty  wrote:

> If you are using User{__threadNum} and running say 10 threads , you will
> get User1...User10. If you stop the test and run it again - or if you let
> the thread group have multiple iterations - or if you decide to distribute
> your test across multiple JMeter machines , then it will again generate
> User1...User10 (i.e. uniqueness is only within a single iteration on a
> single JVM) -
>
> On Sat, Mar 9, 2019 at 10:45 AM Prateek Dua 
> wrote:
>
> > pls explain this in a bit detail.
> >
> > On Sat, Mar 9, 2019 at 11:24 PM Deepak Shetty  wrote:
> >
> > > Note this doesnt mean if you run the test 2 times it will generate the
> > same
> > > numbers
> > >
> > > On Sat, Mar 9, 2019 at 3:51 AM Prateek Dua 
> > wrote:
> > >
> > > > Thank you guys,
> > > >
> > > > I used the function {__threadNum} to input thread id as user id.
> > > >
> > > > On Thu, Mar 7, 2019 at 8:17 PM Indu Gupta 
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > You can add below lines in body Data of your request :
> > > > >
> > > > > {
> > > > > "username": user${__Random(0,100)}
> > > > >
> > > > > }
> > > > >
> > > > > This will generate user as user1,user0, user 2 etc. Random number
> of
> > > > users
> > > > > 0 and 100.
> > > > >
> > > > >
> > > > >
> > > > > Regards,
> > > > > Indu Gupta
> > > > >
> > > > >
> > > > >
> > > > > -Original Message-
> > > > > From: Prateek Dua [mailto:prateek@go-mmt.com]
> > > > > Sent: 07 March 2019 12:40
> > > > > To: JMeter Users List ; JMeter
> Users
> > > > List
> > > > > 
> > > > > Subject: Re: Generate User Id dynamically
> > > > >
> > > > > I meant-- via CSV we have to provide users in sheet & then get them
> > > .But
> > > > > is there any mechanism in Jmeter via we can use directly to create
> > user
> > > > id
> > > > > dynamically & pass as a variable in script.
> > > > >
> > > > > On Thu, Mar 7, 2019 at 8:33 AM Prateek Dua  >
> > > > wrote:
> > > > >
> > > > > > Hey guys,
> > > > > >
> > > > > > Is there any way to generate unique user ids dynamically to use
> > them
> > > > > > in a script as a variable.
> > > > > >
> > > > > > CSV is the 1 approach to do that but just want to know is there
> any
> > > > > > mechanism to do that?
> > > > > > --
> > > > > > sent via device, pls ignore typos.
> > > > > >
> > > > >
> > > > > --
> > > > >
> > > > >
> > > > > ::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.
> > > > >
> > > >
> > > > --
> > > >
> > > >
> > > > ::DISCLAIMER::
> > > >
> > > >
> > >

Re: Generate User Id dynamically

2019-03-09 Thread Deepak Shetty
If you are using User{__threadNum} and running say 10 threads , you will
get User1...User10. If you stop the test and run it again - or if you let
the thread group have multiple iterations - or if you decide to distribute
your test across multiple JMeter machines , then it will again generate
User1...User10 (i.e. uniqueness is only within a single iteration on a
single JVM) -

On Sat, Mar 9, 2019 at 10:45 AM Prateek Dua  wrote:

> pls explain this in a bit detail.
>
> On Sat, Mar 9, 2019 at 11:24 PM Deepak Shetty  wrote:
>
> > Note this doesnt mean if you run the test 2 times it will generate the
> same
> > numbers
> >
> > On Sat, Mar 9, 2019 at 3:51 AM Prateek Dua 
> wrote:
> >
> > > Thank you guys,
> > >
> > > I used the function {__threadNum} to input thread id as user id.
> > >
> > > On Thu, Mar 7, 2019 at 8:17 PM Indu Gupta 
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > You can add below lines in body Data of your request :
> > > >
> > > > {
> > > > "username": user${__Random(0,100)}
> > > >
> > > > }
> > > >
> > > > This will generate user as user1,user0, user 2 etc. Random number of
> > > users
> > > > 0 and 100.
> > > >
> > > >
> > > >
> > > > Regards,
> > > > Indu Gupta
> > > >
> > > >
> > > >
> > > > -Original Message-
> > > > From: Prateek Dua [mailto:prateek@go-mmt.com]
> > > > Sent: 07 March 2019 12:40
> > > > To: JMeter Users List ; JMeter Users
> > > List
> > > > 
> > > > Subject: Re: Generate User Id dynamically
> > > >
> > > > I meant-- via CSV we have to provide users in sheet & then get them
> > .But
> > > > is there any mechanism in Jmeter via we can use directly to create
> user
> > > id
> > > > dynamically & pass as a variable in script.
> > > >
> > > > On Thu, Mar 7, 2019 at 8:33 AM Prateek Dua 
> > > wrote:
> > > >
> > > > > Hey guys,
> > > > >
> > > > > Is there any way to generate unique user ids dynamically to use
> them
> > > > > in a script as a variable.
> > > > >
> > > > > CSV is the 1 approach to do that but just want to know is there any
> > > > > mechanism to do that?
> > > > > --
> > > > > sent via device, pls ignore typos.
> > > > >
> > > >
> > > > --
> > > >
> > > >
> > > > ::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.
> > > >
> > >
> > > --
> > >
> > >
> > > ::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.
> > >
> >
>
> --
>
>
> ::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.
>


Re: Generate User Id dynamically

2019-03-09 Thread Prateek Dua
pls explain this in a bit detail.

On Sat, Mar 9, 2019 at 11:24 PM Deepak Shetty  wrote:

> Note this doesnt mean if you run the test 2 times it will generate the same
> numbers
>
> On Sat, Mar 9, 2019 at 3:51 AM Prateek Dua  wrote:
>
> > Thank you guys,
> >
> > I used the function {__threadNum} to input thread id as user id.
> >
> > On Thu, Mar 7, 2019 at 8:17 PM Indu Gupta 
> > wrote:
> >
> > > Hi,
> > >
> > > You can add below lines in body Data of your request :
> > >
> > > {
> > > "username": user${__Random(0,100)}
> > >
> > > }
> > >
> > > This will generate user as user1,user0, user 2 etc. Random number of
> > users
> > > 0 and 100.
> > >
> > >
> > >
> > > Regards,
> > > Indu Gupta
> > >
> > >
> > >
> > > -Original Message-
> > > From: Prateek Dua [mailto:prateek@go-mmt.com]
> > > Sent: 07 March 2019 12:40
> > > To: JMeter Users List ; JMeter Users
> > List
> > > 
> > > Subject: Re: Generate User Id dynamically
> > >
> > > I meant-- via CSV we have to provide users in sheet & then get them
> .But
> > > is there any mechanism in Jmeter via we can use directly to create user
> > id
> > > dynamically & pass as a variable in script.
> > >
> > > On Thu, Mar 7, 2019 at 8:33 AM Prateek Dua 
> > wrote:
> > >
> > > > Hey guys,
> > > >
> > > > Is there any way to generate unique user ids dynamically to use them
> > > > in a script as a variable.
> > > >
> > > > CSV is the 1 approach to do that but just want to know is there any
> > > > mechanism to do that?
> > > > --
> > > > sent via device, pls ignore typos.
> > > >
> > >
> > > --
> > >
> > >
> > > ::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.
> > >
> >
> > --
> >
> >
> > ::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.
> >
>

-- 


::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.


Re: Generate User Id dynamically

2019-03-09 Thread Deepak Shetty
Note this doesnt mean if you run the test 2 times it will generate the same
numbers

On Sat, Mar 9, 2019 at 3:51 AM Prateek Dua  wrote:

> Thank you guys,
>
> I used the function {__threadNum} to input thread id as user id.
>
> On Thu, Mar 7, 2019 at 8:17 PM Indu Gupta 
> wrote:
>
> > Hi,
> >
> > You can add below lines in body Data of your request :
> >
> > {
> > "username": user${__Random(0,100)}
> >
> > }
> >
> > This will generate user as user1,user0, user 2 etc. Random number of
> users
> > 0 and 100.
> >
> >
> >
> > Regards,
> > Indu Gupta
> >
> >
> >
> > -Original Message-----
> > From: Prateek Dua [mailto:prateek@go-mmt.com]
> > Sent: 07 March 2019 12:40
> > To: JMeter Users List ; JMeter Users
> List
> > 
> > Subject: Re: Generate User Id dynamically
> >
> > I meant-- via CSV we have to provide users in sheet & then get them .But
> > is there any mechanism in Jmeter via we can use directly to create user
> id
> > dynamically & pass as a variable in script.
> >
> > On Thu, Mar 7, 2019 at 8:33 AM Prateek Dua 
> wrote:
> >
> > > Hey guys,
> > >
> > > Is there any way to generate unique user ids dynamically to use them
> > > in a script as a variable.
> > >
> > > CSV is the 1 approach to do that but just want to know is there any
> > > mechanism to do that?
> > > --
> > > sent via device, pls ignore typos.
> > >
> >
> > --
> >
> >
> > ::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.
> >
>
> --
>
>
> ::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.
>


Re: Generate User Id dynamically

2019-03-09 Thread Prateek Dua
Thank you guys,

I used the function {__threadNum} to input thread id as user id.

On Thu, Mar 7, 2019 at 8:17 PM Indu Gupta  wrote:

> Hi,
>
> You can add below lines in body Data of your request :
>
> {
> "username": user${__Random(0,100)}
>
> }
>
> This will generate user as user1,user0, user 2 etc. Random number of users
> 0 and 100.
>
>
>
> Regards,
> Indu Gupta
>
>
>
> -Original Message-
> From: Prateek Dua [mailto:prateek@go-mmt.com]
> Sent: 07 March 2019 12:40
> To: JMeter Users List ; JMeter Users List
> 
> Subject: Re: Generate User Id dynamically
>
> I meant-- via CSV we have to provide users in sheet & then get them .But
> is there any mechanism in Jmeter via we can use directly to create user id
> dynamically & pass as a variable in script.
>
> On Thu, Mar 7, 2019 at 8:33 AM Prateek Dua  wrote:
>
> > Hey guys,
> >
> > Is there any way to generate unique user ids dynamically to use them
> > in a script as a variable.
> >
> > CSV is the 1 approach to do that but just want to know is there any
> > mechanism to do that?
> > --
> > sent via device, pls ignore typos.
> >
>
> --
>
>
> ::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.
>

-- 


::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.


RE: Generate User Id dynamically

2019-03-07 Thread Indu Gupta
Hi,

You can add below lines in body Data of your request :

{
"username": user${__Random(0,100)}
 
}

This will generate user as user1,user0, user 2 etc. Random number of users 0 
and 100.



Regards,
Indu Gupta
  


-Original Message-
From: Prateek Dua [mailto:prateek@go-mmt.com] 
Sent: 07 March 2019 12:40
To: JMeter Users List ; JMeter Users List 

Subject: Re: Generate User Id dynamically

I meant-- via CSV we have to provide users in sheet & then get them .But is 
there any mechanism in Jmeter via we can use directly to create user id 
dynamically & pass as a variable in script.

On Thu, Mar 7, 2019 at 8:33 AM Prateek Dua  wrote:

> Hey guys,
>
> Is there any way to generate unique user ids dynamically to use them 
> in a script as a variable.
>
> CSV is the 1 approach to do that but just want to know is there any 
> mechanism to do that?
> --
> sent via device, pls ignore typos.
>

-- 


::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.


Re: Generate User Id dynamically

2019-03-07 Thread Deepak Shetty
Use some combination of __time, __threadnum, __random ,__counter - The best
is UUID if your system can handle it. If all else fails there is always
__groovy/javascript/beanshell. You can even use this in UserParameters.
https://jmeter.apache.org/usermanual/functions.html

CSVs have an advantage that it keeps the test simpler and you also have a
record of what you created as well as you can reset your environment and
run the exact same test with the same usernames.



On Thu, Mar 7, 2019 at 11:03 AM Prateek Dua  wrote:

> Hey guys,
>
> Is there any way to generate unique user ids dynamically to use them in a
> script as a variable.
>
> CSV is the 1 approach to do that but just want to know is there any
> mechanism to do that?
> --
> sent via device, pls ignore typos.
>
> --
>
>
> ::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.
>


Re: Generate User Id dynamically

2019-03-06 Thread Prateek Dua
I meant-- via CSV we have to provide users in sheet & then get them .But is
there any mechanism in Jmeter via we can use directly to create user id
dynamically & pass as a variable in script.

On Thu, Mar 7, 2019 at 8:33 AM Prateek Dua  wrote:

> Hey guys,
>
> Is there any way to generate unique user ids dynamically to use them in a
> script as a variable.
>
> CSV is the 1 approach to do that but just want to know is there any
> mechanism to do that?
> --
> sent via device, pls ignore typos.
>

-- 


::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.