You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Erez Naim <er...@theneura.com> on 2015/04/02 16:59:54 UTC

is there a way to randomize CSV file values?

Hi all,

 

I mean I don't want it to take one by one values but want to randomize it.
Is it possible?

 

Thanks !! 

 


Erez Naim  |  QA Lead  |
<http://www.linkedin.com/profile/view?id=34323263>
<http://www.theneura.com/vCards/gilad.vcf>
<http://twitter.com/#!/giladmeiri/>   




EL AL 2 Street | Herzliya  
mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura

 


 <http://www.theneura.com/> website  |   <http://www.startupbitz.com/> blog
|   <https://twitter.com/intent/user?screen_name=theneura> twitter  |
<http://goo.gl/maps/ZRkg5> map    

 

 


Re: is there a way to randomize CSV file values?

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
Note that since my requirement was something like select any 5 out of 1000
, I could keep everything in memory. (your needs might be different - but
the principle is the same)

Java code simply reads a file into memory into a list , generates random
numbers and selects values from this list and passes it back. uses a setup
thread group to load this file into memory . You could modify this to read
from wherever your data is stored i.e.for e.g. if these are products stored
in a Database , you could change the code to directly read from there -
Note you might have specific requirements like go through every value
before you repeat a value  - in which case you'll have to modify the code
to support that.
Eclipse project , sample CSV (location hardcoded in setup thread group),
sample JMX, compiled jar (java 1.7) place in lib,  in location below



*https://onedrive.live.com/?cid=1BD02FE33F80B8AC&id=1bd02fe33f80b8ac!946
<https://onedrive.live.com/?cid=1BD02FE33F80B8AC&id=1bd02fe33f80b8ac!946>*

On Sun, Apr 5, 2015 at 1:45 AM, Erez Naim <er...@theneura.com> wrote:

> Yes that would be useful if you can share your java code.
>
> Thanks!
>
> -----Original Message-----
> From: Deepak Shetty [mailto:shettyd@gmail.com]
> Sent: Thursday, April 02, 2015 8:04 PM
> To: JMeter Users List
> Subject: Re: is there a way to randomize CSV file values?
>
> I wrote java code to do this - I can share it if you want.
> The other approach is before you begin , randomize the file itself and use
> that as input into Jmeter..
>
> On Thu, Apr 2, 2015 at 7:59 AM, Erez Naim <er...@theneura.com> wrote:
>
> > Hi all,
> >
> >
> >
> > I mean I don’t want it to take one by one values but want to randomize
> it.
> > Is it possible?
> >
> >
> >
> > Thanks !!
> >
> >
> >
> > Erez Naim  |  QA Lead  |   [image: LinkedIn]
> > <http://www.linkedin.com/profile/view?id=34323263>  [image: vCard]
> > <http://www.theneura.com/vCards/gilad.vcf>  [image: Twitter]
> > <http://twitter.com/#!/giladmeiri/>
> >
> > [image: cid:image004.png@01D01E1B.5F153500]
> >
> > EL AL 2 Street | Herzliya
> > mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
> >
> >
> >
> > website <http://www.theneura.com/>  |  blog
> > <http://www.startupbitz.com/>  |  twitter
> > <https://twitter.com/intent/user?screen_name=theneura>  |  map
> > <http://goo.gl/maps/ZRkg5>
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

RE: is there a way to randomize CSV file values?

Posted by Erez Naim <er...@theneura.com>.
Yes that would be useful if you can share your java code. 

Thanks! 

-----Original Message-----
From: Deepak Shetty [mailto:shettyd@gmail.com] 
Sent: Thursday, April 02, 2015 8:04 PM
To: JMeter Users List
Subject: Re: is there a way to randomize CSV file values?

I wrote java code to do this - I can share it if you want.
The other approach is before you begin , randomize the file itself and use that as input into Jmeter..

On Thu, Apr 2, 2015 at 7:59 AM, Erez Naim <er...@theneura.com> wrote:

