You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by sebb <se...@gmail.com> on 2009/08/04 14:15:35 UTC
Re: checking the database for unique number created using random
variable
On 04/08/2009, sudheer reddy <gs...@gmail.com> wrote:
> Hi All
>
> Am using jmeter for functional testing of a scenario.
>
> I have to assign a unique number to a http request.
>
> for this i have associated a random variable to create a number.
>
> the issue now is if the number already exists in database it will not allow
> the thread to complete the request.
>
> how can i check number generated using random variable exists in database?
> and if exists how can i add next number i mean next unique number in the
> series to the request which is unique in the database.
>
> assist me in resolving this.
We had a similar requirement, and the way we solved it was to create
files of random numbers. For each test, we would use a different file.
In our case, we originally started with an empty database, so we knew
that all the files we generated were valid.
I suggest you do something similar, i.e. create files of numbers
before the test and validate them.
> thanks in advance
>
>
> rgds
>
>
> Sudheer
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: checking the database for unique number created using random
variable
Posted by sebb <se...@gmail.com>.
On 04/08/2009, sudheer reddy <gs...@gmail.com> wrote:
> Hi Sebb
>
> Thanks for your reply.
>
> I have tried in different way but for completing the the threads it is
> taking long time. let me share how i have done it.
>
> in the thread group i have added a random variable and filled the values in
> it declared variable name as X.
>
> i have passed the variable declared in random varible in JDBC request to
> find the number exists in database or not by writing a query to check the
> database. variable name in jdbc request is Y
>
> i added a while controller and added http request as a child to this
> while controller, in while controller gave condition ${x} == ${y}.
Surely you need to us an If Controller?
> when i run the test the test is not completing it is taking more time.
>
>
> can u assist me in completing the above.
>
>
> rgds
>
> Sudheer
>
>
>
>
>
>
>
>
>
> On Tue, Aug 4, 2009 at 5:45 PM, sebb <se...@gmail.com> wrote:
>
> > On 04/08/2009, sudheer reddy <gs...@gmail.com> wrote:
> > > Hi All
> > >
> > > Am using jmeter for functional testing of a scenario.
> > >
> > > I have to assign a unique number to a http request.
> > >
> > > for this i have associated a random variable to create a number.
> > >
> > > the issue now is if the number already exists in database it will not
> > allow
> > > the thread to complete the request.
> > >
> > > how can i check number generated using random variable exists in
> > database?
> > > and if exists how can i add next number i mean next unique number in
> > the
> > > series to the request which is unique in the database.
> > >
> > > assist me in resolving this.
> >
> > We had a similar requirement, and the way we solved it was to create
> > files of random numbers. For each test, we would use a different file.
> > In our case, we originally started with an empty database, so we knew
> > that all the files we generated were valid.
> >
> > I suggest you do something similar, i.e. create files of numbers
> > before the test and validate them.
> >
> > > thanks in advance
> > >
> > >
> > > rgds
> > >
> > >
> > > Sudheer
> > >
> >
>
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: checking the database for unique number created using random
variable
Posted by sudheer reddy <gs...@gmail.com>.
Hi Sebb
Thanks for your reply.
I have tried in different way but for completing the the threads it is
taking long time. let me share how i have done it.
in the thread group i have added a random variable and filled the values in
it declared variable name as X.
i have passed the variable declared in random varible in JDBC request to
find the number exists in database or not by writing a query to check the
database. variable name in jdbc request is Y
i added a while controller and added http request as a child to this
while controller, in while controller gave condition ${x} == ${y}.
when i run the test the test is not completing it is taking more time.
can u assist me in completing the above.
rgds
Sudheer
On Tue, Aug 4, 2009 at 5:45 PM, sebb <se...@gmail.com> wrote:
> On 04/08/2009, sudheer reddy <gs...@gmail.com> wrote:
> > Hi All
> >
> > Am using jmeter for functional testing of a scenario.
> >
> > I have to assign a unique number to a http request.
> >
> > for this i have associated a random variable to create a number.
> >
> > the issue now is if the number already exists in database it will not
> allow
> > the thread to complete the request.
> >
> > how can i check number generated using random variable exists in
> database?
> > and if exists how can i add next number i mean next unique number in
> the
> > series to the request which is unique in the database.
> >
> > assist me in resolving this.
>
> We had a similar requirement, and the way we solved it was to create
> files of random numbers. For each test, we would use a different file.
> In our case, we originally started with an empty database, so we knew
> that all the files we generated were valid.
>
> I suggest you do something similar, i.e. create files of numbers
> before the test and validate them.
>
> > thanks in advance
> >
> >
> > rgds
> >
> >
> > Sudheer
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>