RE: counter function bug
Confirmed with JMeter 2.4 (confirming the behavior, it looks like a bug): - scenario below produces 1,1 - just increasing number of threads in the thread group also produces all ones 1,1,1,1 - 3 samplers, each containing the same function, loop 3 is 1,1,1,2,2,2,3,3,3 - one sampler loop 3 1,2,3 (I guess this is expected behavior) Nermin -Original Message- From: Deepak Shetty [mailto:shet...@gmail.com] Sent: 30. septembar 2011 6:38 To: JMeter Users List Subject: counter function bug per the documents The counter generates a new number each time it is called, starting with 1 and incrementing by +1 each time. However ThreadGroup +${__counter(TRUE,ref)}HTTPSampler1 +DebugSampler +${__counter(TRUE,ref)}HTTPSampler2 +DebugSampler +View Results tree Generates the number 1 in both cases. Can someone confirm this is abug? regards deepak - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
RE: Jmeter novice asking help to avoid error 501 during recording using http proxy server
Just to make sure we're on the same page, are you trying to convert a string to URL (escape) http://www.javascripter.net/faq/escape.htm If that is the case, you can probably do it with a pre-processor and then send a request that does not contain special characters in URL Nermin -Original Message- From: forfano [mailto:forf...@hotmail.com] Sent: 27. septembar 2011 22:05 To: jmeter-user@jakarta.apache.org Subject: Jmeter novice asking help to avoid error 501 during recording using http proxy server Lads, I am wondering if someone could give me a practical help on how could I avoid the 501 error (Method not implemented) during the recording which I am doing using HTTP proxy server. I can explain the issue: During recording the browser submits the following : GET http://ciweb10.homologacao.extranet.teste:8280/ciweb/buttons.do?buttons=VOLbuttons=ADLbuttons=LIMbuttons=AJUtitulo=Proponente/Arrendatáriotrancode=V034791002subtitulo=80009876-2 This ends up with a sample failed in the View tree listener and therefore my page is not displayed but the error 501 Method not implemented. The cause of this error is due to the word ./Arrendatário It is using an accented Portuguese character á instead of use the html code for it. I know that the page should had been designed correctly (using html codes) but as a load tester I would like to bypass it just like the normal browser (IE, Firefox) does. So how could modiy such characters on the fly before trying to parse it on the http proxy server? I saw some pre-processors components and I am not sure if I could use then during recording and if I can which one and how would be the best way. When I tested it without the Jmeter proxy and I did sniffed the network I could see the the á was ripped off which. Any ideas ? If someone needs more explanation I am glad to do it. I will post cross this on www.jmeterforumotion.com Looking forward to hearing from someone. Cheers! Flavio -- View this message in context: http://jmeter.512774.n5.nabble.com/Jmeter-novice-asking-help-to-avoid-error-501-during-recording-using-http-proxy-server-tp4846605p4846605.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
RE: Jmeter novice asking help to avoid error 501 during recording using http proxy server
This is the easiest away Also check if ${__javaScript(encodeURI('${VAR1}'))} works for you Nermin -Original Message- From: Deepak Shetty [mailto:shet...@gmail.com] Sent: 27. septembar 2011 23:14 To: JMeter Users List Subject: Re: Jmeter novice asking help to avoid error 501 during recording using http proxy server hi if you had these as parameters (In send parameters with request) - and you checked encode - that should work too. regards deepak On Tue, Sep 27, 2011 at 12:59 PM, Nermin CALUK ner...@atlantbh.com wrote: Just to make sure we're on the same page, are you trying to convert a string to URL (escape) http://www.javascripter.net/faq/escape.htm If that is the case, you can probably do it with a pre-processor and then send a request that does not contain special characters in URL Nermin -Original Message- From: forfano [mailto:forf...@hotmail.com] Sent: 27. septembar 2011 22:05 To: jmeter-user@jakarta.apache.org Subject: Jmeter novice asking help to avoid error 501 during recording using http proxy server Lads, I am wondering if someone could give me a practical help on how could I avoid the 501 error (Method not implemented) during the recording which I am doing using HTTP proxy server. I can explain the issue: During recording the browser submits the following : GET http://ciweb10.homologacao.extranet.teste:8280/ciweb/buttons.do?buttons=VOL; buttons=ADLbuttons=LIMbuttons=AJUtitulo=Proponente/Arrendatáriotrancode= V034791002subtitulo=80009876-2 This ends up with a sample failed in the View tree listener and therefore my page is not displayed but the error 501 Method not implemented. The cause of this error is due to the word ./Arrendatário It is using an accented Portuguese character á instead of use the html code for it. I know that the page should had been designed correctly (using html codes) but as a load tester I would like to bypass it just like the normal browser (IE, Firefox) does. So how could modiy such characters on the fly before trying to parse it on the http proxy server? I saw some pre-processors components and I am not sure if I could use then during recording and if I can which one and how would be the best way. When I tested it without the Jmeter proxy and I did sniffed the network I could see the the á was ripped off which. Any ideas ? If someone needs more explanation I am glad to do it. I will post cross this on www.jmeterforumotion.com Looking forward to hearing from someone. Cheers! Flavio -- View this message in context: http://jmeter.512774.n5.nabble.com/Jmeter-novice-asking-help-to-avoid-error- 501-during-recording-using-http-proxy-server-tp4846605p4846605.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 - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
RE: JMeter not sending values
Maybe sending corresponding part of jmeter.log will shed some light on what's happening under the hood - please share some more precise details Nermin -Original Message- From: mkt [mailto:michaelkturner...@gmail.com] Sent: 26. septembar 2011 19:13 To: jmeter-user@jakarta.apache.org Subject: JMeter not sending values I recorded the registering of a class in BadBoy, playback works fine class is saved. Export to JMeter run the test and nothing. Recorded in JMeter using Proxy, run nothing. There about 10 name/value pairs the same 5 or so duplicated which all show up in BadBoy, but in JMeter you only see 1 set of them and no value is sent for the course. -- View this message in context: http://jmeter.512774.n5.nabble.com/JMeter-not-sending-values-tp4842148p48421 48.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
RE: Generate requests at specified time
Hi zjm, I thought I'd have an elegant solution for you but that one doesn't seem to work. Alternatively, if max number of parallel requests is not too big, you can achieve what you described by creating several threads (say 5), each containing an IF controller and your sampler. Then you create a CSV file in which one line contains pairs of values for IF controllers and inputs for your requests. This way you can use IF controllers to simply turn on or turn off any of the samplers - sometimes you'll leave only one on, sometimes you'll want all of them to run in parallel. In Test Plan leave Run threads group consecutively unchecked to make sure your requests will be sent in parallel. Finally, if pause interval between your requests is constant, just add Constant Timer on the top level of your plan. If you want variable pauses, just enter value of milliseconds as, say, first column in your CSV file and then in your Constant Timer put corresponding variable, e.g. ${PAUSE} Deepak, Oliver, Sebb et al, I tried to achieve this with the following setup: -- Test Plan -- CSV [to read the value of number of threads] -- Thread Group [where number of threads is a variable ${THRD}] CSV [to read requests parameters, input] Sampler [to send the requests] -- View Results Tree My reasoning was: let's read number of threads from one file and let's read input data for requests from another CSV file. If number of threads for one iteration is 3, than 3 lines would be read from input file and 3 parallel requests would be sent. However, I found that in JMeter (2.4) I cannot put number of threads as a variable ${THRD} that I read from the CSV file. Jmeter.log looks like this: ... 2011/09/24 21:30:47 DEBUG - jmeter.engine.util.ValueReplacer: About to replace in property of type: class org.apache.jmeter.testelement.property.StringProperty: ${THRD} 2011/09/24 21:30:47 DEBUG - jmeter.testelement.property.AbstractProperty: Not running version, return raw function string 2011/09/24 21:30:47 DEBUG - jmeter.engine.util.ValueReplacer: Replacement result: ${THRD} ... 2011/09/24 21:30:47 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*) 2011/09/24 21:30:47 DEBUG - jmeter.testelement.property.AbstractProperty: Running version, executing function 2011/09/24 21:30:47 INFO - jmeter.engine.StandardJMeterEngine: Starting 0 threads for group Thread Group. ... Starting 0 threads I'm not sure is this a bug or is it related to the process how JMeter initializes the test (threads)? Nermin -Original Message- From: Deepak Shetty [mailto:shet...@gmail.com] Sent: 24. septembar 2011 20:25 To: JMeter Users List Subject: Re: Generate requests at specified time you can delay requests within a thread by using some of the timers (for e.g. Constant Timer - where the input is a variable calculated as the time you want to delay - the time the last sample took). However since you also have multiple requests at the same time - thats not easy to do (unless these urls are part of the same page in which case it might be possible to use the 2.5 feature of retrieving embedded requests) Plus you have additional problems of what happens if the first request takes more than one second? Is the next request still made? But like Oliver mentioned you seem to have this as a solution for a problem , and perhaps it may be more useful to describe what you want to do - maybe there are other options regards deepak On Sat, Sep 24, 2011 at 5:16 AM, Jian-Ming Zheng jmzh...@gmail.com wrote: Hi, Thanks for the reply. I have used the Constant Throughput Timer to control the number of requests generated per minute. However, the function does not meet my need. Let me explain it in more detail :) For example, I have 10 requests for the testing Web server (i.e., requests 1, 2, ., 10). I want to generate the 10 requests as follows. [time] [requests] 1 s: requests 1 and 2 2 s: request 3 3 s: request 4 4 s: requests 5, 6, and 7 5 s: request 8 6 s: requests 9 and 10 The number of requests generated per time interval is not constant. To control the sequence of requests, I would like to generate a trace file consisting of requests with the specified times. Can JMeter read the file and generate requests at specified times according to the trace? Thanks for any replies. On Sat, Sep 24, 2011 at 6:58 PM, Oliver Lloyd oliver_ll...@hotmail.com wrote: Are you talking about pacing these requests? If so, try the http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Constan t_Throughput_Timer Constant Throughput Timer . - http://www.http503.com/ -- View this message in context: http://jmeter.512774.n5.nabble.com/Generate-requests-at-specified-time-tp483 6359p4836368.html Sent from the JMeter - User mailing list archive at Nabble.com. - To unsubscribe, e-mail:
RE: Load Testing with Variable Request Path
Yes, JMeter can read URL from a text file, just use CSV Data Set Config (Config Element) and loop through it. You can setup a single-column csv where you put one URL per line. If necessary, you can add additional columns (sometimes I use NAME,HOST where I put ${NAME} as a Sampler Name and ${HOST} is URL, just for clarity, or you can use ${COUNTER} as a part of the Sampler Name so when you find an error you can easily go back and trace the line in your input file. This is used to collect all the failed records and to re-test them until everything is hopefully fixed) Nermin -Original Message- From: pawinder [mailto:pawinder_gu...@yahoo.com] Sent: 9. septembar 2011 14:17 To: jmeter-user@jakarta.apache.org Subject: Load Testing with Variable Request Path Hi, I have a scenario where I need to load test a website that has over 5000 pages. One option is that I create 5000+ http request samplers. It will be too time consuming to create and maintain so many requests. I was wondering if jmeter can read the URL for request from a text file. So that I could keep URLs to all the web pages in a text file and jmeter reads from the text file and fires http requests. Any suggestions are most welcome. Thanks, Pawinder -- View this message in context: http://jmeter.512774.n5.nabble.com/Load-Testing-with-Variable-Request-Path-t p4786122p4786122.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
RE: Issue with Reular Expression
Can you please provide at least an example of text from which you are extracting something (that you pass to the next request), as well as how you configured your extractor to do that? Have you tried using Debug Sampler to make sure everything is extracted as expected? From what I read in your email, it's either a problem with how you do extraction in JMeter or it could be a problem related to your app's sessions etc. Nermin -Original Message- From: chanda [mailto:kcma...@yahoo.com] Sent: 5. septembar 2011 13:37 To: jmeter-user@jakarta.apache.org Subject: Issue with Reular Expression I have gone through the Queries on the Reg expression but none could solve my issues. I have recored the script and need to correlate the __ViewState amd the __Event Validation. Here is what I have in the script. I have some requests ie 1. hrp/aa/login.aspx - Get 2. hrp/aa/login.aspx - Post 3. hrp/aa/home.aspx - Get 4. hrp/aa/newemp.aspx - Get 5. hrp/aa/newemp.aspx - Post 6. hrp/aa/newemp.aspx - Post 7. hrp/aa/newemp.aspx - Post 8. hrp/aa/newemp.aspx - Post 9. hrp/aa/newemp.aspx - Post and so on what I have done is Created 7 Reg Expression for the ViewState and EventValidation and extraced the requset of the previous request and associated to the next request. but still I am getting an error State is ivalid or currupted. Can you please suggest it is very urgent. -- View this message in context: http://jmeter.512774.n5.nabble.com/Issue-with-Reular-Expression-tp4770195p47 70195.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
RE: Re: Saving the reply in Jmeter
Match No = -1 will match ALL occurrences Example: say your regex is code(.+?)/code and Match no is -1. If there are more than one occurrences of code this will match all of them, like ${EXTRACTED_CODE_1}, ${EXTRACTED_CODE_2}, ${EXTRACTED_CODE_3} etc. If there are 3 matches, than you will also get a variable like ${EXTRACTED_CODE_matchnr} with the value of 3, which is useful if you want to Loop through all of them. In the same example, if you would use Match no. = 2, this would match only the 2nd occurrence. Match no = 0 would match a random item. Hope this helps, Nermin -Original Message- From: Adrian Speteanu [mailto:asp.ad...@gmail.com] Sent: 11. kolovoz 2011 14:29 To: JMeter Users List Subject: Re: Re: Saving the reply in Jmeter Why are you all using Match No.: -1 ? On Thu, Aug 11, 2011 at 2:48 PM, rajivkumarnandv...@gmail.com wrote: :) lolz i alws be here in mail :) On , Oliver Lloyd oliver_ll...@hotmail.com wrote: Thanks Raj, where would we be without you. -- View this message in context: http://jmeter.512774.n5.** nabble.com/Saving-the-reply-**in-Jmeter-tp4687066p4689158.**htmlhttp://jmeter.512774.n5.nabble.com/Saving-the-reply-in-Jmeter-tp4687066p4689158.html Sent from the JMeter - User mailing list archive at Nabble.com. --**--**- To unsubscribe, e-mail: jmeter-user-unsubscribe@**jakarta.apache.orgjmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.**apache.orgjmeter-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
RE: HTTP Request and HTTP Header Manager to execute these scripts on different Application servers
Shirish, Maybe you can put your test logic under For Each controller and specify different environments in User Defined Variables, in some cases this works and it's very handy. See http://jakarta.apache.org/jmeter/usermanual/component_reference.html#ForEach _Controller Regards, Nermin -Original Message- From: Shirish [mailto:shirish.ganje...@gmail.com] Sent: 11. kolovoz 2011 15:15 To: JMeter Users List Subject: Reg: HTTP Request and HTTP Header Manager to execute these scripts on different Application servers Hello Friends, As of now I am currently working with a Product Development team which works in 5 different continents and has separate Application Servers let's say A, B, C, D and E (all these servers are synchronized means shares the same BUILDS/SOFTWARE'S and all . While working with Performance Testing, I have created a Test Plan/JMX script by recording it on the A server. I used various features of the JMeter like CSV, Reg Ex and Listeners. Now our requirement is to run these scripts on remaining different servers to reproduce the issues which I encountered and reported with the Application server A. I found one solution as to remove the *HTTP Header Manager* present under the Http Requests, after updating the HTTP Request Defaults -- Server name /IP variable value to the desired Server Address; I found that some thread requests are getting executed successfully and some or not. Please advise if there is any other way out to do the required. Thanks and regards, Shirish Ganjewar - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
RE: Script execution to Uplaod a documnet through Jmeter.
Hruda, Jmeter log file can be found in the same folder where jmeter.bat is, i.e. jmeter/bin/jmeter.log If you want to see more details in the log file, you can set a different log level in jmeter/bin/jmeter.properties (log_level.jmeter=DEBUG) Note that in JMeter, if you don't specify (relative or absolute) path to a file but refer to it just by file name, by default it will search the directory where your script is saved and also jmeter/bin directory. Nermin -Original Message- From: Hruda [mailto:hrud...@gmail.com] Sent: 8. kolovoz 2011 19:47 To: jmeter-user@jakarta.apache.org Subject: RE: Script execution to Uplaod a documnet through Jmeter. File path: I have tried with the following file paths and I have checked for the trailing spaces as well. 1. D:\jmeter\contractdoc 2. D:\Jmeter\bin\contractdoc 3. D:\Contractdoc Regarding to the Logfile: Hey I have tryed to get the log file, but sorry to say that I am not able to get that file. Can u Plz tell me how to get the log file, mean where the log file is getting stored. -- View this message in context: http://jmeter.512774.n5.nabble.com/Script-execution-to-Uplaod-a-documnet-thr ough-Jmeter-tp4635154p4678514.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
RE: Issues with JDBC Request and variables
OK, I did a quick test and Random Variable node supports using variables to set Min and Max value The only way I was able to break it was to set Min value which was larger than Max value (which produced error in log file ERROR - jmeter.config.RandomVariableConfig: maximum(1) must be minimum3 as expected) So you need to provide more info as to what do you mean by this breaks the random variable node, best if you provide jmeter.log Nermin -Original Message- From: derekmw [mailto:derekwrobelt...@gmail.com] Sent: 27. srpanj 2011 18:06 To: jmeter-user@jakarta.apache.org Subject: RE: Issues with JDBC Request and variables Ok, so that helped me get a bit further. I noticed you can choose the output format for Random Variable. So I set the output format to be member_0. This works great but I still have one problem. When generating the random variable, I do not want to hard code the max value. I tried entering ${count_1} which is the count of 'members' returned from another query. However, this breaks the Random Variable node, and the variable does not even get set. I was so close. For now, I CAN set the number manually to the number of members I know we have in the database (and just increment it overtime as the members increase), but I would really love to have this be dynamic. Any other suggestions? -- View this message in context: http://jmeter.512774.n5.nabble.com/Issues-with-JDBC-Request-and-variables-tp 4635807p4639304.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
Re: RE: Issues with JDBC Request and variables
Is your random controller broken because count returns 1 and you are trying to generate random values between 1 and 1? This might be the problem (based on first debug sampler), please check You can temporarily disable your count select, go to the top of your test plan (or add User Defined Variables) and define the variable with the same name (count_1 in your case) and assign it a value (say 50). See what happens in this case - hope this helps to narrow down the issue Nermin - Original Message - On 05:08 PM 07/28/2011 derekmw wrote: Sorry for not being clearer. Basically I meant 'break' as in, the variable never gets set. I do not see any logging occuring on jmeter.log, but I have a View Results Tree node and here is my Debug Sampler response data. First, when I don't use variables in the random variable node, you can see RND is being set correctly: JMeterVariables: JMeterThread.last_sample_ok=false JMeterThread.pack=org.apache.jmeter.threads.SamplePackage@62d962c RND=member_1 START.HMS=073751 START.MS=1311863871752 START.YMD=20110728 TESTSTART.MS=1311865514488 count_#=1 count_1=1 members_#=1 members_1=1 ssng_db=org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSou rceComponentImpl@1ade25df If I try entering a variable for the max (${count_1}), you see RND is not even being set: JMeterVariables: JMeterThread.last_sample_ok=false JMeterThread.pack=org.apache.jmeter.threads.SamplePackage@40185808 START.HMS=073751 START.MS=1311863871752 START.YMD=20110728 TESTSTART.MS=1311865569464 count_#=1 count_1=1 members_#=1 members_1=1 ssng_db=org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSou rceComponentImpl@7e3b9617 The fact that it's not being set I assumed meant it doesn't accept a variable. If you say it works, I must be entering the variable incorrectly? I have tried: ${count} ${count_1} ${__evalVar(${count})} ${__evalVar(${count_1})} -- View this message in context: http://jmeter.512774.n5.nabble.com/Issues-with-JDBC-Request-and-variable s-tp4635807p4643055.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
RE: Issues with JDBC Request and variables
Derek, Regarding the issue #2, substitution, have you tried using __evalVar instead of __V? V function evaluates a variable name and you need evalVar to actually get the value [integer in your case] stored in that variable. As for the first issue, double check the values using Debug Sampler (before and after your JDBC sampler) and also try if extracting the value from response works for you. Why do you use ${count_1}, i.e. what's stored in ${count}? Depending on JMeter version you're using, did you set Parameter Types in your JDBC sampler? Nermin -Original Message- From: derekmw [mailto:derekwrobelt...@gmail.com] Sent: 26. srpanj 2011 20:21 To: jmeter-user@jakarta.apache.org Subject: Issues with JDBC Request and variables Hi, I apologize if this has been answered as I am not sure what to search for. I believe this is a unique situation. I have two problems: 1. I have a JDBC request which does a VERY simple select statement with the following sql: select count(member_id) from member This is then stored in a variable named count. I know what the count should be (should be 312), but the value count_1 gets is 40077. What is even more troubling is at some point, it started working and getting the correct count. Any idea what is going on? 2. In a seperate JDBC request, I retrieve a list of members: select member_id from members This is stored in a variable named members. Then I created a THIRD JDBC request to query and grab a random member: select * from members where member_id = ? In Parameter values, I put in ${__V(member_${__Random(1,10)})} (note I put 10, not $count because I can't even get it to work correctly with a hard coded number). I see that this gets parsed correctly, but the error I get is: org.postgresql.util.PSQLException: ERROR: invalid input syntax for integer: member_7 So it's not substituting the member_7 variable's value. Instead it's just passing the string. What am I doing wrong here? -- View this message in context: http://jmeter.512774.n5.nabble.com/Issues-with-JDBC-Request-and-variables-tp 4635807p4635807.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
RE: Issues with JDBC Request and variables
Derek, I was thinking something like ${__evalVar(member_${__Random(1,10)})} And if you think nesting might be the issue, simply try using Random Variable node (not __Random() function), e.g. ${__evalVar(member_${RND})} provided that your random value is stored in ${RND} http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Random_ Variable Nermin -Original Message- From: derekmw [mailto:derekwrobelt...@gmail.com] Sent: 27. srpanj 2011 17:06 To: jmeter-user@jakarta.apache.org Subject: RE: Issues with JDBC Request and variables Thanks for the comment. On the count, I am not sure what happened but it is working again. lol. Oh well. For #2, the problem is I do not know what variable I want to use, so I have to do a nested variable (member_ combined with a random number). So I at least at some point have to first combine the two. So I did the following: 1. Created a user Defined Variable - evalRandNum, with the value ${__V(member_${__Random(1,10)})} In the Debug Sampler, I see that evalRandNum correctly evaluates as member_5 (or whatever rand number) 2. In my JDBC Request following this, I tried to then use your suggestion and entered the parameter value of ${__evalVar(${evalRandNum})} But this must not be returning anything as the error on the JDBC Request is: No value specified for parameter 1. Being that ${evalRandNum} evaluates to a string member_5, I would have thought your suggestion of evalVar would definitely grab the value of the variable member_5. But instead it seems it doesn't evaluate to anything. Am I missing something obvious? Any ideas? If you could just have nested variables, this would be a lot easier. -- View this message in context: http://jmeter.512774.n5.nabble.com/Issues-with-JDBC-Request-and-variables-tp 4635807p4639091.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
RE: Response too large to be displayed
Kumar, Edit your jmeter.properties, uncomment the following parameter and set it to zero: view.results.tree.max_size=0 After restaring JMeter, you won't get the error anymore. Cheers, Nermin -Original Message- From: sebb [mailto:seb...@gmail.com] Sent: 22. srpanj 2011 2:04 To: JMeter Users List Subject: Re: Response too large to be displayed On 22 July 2011 00:55, mke jira mkej...@gmail.com wrote: In results tree sampler I get this message. I am just running for 1 thread for debug purposes.. Response too large to be displayed. Size: 565337 Max: 204800 I saw in some posts that I can use Save responses to file, however I want to know if we can increase size in tree sampler. Is there a way to increase size and see the output. Please let me know. http://jakarta.apache.org/jmeter/usermanual/component_reference.html#View_Re sults_Tree Thanks Kumar - 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
RE: JMETER Unresponsive
Kumar, if you run jmeter from command line and specify output XML file to log to, even if you kill the process you will have info in your XML log file. The file will not obviously be a well-formed XML, but even so, you should be able to open JMeter, add your favorite listener (View Results Tree for example) and Browse/open the log to see what happened. Nermin P.S. when you run the script, try to watch the memory consumed by java process to see if it reaches the max configured very quickly -Original Message- From: Adrian Speteanu [mailto:asp.ad...@gmail.com] Sent: 20. srpanj 2011 10:26 To: JMeter Users List Subject: Re: JMETER Unresponsive Hi, Does this happen in GUI mode? I found out that the sometimes the GUI doesn't refresh and appears like its frozen, but jmeter keeps running business as usual if you have an ongoing test. What helps me on Ubuntu 10 is to maximize / de-maximize the window (or move window to another monitor) and all is ok then. I recently noticed this behaviour on WIndows as well. I think it happens if other windows are focused over JMeter and then you start working again with it, but can't be 100% sure. This behaviour is specific only to this java desktop-application. Hope this helps you not kill the tests all the time. Regards, Adrian S On Wed, Jul 20, 2011 at 9:47 AM, mke jira mkej...@gmail.com wrote: Hi Sometimes while running tests JMeter becomes unresponsive and hangs. Only option is to kill the instance. Then all data collected in the run is lost. I have increased memory. What is the strategy to follow so that even if JMeter hangs I will be able to save data collected before it hangs. Please let me know. Thanks Kumar - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
__time function for a specific timezone?
Hi, Current implementation of __time() returns time in local timezone. What's the simplest way to get current time in specific timezone (or in UTC)? Thanks Nermin
RE: Is There a Defined Variable Function in Jmeter?
Bruce, Maybe you could use Debug Sampler: 1. put the Debug Sampler at the top of your test plan, make JMeter variables True, rest should be False 2. then make assertion that response must not contain regex (.+?)=\n (meaning variable with undefined or empty value) 3. optionally, after this you can put If Controller with the following condition ${JMeterThread.last_sample_ok}==true and put your test elements as children of this if controller. The result: if there are any undefined variables your test will not be executed. Cheers, Nermin -Original Message- From: sebb [mailto:seb...@gmail.com] Sent: 18. srpanj 2011 17:40 To: JMeter Users List Subject: Re: Is There a Defined Variable Function in Jmeter? On 11 July 2011 18:02, Bruce Ide flyingrhenqu...@gmail.com wrote: Hey All, I sometimes have to check to see if a variable is defined, and writing an if sampler with '${variable}' == ('$' + '{variable}') is kind of nasty. Is s/sampler/controller/ there a function to test if a variable is defined? If no one's written one yet, it's a good chance for me to look into how to write predefined functions in jmeter! :-D What do you need this for? i.e. how would you use it? The __P() function allows one to provide a default for missing properties; it should be simple enough to provide an equivalent function that did the same for variables. Or perhaps you want the function to return true/false? -- Bruce Ide flyingrhenqu...@gmail.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
RE: Datas inserted unordered while using CSV file for load testing in J Meter.
Hi, Saravanan, First scenario simulates 10 users sending the requests in parallel, each user taking data from a single line from your input file: first one that is processed by the system under test is returned etc. Second scenario works sequentially: when first line completes, next one is taken etc. If parallel threads scenario does not produce any errors [load], then you get the same responses - the only difference is whether you want so simulate parallel or sequential requests (i.e. whether you're interested in performance/load or just want to make sure you get correct responses). And yes, you can have both in your jmeter test plan: just create two threads with corresponding settings. To avoid copy-paste, you can use JMeter's Module Controller http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Module_ Controller where you'd put your sampler and assertions Nermin -Original Message- From: Saravanan [mailto:sasrava...@gmail.com] Sent: 13. srpanj 2011 13:28 To: jmeter-user@jakarta.apache.org Subject: RE: Datas inserted unordered while using CSV file for load testing in J Meter. Its working fine now..Datas are inserted in ordered..But i ve one doubt Nermin.. Scenario 1: No of Threads(Users)=10 Loop Count = 1 Scenario 2: No of Threads(Users)=1 Loop Count =10 Does the output for these two scenarios is same? Could we define these two scenarios for a single case in the thread element? Does these scenarios make any difference? -- View this message in context: http://jmeter.512774.n5.nabble.com/Datas-inserted-unordered-while-using-CSV- file-for-load-testing-in-J-Meter-tp4563502p4582331.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
RE: Datas inserted unordered while using CSV file for load testing in J Meter.
Saravanan, As far as I can see, there are no errors with reading line by line and assigning variables (i.e. for each item you get corresponding name, category and other attributes), what you see as messed up is order in which you get responses. If I'm not mistaken: - when you choose Number of threads = 10, this won't necessarily return you responses in the same order specified in the input file - when you choose Loop Counter = 10 (Number of threads = 1), you should get all requests/responses in the same order as in input file. Try this as a quick test Nermin -Original Message- From: Saravanan [mailto:sasrava...@gmail.com] Sent: 12. srpanj 2011 15:09 To: jmeter-user@jakarta.apache.org Subject: RE: Datas inserted unordered while using CSV file for load testing in J Meter. first of all tans for ur reply nermin..i ve created few datas on notepad and saved with extensions of .csv.. My csv file datas are as follows IT11,fancy,Gold Ornaments,Silver,1000,500 IT12,Cufflinks,Gold Ornaments,Gold,1001,501 IT13,Unknown,Gold Ornaments,Gold,1002,502 IT14,Ladies Ring,Gold Ornaments,Gold,1003,503 IT15,Bali,Gold Ornaments,Gold,1004,504 IT16,Thali,Gold Ornaments,Gold,1005,505 IT17,Chain necklace set,Gold Ornaments,Gold,1006,506 IT18,Bangel,Gold Ornaments,Gold,1007,507 IT19,Broach/pin,Gold Ornaments,Gold,1008,508 IT100010,Nosepin,Gold Ornaments,Gold,1009,509 AND I CONFIGURED J METER CSV DATA SET CONFIG AS FOLLOWS Configure the CSV Data source: Filename :C:\Documents and Settings\Admin\Desktop\New Folder\Test1.csv File Encoding : Variable Names(comma-delimited):A,B,C,D,E,F Delimiter(use '\t' for tab):, Allow quoted data ?:False Recycle on EOF ?:True Stop Thread on EOF ?:False Sharing mode:All Threads Also i have run the script for 10 threads(ie:given No of Threads=10 in the Thread Group Element) The output is displayed as follows IT14,Ladies Ring,Gold Ornaments,Gold,1003,503 IT15,Bali,Gold Ornaments,Gold,1004,504 IT16,Thali,Gold Ornaments,Gold,1005,505 IT17,Chain necklace set,Gold Ornaments,Gold,1006,506 IT11,fancy,Gold Ornaments,Silver,1000,500 IT12,Cufflinks,Gold Ornaments,Gold,1001,501 IT13,Unknown,Gold Ornaments,Gold,1002,502 IT18,Bangel,Gold Ornaments,Gold,1007,507 IT19,Broach/pin,Gold Ornaments,Gold,1008,508 IT100010,Nosepin,Gold Ornaments,Gold,1009,509 is it correct?does tis o/p contains no error? -- View this message in context: http://jmeter.512774.n5.nabble.com/Datas-inserted-unordered-while-using-CSV- file-for-load-testing-in-J-Meter-tp4563502p4578806.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
RE: Datas inserted unordered while using CSV file for load testing in J Meter.
Saravanan, Can you show us few lines from your CSV file and list of variables that you configured in JMeter? Could it be problem with delimiter appearing in your values? -Original Message- From: Saravanan [mailto:sasrava...@gmail.com] Sent: 8. srpanj 2011 7:28 To: jmeter-user@jakarta.apache.org Subject: Datas inserted unordered while using CSV file for load testing in J Meter. Hi.. I have created a test plan by using J Meter HTTP proxy server and then I added the CSV config file for multiple datas insertion.The steps for add a CSV Config file and create a CSV file everything i have done correctly..The output also generated correctly...All the values from CSV fiels also be inserted correctly into my web application. But the problem is the datas are not inserted in proper order as that of in the CSV file.because I created all the datas correctly in CSV file but J meter was not fetched the datas in correct order.The list of data inserted into my application also be looks like unordered.I dunno the reason..I would really appreciate if anybody give solution for this issue... -- View this message in context: http://jmeter.512774.n5.nabble.com/Datas-inserted-unordered-while-using-CSV- file-for-load-testing-in-J-Meter-tp4563502p4563502.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
How to map extracted pairs of var. names and var. values on the fly
Hi, I have a response in JMeter that looks like this: {NO_RECS_PROC=12, NO_RECS_PASS=11, NO_RECS_FAIL=1, BYTES_READ=193} i.e. pairs of names and values. However, response in the brackets may vary in terms of different names and number of items that appear inside and even their order. Using regex extractor [{| ](.+?)=(.+?)[,|}] I can extract each variable name (ex BYTES_READ) and each value (193) and they are stored in groups, for example extr_4_g1=BYTES_READ and extr_4_g2=193 How can I create JMeter variables on the fly (${BYTES_READ}) and assign it corresponding value (193)? I want to avoid working with regex extracted group variables (example: extr_4_g1) and I want to get more human readable variables (example: BYTES_READ) to avoid any mistakes. The final result should be, in this example, 4 JMeter variables (${NO_RECS_PROC} ${NO_RECS_PASS} etc), corresponding values being assigned to them (12 11 etc), so I can use those human readable variables for further assertions etc. I have tried using Beanshell (loop that goes around as many times as there are groups, vars.put, evalVar...) but no success because I'm not sure how to do this on the fly. I.e. I tried lopping extr_X_g1 where X ranges from 1 (first group) to the number of groups (this case 4) and using vars.put but doesn't work probably because I was trying to nest JMeter's __evalVar${} in Beanshell command... There must be a more elegant way to do this :) I'd appreciate if someone can help. Thanks, Nermin - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
RE: Urgent Regular expression help
Using http://www.gskinner.com/RegExr/ can sometimes help catch the regex problems -Original Message- From: Felix Frank [mailto:f...@mpexnet.de] Sent: Friday, April 15, 2011 9:01 AM To: JMeter Users List Subject: Re: Urgent Regular expression help I have used Regex Extractor to extract message value. My Regex is = messages:([0-9]*?), but I am not getting expected value. I am getting default value set i.e. -1 Is the equals sign part of your regex? If so, that's a problem. - 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