> Hi all,
>
>
>
> I mean I don’t want it to take one by one values but want to randomize it.
> Is it possible?
>
>
>
> Thanks !!
>
>
>
> Erez Naim  |  QA Lead  |   [image: LinkedIn]
> <http://www.linkedin.com/profile/view?id=34323263>  [image: vCard] 
> <http://www.theneura.com/vCards/gilad.vcf>  [image: Twitter] 
> <http://twitter.com/#!/giladmeiri/>
>
> [image: cid:image004.png@01D01E1B.5F153500]
>
> EL AL 2 Street | Herzliya
> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>
>
>
> website <http://www.theneura.com/>  |  blog 
> <http://www.startupbitz.com/>  |  twitter 
> <https://twitter.com/intent/user?screen_name=theneura>  |  map 
> <http://goo.gl/maps/ZRkg5>
>
>
>
>
>


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


Re: is there a way to randomize CSV file values?

Posted by Deepak Shetty <sh...@gmail.com>.
I wrote java code to do this - I can share it if you want.
The other approach is before you begin , randomize the file itself and use
that as input into Jmeter..

On Thu, Apr 2, 2015 at 7:59 AM, Erez Naim <er...@theneura.com> wrote:

> Hi all,
>
>
>
> I mean I don’t want it to take one by one values but want to randomize it.
> Is it possible?
>
>
>
> Thanks !!
>
>
>
> Erez Naim  |  QA Lead  |   [image: LinkedIn]
> <http://www.linkedin.com/profile/view?id=34323263>  [image: vCard]
> <http://www.theneura.com/vCards/gilad.vcf>  [image: Twitter]
> <http://twitter.com/#!/giladmeiri/>
>
> [image: cid:image004.png@01D01E1B.5F153500]
>
> EL AL 2 Street | Herzliya
> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>
>
>
> website <http://www.theneura.com/>  |  blog <http://www.startupbitz.com/>
>  |  twitter <https://twitter.com/intent/user?screen_name=theneura>  |  map
> <http://goo.gl/maps/ZRkg5>
>
>
>
>
>

Re: is there a way to randomize CSV file values?

Posted by Flavio Cysne <fl...@gmail.com>.
In a Linux machine you can use shuf <file> command to randomize your csv
and then use it in your test.

Re: is there a way to randomize CSV file values?

Posted by Sergio Boso <se...@bosoconsulting.it>.
Il 02/04/2015 16.59, Erez Naim ha scritto:
>
> Hi all,
>
> I mean I don’t want it to take one by one values but want to randomize it. Is it possible?
>
> Thanks !!
>
Another way is to use a REDIS server and the jmeter-plugins:
http://jmeter-plugins.org/wiki/RedisDataSet/

It is very useful when planning distributed installations.
Regards

-- 

Ing. Sergio Boso




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


Re: is there a way to randomize CSV file values?

Posted by Bob <b....@gmail.com>.
sebb, it's really needed feature for functional testing. If you have 
several input data and you can feed test randomly with them.

