if you arent running a multithreaded test , then your initial value needs
to be the maximum value in the DB + 1


On Wed, Feb 13, 2013 at 12:01 PM, Raihan Jamal <[email protected]>wrote:

> I made some progress on this. I have initialize counter variable like this-
>
>
> init variable (eg in "User Defined Variables"):
>
> Name:       | Value
> ------------+---------
> LoopCounter | 0
>
>
>
> And in my Parameter values I am using something like this now-
>
> *${__intSum(${LoopCounter},1,LoopCounter)}
> ,"{""lv"":[{""v"":{""regId"":null,""
> user"":null,""Id"":996},""cn"":1}],""lmd"":1360185}"*
> *
> *
>
> And my *LoopCounter* is something like this-
>
> Name:- LoopCounter
> Start:-  1
> Increment:- 1
> Maximum:- 1000
> Number format:- 000
>
>
> I have unchecked *Track counter independently for each user*
> *
> *
> But still I am getting exception thrown as Primary Key violation. Is there
> anything wrong I am doing here?
>
>
>
>
>
>
>
>
> *Raihan Jamal*
>
>
> 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*
> >
>

Reply via email to