jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Generate Random Unique numbers using JMeter
Date Wed, 13 Feb 2013 20:20:33 GMT
hi
since JMeter is a multithreaded environment  - increment by one logic needs
synchronization.
You can use threadnumber plus an incremented variable -
or you can just have your db have an autoincremented key , no?



On Wed, Feb 13, 2013 at 11:41 AM, Raihan Jamal <jamalraihan@gmail.com>wrote:

> I am trying to insert into the below table currently using JMeter-
>
> INSERT INTO XMP_TEST2 (id, a_sellers) values (?, ?)
>
> Data Types for the above columns are-
>
> *id                String*
> *a_sellers     String*
>
> In the above table *id is the Primary Key. *So I need some way to generate
> unique id always either starting from 1 or any random unique numbers. Is
> there any way I can do that in JMeter?
>
> Currently in my Parameter Values, I am passing something like this to
> insert in the above two columns-
>
>
> ${__BeanShell(UUID.randomUUID().toString())}
> ,"{""lv"":[{""v"":{""regId"":null,""
> user"":null,""Id"":996},""cn"":1}],""lmd"":1360185}"
>
>
> And Parameter types is-
>
> VARCHAR,VARCHAR
>
>
> One approach I am thinking of is keep on increment by one every time. But
> how should I do in this JMeter?
>
> Does anyone has any experience on this particular problem?
>
>
> Looking forward for your replies.
>
>
>
>
> *Raihan Jamal*
>

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