On 06/04/15 17:01, sebb wrote:
> On 6 April 2015 at 07:49, Bob <b....@gmail.com> wrote:
>> Is it possible to randomly select without changing CSV file?
>>
> Yes and no.
>
> Since JMeter supports scripting languages, and is open source, of
> course users can write their own script/code to randomly select from
> the CSV file.
>
> However that is not recommended, due to the overhead of so doing.
>
> JMeter does not support random CSV file access natively for the same reasons.
>
> It is much more efficient to pre-sort the input.
>
>> On 06/04/15 11:45, Shmuel Krakower wrote:
>>> Erez - the way I currently do that is by radnomzing the files with a linux
>>> shell script, before I start jmeter.
>>> The following commands will randomize all csv files in the current working
>>> directory:
>>>
>>> for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print rand()"\t"$0}' |
>>> sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done
>>>
>>>
>>>
>>> Shmuel Krakower.
>>> www.Beatsoo.org - re-use your jmeter scripts for application performance
>>> monitoring from worldwide locations for free.
>>>
>>> On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:
>>>
>>>> I'm also searching for such solution.
>>>>
>>>> On 02/04/15 19:59, Erez Naim wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I mean I don’t want it to take one by one values but want to randomize
>>>>> it. Is it possible?
>>>>>
>>>>> Thanks !!
>>>>>
>>>>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
>>>>> profile/view?id=34323263>vCard
>>>>> <http://www.theneura.com/vCards/gilad.vcf>Twitter
>>>>> <http://twitter.com/#%21/giladmeiri/>
>>>>>
>>>>> cid:image004.png@01D01E1B.5F153500
>>>>>
>>>>> EL AL 2 Street | Herzliya
>>>>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>>>>>
>>>>> website <http://www.theneura.com/> |blog <http://www.startupbitz.com/>
>>>>> |twitter <https://twitter.com/intent/user?screen_name=theneura> |map <
>>>>> http://goo.gl/maps/ZRkg5>
>>>>>
>>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>


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


Re: is there a way to randomize CSV file values?

Posted by sebb <se...@gmail.com>.
On 6 April 2015 at 07:49, Bob <b....@gmail.com> wrote:
> Is it possible to randomly select without changing CSV file?
>

Yes and no.

Since JMeter supports scripting languages, and is open source, of
course users can write their own script/code to randomly select from
the CSV file.

However that is not recommended, due to the overhead of so doing.

JMeter does not support random CSV file access natively for the same reasons.

It is much more efficient to pre-sort the input.

> On 06/04/15 11:45, Shmuel Krakower wrote:
>>
>> Erez - the way I currently do that is by radnomzing the files with a linux
>> shell script, before I start jmeter.
>> The following commands will randomize all csv files in the current working
>> directory:
>>
>> for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print rand()"\t"$0}' |
>> sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done
>>
>>
>>
>> Shmuel Krakower.
>> www.Beatsoo.org - re-use your jmeter scripts for application performance
>> monitoring from worldwide locations for free.
>>
>> On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:
>>
>>> I'm also searching for such solution.
>>>
>>> On 02/04/15 19:59, Erez Naim wrote:
>>>
>>>> Hi all,
>>>>
>>>> I mean I don’t want it to take one by one values but want to randomize
>>>> it. Is it possible?
>>>>
>>>> Thanks !!
>>>>
>>>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
>>>> profile/view?id=34323263>vCard
>>>> <http://www.theneura.com/vCards/gilad.vcf>Twitter
>>>> <http://twitter.com/#%21/giladmeiri/>
>>>>
>>>> cid:image004.png@01D01E1B.5F153500
>>>>
>>>> EL AL 2 Street | Herzliya
>>>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>>>>
>>>> website <http://www.theneura.com/> |blog <http://www.startupbitz.com/>
>>>> |twitter <https://twitter.com/intent/user?screen_name=theneura> |map <
>>>> http://goo.gl/maps/ZRkg5>
>>>>
>>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

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


Re: is there a way to randomize CSV file values?

Posted by Flavio Cysne <fl...@gmail.com>.
As already suggested in this thread, to achieve this level of random
access, without compromising such ammount of CPU and memory, you should use
a Redis Data Set, from JMeter-Plugins.

Another possible solution (will use as much memory as the size of your data
set) is to put all your data in one line and have the first row be the
variables name list. Use a sequencial value in variable names and use
JMeter's random function to determine the group of variables you'll use.

Ex.:
CSV
name1,value1,name2,value2,name3,value3
aaa,BBB,ccc,ddd,EEE,fff

Re: is there a way to randomize CSV file values?

Posted by Deepak Shetty <sh...@gmail.com>.
The feature is useful for sure - But its not simple as far as I can tell
Usually the number of values is < the number of samples in your test (You
might have 100 values but you want to test 10000 times) - If you merely
randomize the file then you are simply running the same random sequence N
times.
Also the choose X out of Y where X > 1 is quite common and usually need
both the script and data file to be in sync. if you want to vary X while
the script is running also becomes somewhat tricky.
whether the data can repeat (or not) before you have gone through all the
values is also common
Also specifying different weights for some items (e.g. most popularly
accessed)

