jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From virkenator <virkena...@gmail.com>
Subject Re: how to generate unique ids in jmeter
Date Wed, 02 Jun 2010 19:12:57 GMT

Hi Deepak,

Thank you for the help. I tried it, but in vain. May be I need to explain
you more details. When I create a patient, that data needs to be posted
through the HTTP request to the server.
Here is how my script works.
1. A user logs in
2. Goes to the patient registration form.
3. Adds patient id, which has to be unique every time patient needs to be
added.
4. Saves the form and logs out.
This script has all the HTTP requests. During the step 3, there are two
fields(patient id and patientkey) which need to be edited (which I am
presently editing manually) and posted as the HTTP request for step 3.
I am wondering is there any way, I can increment or create unique values for
these two fields and then POST them as a HTTP request automatically. 

Deepak Shetty wrote:
> 
> This is one way
> add a User Parameters , just one user will do,  specify the name like
> currentTime and value like ${__time(YMD)}${__time(HMS) . Also check update
> once per iteration (basically generating a timestamp , you can use other
> ways to generate a timestamp too , the reason I do it this way is that I
> need this value for multiple samplers)
> Then when you need to post a unique data element, you can provide a value
> like
> ${userIdPrefix}_${__threadNum()}_${currentTime}
> 
> where userIdPrefix is a variable normally defined as JMeterCreatedUser or
> something .
> 
> Note that because JMeter can call javascript or even Java/BSH any method
> you
> want of generating unique ids works (for example you could use UUID's)
> 
> regards
> deepak
> 
> On Tue, Jun 1, 2010 at 4:42 PM, virkenator <virkenator@gmail.com> wrote:
> 
>>
>> I am a newbie. I am using JMeter to test registration form based
>> software.
>> Here's my scenario:
>>
>> A user logs in and adds a patient in database. I am able to automate this
>> process by recording it, however I want to automate the add patient
>> scenario, since a unique patient id is required to add a patient and save
>> it
>> on the database. The procedure I am following right now is manually
>> entering
>> ids and then running the automated script, which is not putting any load
>> or
>> stress on the site.
>> If somebody could please tell me how to generate unique ids and how to
>> fit
>> this procedure in already working script or how to increment previous id
>> whenever the script is run.
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/how-to-generate-unique-ids-in-jmeter-tp28748660p28748660.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/how-to-generate-unique-ids-in-jmeter-tp28748660p28758835.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message