Hi RaGnoR, It works..Thanks a lot for your help..Thanks a lot for dedicating your valuable time to help some one like me..
RaGnoR wrote: > > But if your values looks like "user1","user2","user3" or similar you > can simply generate there. Just use Counter (with Reference Name: > mycounter) and in http request concate string 'user' with counter: > user${mycounter}. > > If you really want use CSV then: > 1. add CSV Data Set Config > 2. in CSV Data Set Config element set the name of the file (give it > without path and put file in jmeter bin directory) > 3. in CSV Data Set Config element set the delimiter or leave the > default , (variable in your csv file should be separated by this > delimiter: value1,value2,value3 without any whitespaces) > 4. in CSV Data Set Config element set the 'Variable Names' to which > values from the csv will be bind. So if you have csv file with 4 > variables in each row put in 'Variable Names' v1,v2,v3,v4 - without > any whitespaces, then by using ${v1} ${v2} ${v3} ${v4} you can access > to those value. > 5. if you put CSV Data Set Config in loop then each invoking will read > next line from the file > 6. below CSV Data Set Config but on this same level put your http > request sampler. > > > Jakub > > 2009/9/9 dilantha <dilantha.tyr...@gmail.com>: >> >> Hi, >> >> My main purpose is to get a random value for variables. For example just >> imagine i have a field called "user name" and in the database i have some >> different values like "user1","user2","user3"..I just want to assign >> these >> values randomly to the variable "user name" when each time i'm sending a >> http reauest. So i just gave up trying to get those values from the db. >> Now >> im trying to add those value to a txt file and use it as csv data file. >> It >> will be great help if you can give me the steps to that.Thanks a lot.. >> >> RaGnoR wrote: >>> >>> I'm a bit confused. Do you want to read data from CSV file/databse or >>> you can generate some random variable and use it more than once? >>> >>> BTW. This solution with JDBC Request works correct. >>> >>> Best regards, >>> Jakub >>> >>> 2009/9/9 dilantha <dilantha.tyr...@gmail.com>: >>>> >>>> Hi RaGnoR and all users, >>>> >>>> Thanks a lot for user reply.I gave up on trying to retrieve values from >>>> db. >>>> It doesn't seems to be working. Instead now i'm trying to use that CSV >>>> Data >>>> Set. But still didn't found a good article which explains how to use a >>>> CSV >>>> Data Set to set a random vsalue with the http request. If you can >>>> please >>>> tell me how to use t from the beginning spet by step. A link to a >>>> proper >>>> artical also would be enough. Again thanks a lot for your >>>> help...waiting >>>> for >>>> your reply..Thanks.. >>>> >>>> >>>> >>>> RaGnoR wrote: >>>>> >>>>> First: 'Variable Name' in JDBC Connection Configuration is not name of >>>>> the variable where result will be bind but it is the name of pool, >>>>> similar is in the JDBC Request, so both name should be the same for >>>>> example mypool. >>>>> Second: JDBC Request must not be child of the JDBC Configuration >>>>> Configuration. It is possible to do so but I don't know why it is >>>>> avaible. JDBC Request should below JDBC Connection Configuration but >>>>> be on the same level. >>>>> Third: I have no idea how to extract variable from result returned by >>>>> the JDBC Request. I tried Regular Expression Extractor and this field >>>>> Variable names on the bottom of the JDBC Request view but their dont't >>>>> work. Do you consider to use data from CSV file instead of db >>>>> directly? It will be faster and easer :). >>>>> >>>>> Remeber to put mysql driver library to jmeter lib directory. >>>>> >>>>> Best regards, >>>>> Jakub >>>>> >>>>> >>>>> 2009/9/8 dilantha <dilantha.tyr...@gmail.com>: >>>>>> >>>>>> Hi, >>>>>> >>>>>> Thanks a lot..Thak works..I didn't add ${test_id}. That's why it >>>>>> didn't >>>>>> work..Thank again..If you can please do me a one more favor.Please >>>>>> tel >>>>>> me >>>>>> about adding values from db..Under the http request i created a JDBC >>>>>> connection config.My configarations are >>>>>> >>>>>> varible name : test_id >>>>>> Database url: jdbc:mysql://localhost:3306/openevsys >>>>>> JDBC driver class: com.mysql.jdbc.Driver >>>>>> username: root >>>>>> password : root >>>>>> >>>>>> Others i left as default.Im not sure about what to put under the JDBC >>>>>> driver >>>>>> class i just added the same thing which can be seen in the tutorial. >>>>>> >>>>>> After that i created a JDBC request under that JDBC connection >>>>>> config.I >>>>>> gave the same varible name as JDBC cnnection config..Similarly in >>>>>> http >>>>>> request ('add person') i use variable ${test_id}. >>>>>> >>>>>> When i run this thing http request didn't send.I just tried by giving >>>>>> separate names for JDBC config and conection then it sends the http >>>>>> request >>>>>> but the value of add person is going as ${test_id}.:-(..If you can >>>>>> please >>>>>> help me..Sorry for bothering.Thanks again. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> RaGnoR wrote: >>>>>>> >>>>>>> It works fine for me :). >>>>>>> Try this, step by step: >>>>>>> 1. add Random Variable element under your http request ('add >>>>>>> person') >>>>>>> 2. set the name of the Random Variable to test_id (check that this >>>>>>> name is unique in your test plan) and the minimum and maximum value >>>>>>> as >>>>>>> you need >>>>>>> 3. in http request ('add person') use variable in this form: >>>>>>> ${test_id} >>>>>>> >>>>>>> Best regards, >>>>>>> Jakub >>>>>>> >>>>>>> >>>>>>> 2009/9/8 dilantha <dilantha.tyr...@gmail.com>: >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> Thanks for the help.But still im facing that problem. I just right >>>>>>>> click >>>>>>>> the >>>>>>>> http request which im sending and add a Random variable. For >>>>>>>> example >>>>>>>> just >>>>>>>> assume there is a http request called "add person". i just need to >>>>>>>> send >>>>>>>> a >>>>>>>> random value for person's id with that request. previously i added >>>>>>>> that >>>>>>>> "id" >>>>>>>> parameter under http request. but now i removed it from there and >>>>>>>> add >>>>>>>> that >>>>>>>> parameter to the random value which i have added to that "add >>>>>>>> person" >>>>>>>> http >>>>>>>> request. But still i can't see the random value is going with the >>>>>>>> http >>>>>>>> request. because when i go the result tree's request it didn't show >>>>>>>> me >>>>>>>> the >>>>>>>> "id" field which ia have added under the random value. It only >>>>>>>> showed >>>>>>>> me >>>>>>>> the >>>>>>>> static values which i have directly added to the http request..If >>>>>>>> you >>>>>>>> can >>>>>>>> please help..I'm n big trouble:-(:-(..Thanks again.. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> RaGnoR wrote: >>>>>>>>> >>>>>>>>> Hi! >>>>>>>>> >>>>>>>>> Instead of using Random function try use 'Random Variable' >>>>>>>>> configuration element. >>>>>>>>> >>>>>>>>> Before you use data from db you have to fetch those data. To fetch >>>>>>>>> data use 'JDBC Connection Configuration' and 'JDBC Request' >>>>>>>>> elements. >>>>>>>>> Read this: >>>>>>>>> http://jakarta.apache.org/jmeter/usermanual/build-db-test-plan.html. >>>>>>>>> >>>>>>>>> >>>>>>>>> Best regards, >>>>>>>>> Jakub >>>>>>>>> >>>>>>>>> >>>>>>>>> 2009/9/7 dilantha <dilantha.tyr...@gmail.com>: >>>>>>>>>> >>>>>>>>>> Hi All, >>>>>>>>>> I'm bit new to jmeter so at the moment im facing some problems >>>>>>>>>> with >>>>>>>>>> load >>>>>>>>>> testing. Currently im using jmeter for load testing in a web >>>>>>>>>> application. >>>>>>>>>> I >>>>>>>>>> just want to know how can i generate a random value with the http >>>>>>>>>> request >>>>>>>>>> and send . For example just assume that i have a parameter called >>>>>>>>>> "id" >>>>>>>>>> how >>>>>>>>>> can i generate a random id to send with the http request..What >>>>>>>>>> should >>>>>>>>>> i >>>>>>>>>> type >>>>>>>>>> under the value field?..i just type ${_Random(1,10)} under the >>>>>>>>>> value >>>>>>>>>> field >>>>>>>>>> but it did not work..and the other thing is if i want to assign a >>>>>>>>>> value >>>>>>>>>> to a >>>>>>>>>> field from a set of values which are stored in the data base how >>>>>>>>>> can >>>>>>>>>> i >>>>>>>>>> do >>>>>>>>>> that?..is it possible?:-(..If some one know the solution please >>>>>>>>>> be >>>>>>>>>> kind >>>>>>>>>> enough to send it..Thanks a lot.. >>>>>>>>>> -- >>>>>>>>>> View this message in context: >>>>>>>>>> http://www.nabble.com/How-to-add-random-values..-tp25330799p25330799.html >>>>>>>>>> Sent from the JMeter - User mailing list archive at Nabble.com. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------------------- >>>>>>>>>> To unsubscribe, e-mail: >>>>>>>>>> jmeter-user-unsubscr...@jakarta.apache.org >>>>>>>>>> For additional commands, e-mail: >>>>>>>>>> jmeter-user-h...@jakarta.apache.org >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> --------------------------------------------------------------------- >>>>>>>>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org >>>>>>>>> For additional commands, e-mail: >>>>>>>>> jmeter-user-h...@jakarta.apache.org >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> View this message in context: >>>>>>>> http://www.nabble.com/How-to-add-random-values..-tp25330799p25340094.html >>>>>>>> Sent from the JMeter - User mailing list archive at Nabble.com. >>>>>>>> >>>>>>>> >>>>>>>> --------------------------------------------------------------------- >>>>>>>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org >>>>>>>> For additional commands, e-mail: >>>>>>>> jmeter-user-h...@jakarta.apache.org >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org >>>>>>> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://www.nabble.com/How-to-add-random-values..-tp25330799p25342685.html >>>>>> Sent from the JMeter - User mailing list archive at Nabble.com. >>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org >>>>>> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org >>>>> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org >>>>> >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/How-to-add-random-values..-tp25330799p25358966.html >>>> Sent from the JMeter - User mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org >>>> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org >>> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org >>> >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/How-to-add-random-values..-tp25330799p25359442.html >> Sent from the JMeter - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org >> For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org > For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org > > > -- View this message in context: http://www.nabble.com/How-to-add-random-values..-tp25330799p25378024.html Sent from the JMeter - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org