It's easier to express this outside JMeter - perhaps we should be looking
at a library or something that Jmeter can easily use rather than having
this as core JMeter functionality.




On Mon, Apr 6, 2015 at 8:59 AM, Shmuel Krakower <sh...@gmail.com> wrote:

> To be honest, as a user of jmeter I would expect it to allow me to check a
> checkbox in the csv data set config element for random order. This is not
> the first time that this topic is being asked for and it is pretty basic.
>
> Maybe someone will implement such a feature ?
>
> The implementation can be writing to a temp file on filesystem during the
> initialization of the config element and deleting it once the test is done.
>
> www.beatsoo.org - free application performance monitoring from world wide
> locations.
> On Apr 6, 2015 6:45 PM, "Deepak Shetty" <sh...@gmail.com> wrote:
>
> > >I think as Sergio Boso's answer is the best one.
> > My vote would go for pre calculate - It works for most use cases. adding
> > another piece of software is overkill for most cases.
> >
> > On Mon, Apr 6, 2015 at 12:38 AM, chaitanya bhatt <
> > bhatt.chaitanya@gmail.com>
> > wrote:
> >
> > > I think as Sergio Boso's answer is the best one. Using RedisDataSet
> > plugin
> > > is a superb solution to randomize data. Since Redis runs as a server
> this
> > > solution randomizes data fetch across all remote Jmeter instances.
> > >
> > > Thanks
> > > Chaitanya M Bhatt
> > > http://www.performancecompetence.com
> > >
> > > On Sun, Apr 5, 2015 at 11:49 PM, Bob <b....@gmail.com> wrote:
> > >
> > > > Is it possible to randomly select without changing CSV file?
> > > >
> > > >
> > > > On 06/04/15 11:45, Shmuel Krakower wrote:
> > > >
> > > >> Erez - the way I currently do that is by radnomzing the files with a
> > > linux
> > > >> shell script, before I start jmeter.
> > > >> The following commands will randomize all csv files in the current
> > > working
> > > >> directory:
> > > >>
> > > >> for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print
> rand()"\t"$0}'
> > |
> > > >> sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done
> > > >>
> > > >>
> > > >>
> > > >> Shmuel Krakower.
> > > >> www.Beatsoo.org - re-use your jmeter scripts for application
> > > performance
> > > >> monitoring from worldwide locations for free.
> > > >>
> > > >> On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:
> > > >>
> > > >>  I'm also searching for such solution.
> > > >>>
> > > >>> On 02/04/15 19:59, Erez Naim wrote:
> > > >>>
> > > >>>  Hi all,
> > > >>>>
> > > >>>> I mean I don’t want it to take one by one values but want to
> > randomize
> > > >>>> it. Is it possible?
> > > >>>>
> > > >>>> Thanks !!
> > > >>>>
> > > >>>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
> > > >>>> profile/view?id=34323263>vCard <http://www.theneura.com/
> > > >>>> vCards/gilad.vcf>Twitter
> > > >>>> <http://twitter.com/#%21/giladmeiri/>
> > > >>>>
> > > >>>> cid:image004.png@01D01E1B.5F153500
> > > >>>>
> > > >>>> EL AL 2 Street | Herzliya
> > > >>>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype
> erez.neura
> > > >>>>
> > > >>>> website <http://www.theneura.com/> |blog <
> > http://www.startupbitz.com/
> > > >
> > > >>>> |twitter <https://twitter.com/intent/user?screen_name=theneura>
> > |map
> > > <
> > > >>>> http://goo.gl/maps/ZRkg5>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > >
> > > >
> > >
> >
>

Re: is there a way to randomize CSV file values?

Posted by sebb <se...@gmail.com>.
On 6 April 2015 at 16:59, Shmuel Krakower <sh...@gmail.com> wrote:
> To be honest, as a user of jmeter I would expect it to allow me to check a
> checkbox in the csv data set config element for random order. This is not
> the first time that this topic is being asked for and it is pretty basic.

It is not possible in general to implement this without requiring lots
of processing and/or memory.

e.g. how to find the nth row in a CSV file which uses variable length records?
How to keep track of which entries have already been processed?

Yes, it is of course possible, but it is not trivial.

Given that there are easy work-rounds, there is little incentive for
the developers to spend time on implementing, testing, documenting and
maintaining such a feature.

> Maybe someone will implement such a feature ?
>
> The implementation can be writing to a temp file on filesystem during the
> initialization of the config element and deleting it once the test is done.

This can already be done using a shell script.
And if you want JMeter to run the shell script that can be done using
the OS Sampler.

It does not make sense to overload the config element with this extra
processing.

> www.beatsoo.org - free application performance monitoring from world wide
> locations.
> On Apr 6, 2015 6:45 PM, "Deepak Shetty" <sh...@gmail.com> wrote:
>
>> >I think as Sergio Boso's answer is the best one.
>> My vote would go for pre calculate - It works for most use cases. adding
>> another piece of software is overkill for most cases.
>>
>> On Mon, Apr 6, 2015 at 12:38 AM, chaitanya bhatt <
>> bhatt.chaitanya@gmail.com>
>> wrote:
>>
>> > I think as Sergio Boso's answer is the best one. Using RedisDataSet
>> plugin
>> > is a superb solution to randomize data. Since Redis runs as a server this
>> > solution randomizes data fetch across all remote Jmeter instances.
>> >
>> > Thanks
>> > Chaitanya M Bhatt
>> > http://www.performancecompetence.com
>> >
>> > On Sun, Apr 5, 2015 at 11:49 PM, Bob <b....@gmail.com> wrote:
>> >
>> > > Is it possible to randomly select without changing CSV file?
>> > >
>> > >
>> > > On 06/04/15 11:45, Shmuel Krakower wrote:
>> > >
>> > >> Erez - the way I currently do that is by radnomzing the files with a
>> > linux
>> > >> shell script, before I start jmeter.
>> > >> The following commands will randomize all csv files in the current
>> > working
>> > >> directory:
>> > >>
>> > >> for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print rand()"\t"$0}'
>> |
>> > >> sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done
>> > >>
>> > >>
>> > >>
>> > >> Shmuel Krakower.
>> > >> www.Beatsoo.org - re-use your jmeter scripts for application
>> > performance
>> > >> monitoring from worldwide locations for free.
>> > >>
>> > >> On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:
>> > >>
>> > >>  I'm also searching for such solution.
>> > >>>
>> > >>> On 02/04/15 19:59, Erez Naim wrote:
>> > >>>
>> > >>>  Hi all,
>> > >>>>
>> > >>>> I mean I don’t want it to take one by one values but want to
>> randomize
>> > >>>> it. Is it possible?
>> > >>>>
>> > >>>> Thanks !!
>> > >>>>
>> > >>>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
>> > >>>> profile/view?id=34323263>vCard <http://www.theneura.com/
>> > >>>> vCards/gilad.vcf>Twitter
>> > >>>> <http://twitter.com/#%21/giladmeiri/>
>> > >>>>
>> > >>>> cid:image004.png@01D01E1B.5F153500
>> > >>>>
>> > >>>> EL AL 2 Street | Herzliya
>> > >>>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>> > >>>>
>> > >>>> website <http://www.theneura.com/> |blog <
>> http://www.startupbitz.com/
>> > >
>> > >>>> |twitter <https://twitter.com/intent/user?screen_name=theneura>
>> |map
>> > <
>> > >>>> http://goo.gl/maps/ZRkg5>
>> > >>>>
>> > >>>>
>> > >>>>
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> > > For additional commands, e-mail: user-help@jmeter.apache.org
>> > >
>> > >
>> >
>>

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


