RE: How to control variable substitution in JMeter?
Sebb, I've been arguing with myself about what the proper behavior of the variable substitution feature should be, and I think I am now agreeing with you and Shmuel. I think my problem is mostly a matter of variable scoping, that is, variables should generally be defined such that they are in scope only where they are needed. In our naive implementation, we had too many variables at a global scope. There is still the problem of substituting the correct variable into the correct place in the recorded text; however, I can't think of a simple, effective algorithm that can determine how to do so. The regex matching isn't ideal, but it does help for the majority of simple cases. Thanks to you and Shmuel for your help! -Original Message- From: sebb [mailto:seb...@gmail.com] Sent: Thursday, March 13, 2014 2:44 PM To: JMeter Users List Subject: Re: How to control variable substitution in JMeter? On 12 March 2014 16:03, Shmuel Krakower shmul...@gmail.com wrote: Why making this complex? Just have a dedicated UDV element for such correlation/replacement, while during recordings, disable the others you don't wanna use. Good advice. You can have multiple UDV elements. Disable the ones that don't apply to recording. Also, by using the Regex Matching option you can force the matching to use word-boundaries and even use REs to control the matching. This is all described here: http://jmeter.apache.org/usermanual/component_reference.html#HTTP%28S%2 9_Test_Script_Recorder Shmuel Krakower. www.Beatsoo.org - re-use your jmeter scripts for application performance monitoring from worldwide locations for free. On Tue, Mar 11, 2014 at 4:15 PM, Robin D. Wilson rwils...@gmail.com wrote: I've noticed this too. Sounds like a feature request. Basically, some way to designate which variables can be used for substitution when using the recording controller. Perhaps just a list. -- Robin D. Wilson Sr. Director of Web Development KingsIsle Entertainment, Inc. VOICE: 512-777-1861 http://www.kingsisle.com -Original Message- From: keith.cass...@engilitycorp.com [mailto: keith.cass...@engilitycorp.com] Sent: Tuesday, March 11, 2014 9:09 AM To: user@jmeter.apache.org Subject: How to control variable substitution in JMeter? I have some user defined variables: SERVER_NAME myhost.com THE_HTTP_PROTOCOLHTTP USER_COUNT 1 LOOP_COUNT 2 Then, I use a Recording Controller to capture my browser actions. Unfortunately, JMeter does more variable substitution than I'd like it to. For example, it substitutes ${LOOP_COUNT} into a web site name that contains 2, e.g., /host${LOOP_COUNT}/somePage. My favorite example of over-zealous variable substitution is my ${THE_${THE_HTTP_PROTOCOL}_PROTOCOL} Header Manager. Is it possible to make the recording more selective about what variables can be used for substitution? For example, of the variables I've listed, I'd really only like SERVER_NAME to be substituted in. I'm using JMeter 2.11. - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: How to control variable substitution in JMeter?
On 14 March 2014 12:09, keith.cass...@engilitycorp.com wrote: Sebb, I've been arguing with myself about what the proper behavior of the variable substitution feature should be, and I think I am now agreeing with you and Shmuel. I think my problem is mostly a matter of variable scoping, that is, variables should generally be defined such that they are in scope only where they are needed. In our naive implementation, we had too many variables at a global scope. You could still keep the global scope, but split the variables into mulitple UDVs. Temporarily disable the UDVs that you don't want to be considered for use as replacements during recording. There is still the problem of substituting the correct variable into the correct place in the recorded text; however, I can't think of a simple, effective algorithm that can determine how to do so. The regex matching isn't ideal, but it does help for the majority of simple cases. Selecting Regex Matching automatically wraps the match string with \b so that it will only match on word boundaries. This should help reduce unwanted matches. Thanks to you and Shmuel for your help! -Original Message- From: sebb [mailto:seb...@gmail.com] Sent: Thursday, March 13, 2014 2:44 PM To: JMeter Users List Subject: Re: How to control variable substitution in JMeter? On 12 March 2014 16:03, Shmuel Krakower shmul...@gmail.com wrote: Why making this complex? Just have a dedicated UDV element for such correlation/replacement, while during recordings, disable the others you don't wanna use. Good advice. You can have multiple UDV elements. Disable the ones that don't apply to recording. Also, by using the Regex Matching option you can force the matching to use word-boundaries and even use REs to control the matching. This is all described here: http://jmeter.apache.org/usermanual/component_reference.html#HTTP%28S%2 9_Test_Script_Recorder Shmuel Krakower. www.Beatsoo.org - re-use your jmeter scripts for application performance monitoring from worldwide locations for free. On Tue, Mar 11, 2014 at 4:15 PM, Robin D. Wilson rwils...@gmail.com wrote: I've noticed this too. Sounds like a feature request. Basically, some way to designate which variables can be used for substitution when using the recording controller. Perhaps just a list. -- Robin D. Wilson Sr. Director of Web Development KingsIsle Entertainment, Inc. VOICE: 512-777-1861 http://www.kingsisle.com -Original Message- From: keith.cass...@engilitycorp.com [mailto: keith.cass...@engilitycorp.com] Sent: Tuesday, March 11, 2014 9:09 AM To: user@jmeter.apache.org Subject: How to control variable substitution in JMeter? I have some user defined variables: SERVER_NAME myhost.com THE_HTTP_PROTOCOLHTTP USER_COUNT 1 LOOP_COUNT 2 Then, I use a Recording Controller to capture my browser actions. Unfortunately, JMeter does more variable substitution than I'd like it to. For example, it substitutes ${LOOP_COUNT} into a web site name that contains 2, e.g., /host${LOOP_COUNT}/somePage. My favorite example of over-zealous variable substitution is my ${THE_${THE_HTTP_PROTOCOL}_PROTOCOL} Header Manager. Is it possible to make the recording more selective about what variables can be used for substitution? For example, of the variables I've listed, I'd really only like SERVER_NAME to be substituted in. I'm using JMeter 2.11. - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Exclude URL Patterns
Hello, My question is what is the real reason behind excluding .css/.js/third party files while recording the script through proxy? Don't these files effect the performance of site? Please let me know. Thanks Ankit Sethiya -- Software Quality Analyst Los Angeles, CA 626.202.5415
Re: Exclude URL Patterns
On 14 March 2014 19:20, Ankit Sethiya ankit.seth...@gmail.com wrote: Hello, My question is what is the real reason behind excluding .css/.js/third party files while recording the script through proxy? Because these are normally auto downloaded when processing the main sample. Don't these files effect the performance of site? Yes. Please let me know. Thanks Ankit Sethiya -- Software Quality Analyst Los Angeles, CA 626.202.5415 - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Playing back PUT HTTP requests with binary content
I am using JMeter to record PUT HTTP requests made to a server, where the content of the request is unencoded, raw JPEG (or MP4). I have noticed that the data in the played back requests is altered, and LF are changed to CRLF, by comparing the traffic captured with Wireshark. I think the content-type of the request is correctly indicated as image/jpeg or video/mp4 in the original requests. Is there a way to both record the original traffic verbatim and play it back as such? It is very possible I am not using the tool properly and any help or hints are much appreciated. Thanks! - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Playing back PUT HTTP requests with binary content
On 14 March 2014 19:33, Liviu Nicoara nikko...@hates.ms wrote: I am using JMeter to record PUT HTTP requests made to a server, where the content of the request is unencoded, raw JPEG (or MP4). I have noticed that the data in the played back requests is altered, and LF are changed to CRLF, by comparing the traffic captured with Wireshark. I think the content-type of the request is correctly indicated as image/jpeg or video/mp4 in the original requests. Is there a way to both record the original traffic verbatim and play it back as such? It is very possible I am not using the tool properly and any help or hints are much appreciated. Which version of JMeter are you using? Thanks! - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Exclude URL Patterns
Sometimes your site uses resources from another domain or domains and you don't want your intranet in a black list.
RE: Exclude URL Patterns
There are a couple of reasons: 1) If you site uses a CDN (Content Data Network - or Edge Servers such as Akamai, Limelight, etc.), the performance of these files will not be something that you directly control in your network - so testing their performance may skew your test results. Moreover, trying to run performance tests against their system will have 2 deleterious effects: 1) introduce an external system to your testing which can adversely affect your test reliability; and 2) run up your costs by making a lot of requests through your testing system to the CDN (eating up the bandwidth you are paying for). 2) If your pages include assets (images, sounds, flash files, CSS, JS, etc.) from third-party sites, you have the same problem as above - fetching those during your testing can adversely affect your testing, and give you erroneous problems to chase down - because you have no control over the performance of those external sites. Moreover, hitting those sites with a significant performance test could really piss off those third-parties. (For example, our marketing department once included a JavaScript widget loaded from a third-party site - that they found by googling. They included that in content without telling us. The third-party site was some guy's blog, and I'm sure they didn't expect to have 1M plus hits per day coming from our users. If I had fired up a big performance test against that site (in addition to our users just pounding on it from normal use), I'm sure that guy would have freaked out.) -- Robin D. Wilson Sr. Director of Web Development KingsIsle Entertainment, Inc. VOICE: 512-777-1861 http://www.kingsisle.com -Original Message- From: Ankit Sethiya [mailto:ankit.seth...@gmail.com] Sent: Friday, March 14, 2014 2:21 PM To: user@jmeter.apache.org Subject: Exclude URL Patterns Hello, My question is what is the real reason behind excluding .css/.js/third party files while recording the script through proxy? Don't these files effect the performance of site? Please let me know. Thanks Ankit Sethiya -- Software Quality Analyst Los Angeles, CA 626.202.5415 - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org
Re: Exclude URL Patterns
Got it. Thank you very much to all for your quick response. I appreciate your time. Ankit Sethiya On Fri, Mar 14, 2014 at 1:45 PM, Robin D. Wilson rwils...@gmail.com wrote: There are a couple of reasons: 1) If you site uses a CDN (Content Data Network - or Edge Servers such as Akamai, Limelight, etc.), the performance of these files will not be something that you directly control in your network - so testing their performance may skew your test results. Moreover, trying to run performance tests against their system will have 2 deleterious effects: 1) introduce an external system to your testing which can adversely affect your test reliability; and 2) run up your costs by making a lot of requests through your testing system to the CDN (eating up the bandwidth you are paying for). 2) If your pages include assets (images, sounds, flash files, CSS, JS, etc.) from third-party sites, you have the same problem as above - fetching those during your testing can adversely affect your testing, and give you erroneous problems to chase down - because you have no control over the performance of those external sites. Moreover, hitting those sites with a significant performance test could really piss off those third-parties. (For example, our marketing department once included a JavaScript widget loaded from a third-party site - that they found by googling. They included that in content without telling us. The third-party site was some guy's blog, and I'm sure they didn't expect to have 1M plus hits per day coming from our users. If I had fired up a big performance test against that site (in addition to our users just pounding on it from normal use), I'm sure that guy would have freaked out.) -- Robin D. Wilson Sr. Director of Web Development KingsIsle Entertainment, Inc. VOICE: 512-777-1861 http://www.kingsisle.com -Original Message- From: Ankit Sethiya [mailto:ankit.seth...@gmail.com] Sent: Friday, March 14, 2014 2:21 PM To: user@jmeter.apache.org Subject: Exclude URL Patterns Hello, My question is what is the real reason behind excluding .css/.js/third party files while recording the script through proxy? Don't these files effect the performance of site? Please let me know. Thanks Ankit Sethiya -- Software Quality Analyst Los Angeles, CA 626.202.5415 - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org -- Software Quality Analyst Los Angeles, CA 626.202.5415
Re: Playing back PUT HTTP requests with binary content
On Mar 14, 2014, at 3:45 PM, sebb seb...@gmail.com wrote: On 14 March 2014 19:33, Liviu Nicoara nikko...@hates.ms wrote: I am using JMeter to record PUT HTTP requests made to a server, where the content of the request is unencoded, raw JPEG (or MP4). I have noticed that the data in the played back requests is altered, and LF are changed to CRLF, by comparing the traffic captured with Wireshark. ... Is there a way to both record the original traffic verbatim and play it back as such? It is very possible I am not using the tool properly and any help or hints are much appreciated. Which version of JMeter are you using? I downloaded it three days ago. I presume the latest version available on the website. I don’t have my other laptop with me now to precisely identify the version. - To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org For additional commands, e-mail: user-h...@jmeter.apache.org