You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Aditya Dhage <ad...@globallogic.com> on 2014/12/23 10:42:44 UTC

Unique UUID per transaction/sample

Hi All,
I'm trying to get unique UUID per transaction and use it at multiple places
in my test plan.

My test plan is as follows:

Test Plan
|---- Thread group
|---- User Defined Variable
| myuuid = ${__UUID}
|
|---- HTTP Header Manager
| (use ${myuuid}
|
|---- HTTP Request Defaults
|
|---- HTTP Request 1
| (use ${myuuid})
|
|---- HTTP Request 2
| (use ${myuuid})
|
|---- Some Listener
The problem here is that it is generating 1 UUID per execution of test plan
rather than per sample.
I've refered JMeter manual here
<http://jmeter.apache.org/usermanual/functions.html#__UUID>, but of not
much help.

How do I overcome this?


Regards,
Aditya

Re: Unique UUID per transaction/sample

Posted by George <ba...@yahoo.de>.
Hello,
in your http request just put ${__UUID} as the value and uuid as parameter name.
Or you can add a BeanShell Pre-Prozessor as a child of your http request and then just write thisvars.put("uuid", "${__UUID}");
This will create a UUID and then the value is put into a jmeter variable called "uuid".Then you put ${uuid} in your http request.





     Aditya Dhage <ad...@globallogic.com> schrieb am 10:44 Dienstag, 23.Dezember 2014:
   

 Hi All,
I'm trying to get unique UUID per transaction and use it at multiple places
in my test plan.

My test plan is as follows:

Test Plan
|---- Thread group
|---- User Defined Variable
| myuuid = ${__UUID}
|
|---- HTTP Header Manager
| (use ${myuuid}
|
|---- HTTP Request Defaults
|
|---- HTTP Request 1
| (use ${myuuid})
|
|---- HTTP Request 2
| (use ${myuuid})
|
|---- Some Listener
The problem here is that it is generating 1 UUID per execution of test plan
rather than per sample.
I've refered JMeter manual here
<http://jmeter.apache.org/usermanual/functions.html#__UUID>, but of not
much help.

How do I overcome this?


Regards,
Aditya