Re: is there a way to randomize CSV file values?

Posted by Shmuel Krakower <sh...@gmail.com>.
To be honest, as a user of jmeter I would expect it to allow me to check a
checkbox in the csv data set config element for random order. This is not
the first time that this topic is being asked for and it is pretty basic.

Maybe someone will implement such a feature ?

The implementation can be writing to a temp file on filesystem during the
initialization of the config element and deleting it once the test is done.

www.beatsoo.org - free application performance monitoring from world wide
locations.
On Apr 6, 2015 6:45 PM, "Deepak Shetty" <sh...@gmail.com> wrote:

> >I think as Sergio Boso's answer is the best one.
> My vote would go for pre calculate - It works for most use cases. adding
> another piece of software is overkill for most cases.
>
> On Mon, Apr 6, 2015 at 12:38 AM, chaitanya bhatt <
> bhatt.chaitanya@gmail.com>
> wrote:
>
> > I think as Sergio Boso's answer is the best one. Using RedisDataSet
> plugin
> > is a superb solution to randomize data. Since Redis runs as a server this
> > solution randomizes data fetch across all remote Jmeter instances.
> >
> > Thanks
> > Chaitanya M Bhatt
> > http://www.performancecompetence.com
> >
> > On Sun, Apr 5, 2015 at 11:49 PM, Bob <b....@gmail.com> wrote:
> >
> > > Is it possible to randomly select without changing CSV file?
> > >
> > >
> > > On 06/04/15 11:45, Shmuel Krakower wrote:
> > >
> > >> Erez - the way I currently do that is by radnomzing the files with a
> > linux
> > >> shell script, before I start jmeter.
> > >> The following commands will randomize all csv files in the current
> > working
> > >> directory:
> > >>
> > >> for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print rand()"\t"$0}'
> |
> > >> sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done
> > >>
> > >>
> > >>
> > >> Shmuel Krakower.
> > >> www.Beatsoo.org - re-use your jmeter scripts for application
> > performance
> > >> monitoring from worldwide locations for free.
> > >>
> > >> On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:
> > >>
> > >>  I'm also searching for such solution.
> > >>>
> > >>> On 02/04/15 19:59, Erez Naim wrote:
> > >>>
> > >>>  Hi all,
> > >>>>
> > >>>> I mean I don’t want it to take one by one values but want to
> randomize
> > >>>> it. Is it possible?
> > >>>>
> > >>>> Thanks !!
> > >>>>
> > >>>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
> > >>>> profile/view?id=34323263>vCard <http://www.theneura.com/
> > >>>> vCards/gilad.vcf>Twitter
> > >>>> <http://twitter.com/#%21/giladmeiri/>
> > >>>>
> > >>>> cid:image004.png@01D01E1B.5F153500
> > >>>>
> > >>>> EL AL 2 Street | Herzliya
> > >>>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
> > >>>>
> > >>>> website <http://www.theneura.com/> |blog <
> http://www.startupbitz.com/
> > >
> > >>>> |twitter <https://twitter.com/intent/user?screen_name=theneura>
> |map
> > <
> > >>>> http://goo.gl/maps/ZRkg5>
> > >>>>
> > >>>>
> > >>>>
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>

Re: is there a way to randomize CSV file values?

Posted by Deepak Shetty <sh...@gmail.com>.
>I think as Sergio Boso's answer is the best one.
My vote would go for pre calculate - It works for most use cases. adding
another piece of software is overkill for most cases.

On Mon, Apr 6, 2015 at 12:38 AM, chaitanya bhatt <bh...@gmail.com>
wrote:

