[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jmeter-user
Subject:    Re: generate random value in hex
From:       sebb <sebbaz () gmail ! com>
Date:       2011-11-23 20:32:20
Message-ID: CAOGo0VboAiZoJ12oqPcd-ni2VwgWK789ryFzaLTEvvqk3BEqOQ () mail ! gmail ! com
[Download RAW message or body]

On 23 November 2011 20:25, Philippe Mouawad <philippe.mouawad@gmail.com> wrote:
> microtime:
> http://www.php.net/manual/en/function.microtime.php
>
> uniqid
> http://www.php.net/manual/en/function.uniqid.php
>
> md5:
> http://www.php.net/manual/en/function.md5.php
>
> Since a substring of 0,16 is done on it, it could just be a random and
> RandomString might do it.

Good point.

> Otherwise you will have to use BeanShell.

... or one of the other scripting languages supported by JMeter.

> You may also develop an MD5 function and contribute it.

JMeter already includes Commons Codec, which has some useful MD5
methods in DigestUtils.

These could be used in any of the scripting functions - or indeed used
to create an independent MD5 function.

> Regards
> Philippe
> http://www.ubik-ingenierie.com
>
> On Wed, Nov 23, 2011 at 8:44 PM, sebb <sebbaz@gmail.com> wrote:
>
>> On 16 November 2011 14:42, andreea raluca <maya_andree@yahoo.com> wrote:
>> > Hello,
>> > I have to generate in JMeter a randomized variable that have this form:
>> id=4eeb87da1cdf8812. In the code it’s described like this :
>> >  '&id=' . substr(md5(microtime() . uniqid('')), 0, 16)
>> > Can anyone help me?
>>
>> There are various script functions that might perhaps be of use; have a
>> look at:
>>
>> http://jmeter.apache.org/usermanual/functions.html
>>
>> But without knowing what microtime() and uniqid() do it's impossible
>> to say if they would be suitable or not.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic