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 <[email protected]>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* >