> I think as Sergio Boso's answer is the best one. Using RedisDataSet plugin
> is a superb solution to randomize data. Since Redis runs as a server this
> solution randomizes data fetch across all remote Jmeter instances.
>
> Thanks
> Chaitanya M Bhatt
> http://www.performancecompetence.com
>
> On Sun, Apr 5, 2015 at 11:49 PM, Bob <b....@gmail.com> wrote:
>
> > Is it possible to randomly select without changing CSV file?
> >
> >
> > On 06/04/15 11:45, Shmuel Krakower wrote:
> >
> >> Erez - the way I currently do that is by radnomzing the files with a
> linux
> >> shell script, before I start jmeter.
> >> The following commands will randomize all csv files in the current
> working
> >> directory:
> >>
> >> for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print rand()"\t"$0}' |
> >> sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done
> >>
> >>
> >>
> >> Shmuel Krakower.
> >> www.Beatsoo.org - re-use your jmeter scripts for application
> performance
> >> monitoring from worldwide locations for free.
> >>
> >> On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:
> >>
> >>  I'm also searching for such solution.
> >>>
> >>> On 02/04/15 19:59, Erez Naim wrote:
> >>>
> >>>  Hi all,
> >>>>
> >>>> I mean I don’t want it to take one by one values but want to randomize
> >>>> it. Is it possible?
> >>>>
> >>>> Thanks !!
> >>>>
> >>>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
> >>>> profile/view?id=34323263>vCard <http://www.theneura.com/
> >>>> vCards/gilad.vcf>Twitter
> >>>> <http://twitter.com/#%21/giladmeiri/>
> >>>>
> >>>> cid:image004.png@01D01E1B.5F153500
> >>>>
> >>>> EL AL 2 Street | Herzliya
> >>>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
> >>>>
> >>>> website <http://www.theneura.com/> |blog <http://www.startupbitz.com/
> >
> >>>> |twitter <https://twitter.com/intent/user?screen_name=theneura> |map
> <
> >>>> http://goo.gl/maps/ZRkg5>
> >>>>
> >>>>
> >>>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>

Re: is there a way to randomize CSV file values?

Posted by chaitanya bhatt <bh...@gmail.com>.
I think as Sergio Boso's answer is the best one. Using RedisDataSet plugin
is a superb solution to randomize data. Since Redis runs as a server this
solution randomizes data fetch across all remote Jmeter instances.

Thanks
Chaitanya M Bhatt
http://www.performancecompetence.com

On Sun, Apr 5, 2015 at 11:49 PM, Bob <b....@gmail.com> wrote:

> Is it possible to randomly select without changing CSV file?
>
>
> On 06/04/15 11:45, Shmuel Krakower wrote:
>
>> Erez - the way I currently do that is by radnomzing the files with a linux
>> shell script, before I start jmeter.
>> The following commands will randomize all csv files in the current working
>> directory:
>>
>> for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print rand()"\t"$0}' |
>> sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done
>>
>>
>>
>> Shmuel Krakower.
>> www.Beatsoo.org - re-use your jmeter scripts for application performance
>> monitoring from worldwide locations for free.
>>
>> On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:
>>
>>  I'm also searching for such solution.
>>>
>>> On 02/04/15 19:59, Erez Naim wrote:
>>>
>>>  Hi all,
>>>>
>>>> I mean I don’t want it to take one by one values but want to randomize
>>>> it. Is it possible?
>>>>
>>>> Thanks !!
>>>>
>>>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
>>>> profile/view?id=34323263>vCard <http://www.theneura.com/
>>>> vCards/gilad.vcf>Twitter
>>>> <http://twitter.com/#%21/giladmeiri/>
>>>>
>>>> cid:image004.png@01D01E1B.5F153500
>>>>
>>>> EL AL 2 Street | Herzliya
>>>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>>>>
>>>> website <http://www.theneura.com/> |blog <http://www.startupbitz.com/>
>>>> |twitter <https://twitter.com/intent/user?screen_name=theneura> |map <
>>>> http://goo.gl/maps/ZRkg5>
>>>>
>>>>
>>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: is there a way to randomize CSV file values?

Posted by Bob <b....@gmail.com>.
Is it possible to randomly select without changing CSV file?

