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 <[email protected]>: >> >> 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 <[email protected]>: >>>> >>>> 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 <[email protected]>: >>>>>> >>>>>> 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 <[email protected]>: >>>>>>>> >>>>>>>> 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: [email protected] >>>>>>>> For additional commands, e-mail: >>>>>>>> [email protected] >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe, e-mail: [email protected] >>>>>>> For additional commands, e-mail: [email protected] >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> 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: [email protected] >>>>>> For additional commands, e-mail: [email protected] >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>>> >>>>> >>>> >>>> -- >>>> 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: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >>> >> >> -- >> 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: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- 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: [email protected] For additional commands, e-mail: [email protected]