On 06/04/15 11:45, Shmuel Krakower wrote:
> Erez - the way I currently do that is by radnomzing the files with a linux
> shell script, before I start jmeter.
> The following commands will randomize all csv files in the current working
> directory:
>
> for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print rand()"\t"$0}' |
> sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done
>
>
>
> Shmuel Krakower.
> www.Beatsoo.org - re-use your jmeter scripts for application performance
> monitoring from worldwide locations for free.
>
> On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:
>
>> I'm also searching for such solution.
>>
>> On 02/04/15 19:59, Erez Naim wrote:
>>
>>> Hi all,
>>>
>>> I mean I don’t want it to take one by one values but want to randomize
>>> it. Is it possible?
>>>
>>> Thanks !!
>>>
>>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
>>> profile/view?id=34323263>vCard <http://www.theneura.com/vCards/gilad.vcf>Twitter
>>> <http://twitter.com/#%21/giladmeiri/>
>>>
>>> cid:image004.png@01D01E1B.5F153500
>>>
>>> EL AL 2 Street | Herzliya
>>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>>>
>>> website <http://www.theneura.com/> |blog <http://www.startupbitz.com/>
>>> |twitter <https://twitter.com/intent/user?screen_name=theneura> |map <
>>> http://goo.gl/maps/ZRkg5>
>>>
>>>


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


Re: is there a way to randomize CSV file values?

Posted by Shmuel Krakower <sh...@gmail.com>.
Erez - the way I currently do that is by radnomzing the files with a linux
shell script, before I start jmeter.
The following commands will randomize all csv files in the current working
directory:

for f in *.csv; do cat $f | awk 'BEGIN{srand();}{print rand()"\t"$0}' |
sort -k1 -n | cut -f2- > $f.abc; mv $f.abc $f -f;done



Shmuel Krakower.
www.Beatsoo.org - re-use your jmeter scripts for application performance
monitoring from worldwide locations for free.

On Mon, Apr 6, 2015 at 8:25 AM, Bob <b....@gmail.com> wrote:

> I'm also searching for such solution.
>
> On 02/04/15 19:59, Erez Naim wrote:
>
>>
>> Hi all,
>>
>> I mean I don’t want it to take one by one values but want to randomize
>> it. Is it possible?
>>
>> Thanks !!
>>
>> Erez Naim |  QA Lead  | LinkedIn <http://www.linkedin.com/
>> profile/view?id=34323263>vCard <http://www.theneura.com/vCards/gilad.vcf>Twitter
>> <http://twitter.com/#%21/giladmeiri/>
>>
>> cid:image004.png@01D01E1B.5F153500
>>
>> EL AL 2 Street | Herzliya
>> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>>
>> website <http://www.theneura.com/> |blog <http://www.startupbitz.com/>
>> |twitter <https://twitter.com/intent/user?screen_name=theneura> |map <
>> http://goo.gl/maps/ZRkg5>
>>
>>
>

Re: is there a way to randomize CSV file values?

Posted by Bob <b....@gmail.com>.
I'm also searching for such solution.

On 02/04/15 19:59, Erez Naim wrote:
>
> Hi all,
>
> I mean I don’t want it to take one by one values but want to randomize 
> it. Is it possible?
>
> Thanks !!
>
> Erez Naim |  QA Lead  | LinkedIn 
> <http://www.linkedin.com/profile/view?id=34323263>vCard 
> <http://www.theneura.com/vCards/gilad.vcf>Twitter 
> <http://twitter.com/#%21/giladmeiri/>
>
> cid:image004.png@01D01E1B.5F153500
>
> EL AL 2 Street | Herzliya
> mobile (+972) 50 9 555 686 | fax (408) 689.1366 | skype erez.neura
>
> website <http://www.theneura.com/> |blog <http://www.startupbitz.com/> 
> |twitter <https://twitter.com/intent/user?screen_name=theneura> |map 
> <http://goo.gl/maps/ZRkg5>
>