Re: Reg: HTTP Request and HTTP Header Manager to execute these scripts on different Application servers
Lets see if I can include jmx files here. If not I can post these in my github repository. Please find enclosed two JMX tests (Assuming something doesn't eat them between here and there.) samplevars.jmx contains two user defined variable elements, one of which is disabled. You can switch which one is disabled to get a different environment. testSampleVars.jmx contains a simple demonstration with the jmeter 2.4 include controller. Note that if you use earlier versions of jmeter your mileage may vary. I'm not sure where the include controller looks for its files by default, but it'll probably tell you when you try to run this test. When you change something in samplevars.jmx, you need to save BOTH samplevar.jmx and testSampleVars.jmx, so that the include controller refreshes its tree correctly. If your mail system or the forum software ate the tests let me know and I'll post them on github. I included a bit of bonus code -- a groovy sampler that reads a properties file in from a file. I use this in Hudson integration -- Hudson puts parameters in the environment, which jmeter doesn't seem to be particularly good at reading. So before I launch Hudson jobs (With ant,) I echo the environment into a file with env environment.props (Or something like that, forget the filename I used but it's in the code.) Then I read it in with this sampler. For some config elements this doesn't work so well, because you're defining the variables at test run time, but the config elements need to have access to the variables earlier. For those variables, I send them to jmeter as properties. I'm not sure where the include controller looks for its files by default, but it'll probably tell you when you try to run this test. When you change something in samplevars.jmx, you need to save BOTH samplevar.jmx and testSampleVars.jmx, so that the include controller refreshes its tree correctly. -- 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
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
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: Reg: HTTP Request and HTTP Header Manager to execute these scripts on different Application servers
I run into this sort of thing a lot at work. What I ended up doing was making a variables.jmx file with all those variables for the different environments defined in 4 different user defined variables config elements. Then I just enable only the config element I want to use for a specific environment. I include this in my test with an include controller. You could do something like this and distribute your file around to the various other locations that need to run your test and that would let them customize servers and database connections and things like that to their specific environment. You could probably set it up to pull its data from java properties files too. -- Bruce Ide flyingrhenqu...@gmail.com
Re: Reg: HTTP Request and HTTP Header Manager to execute these scripts on different Application servers
hi usually what you need to vary the IP address and port , potentially also the url. You have to paremeterise all those variables so that you can switch between them easily http://theworkaholic.blogspot.com/2009/06/testing-multiple-environments-with.html. regards deepak On Thu, Aug 11, 2011 at 6:14 AM, Shirish shirish.ganje...@gmail.com wrote: 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
Re: How to capture dynamic values from HTTP Header Manager
Hi, That is correct the Location header is sent by the server. But it is not being captured by Jmeter. If I run thru the same action using Fidler, I can see the Location Header. Any other options to make the Jmeter to receive the Location Header in this context? Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
Re: How to capture dynamic values from HTTP Header Manager
On 07/06/2010, Prakash pkpa...@gmail.com wrote: Hi, That is correct the Location header is sent by the server. But it is not being captured by Jmeter. What do you mean by captured ? Does it not appear in the View Results Tree Listener? All headers are shown on the Sampler Result tab under Response Headers If if does not appear, maybe you have selected Redirect automatically. If I run thru the same action using Fidler, I can see the Location Header. Any other options to make the Jmeter to receive the Location Header in this context? Thanks, Prakash - 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 capture dynamic values from HTTP Header Manager
Hi All, Can someone help me what would be the solution for following scenario? There are two responses get generated (say X.aspx and Y.aspx) upon a request. The value of the Location parameter in the HTTP Header Manager of X.aspx (POST Method used)contains the URL: Y.aspx?ID=abcdf Y.aspx contains the send parameter that is ID Jmeter does not capture the value of the Location parameter in the HTTP Header Managet of X.aspx during the recording(I found the header details of X.aspx contains the Location parameter using Fiddler). How can I set the dynamic values generated by the system for the Location parameter in the HTTP Header Manager and would capture the value of variable (ID) using regular expression from the header of X.aspx and assign it in the send parameters of Y.aspx? Any help to get the solution will be appreciated. Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
Re: How to capture dynamic values from HTTP Header Manager
On 04/06/2010, Prakash pkpa...@gmail.com wrote: Hi All, Can someone help me what would be the solution for following scenario? There are two responses get generated (say X.aspx and Y.aspx) upon a request. The value of the Location parameter in the HTTP Header Manager of X.aspx (POST Method used)contains the URL: Y.aspx?ID=abcdf Y.aspx contains the send parameter that is ID Jmeter does not capture the value of the Location parameter in the HTTP Header JMeter captures all headers that it receives; check the response in View Results Tree Listener. Managet of X.aspx during the recording(I found the header details of X.aspx contains the Location parameter using Fiddler). How can I set the dynamic values generated by the system for the Location parameter in the HTTP Header Manager and would capture the value of variable (ID) using regular expression from the header of X.aspx and assign it in the send parameters of Y.aspx? Why not use follow redirect? Any help to get the solution will be appreciated. Thanks, Prakash - 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: How to capture dynamic values from HTTP Header Manager
sebb sebbaz at gmail.com writes: On 04/06/2010, Prakash pkpalai at gmail.com wrote: Hi All, Can someone help me what would be the solution for following scenario? There are two responses get generated (say X.aspx and Y.aspx) upon a request. The value of the Location parameter in the HTTP Header Manager of X.aspx (POST Method used)contains the URL: Y.aspx?ID=abcdf Y.aspx contains the send parameter that is ID Jmeter does not capture the value of the Location parameter in the HTTP Header JMeter captures all headers that it receives; check the response in View Results Tree Listener. Managet of X.aspx during the recording(I found the header details of X.aspx contains the Location parameter using Fiddler). How can I set the dynamic values generated by the system for the Location parameter in the HTTP Header Manager and would capture the value of variable (ID) using regular expression from the header of X.aspx and assign it in the send parameters of Y.aspx? Why not use follow redirect? Any help to get the solution will be appreciated. Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscribe at jakarta.apache.org For additional commands, e-mail: jmeter-user-help at jakarta.apache.org Hi, Ofcourse, JMeter captures header details that it receives. But in this specific context, it does not capture the value of Location parameter which contains the dynamically generated URL that needs to be redirected.. I am using Follow Redirects but how to capture the value of the send parameter (that is Location) for Y.aspx that supposed to be present in the HTTP Header Manager of X.aspx? Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
Re: How to capture dynamic values from HTTP Header Manager
On 04/06/2010, Prakash pkpa...@gmail.com wrote: sebb sebbaz at gmail.com writes: On 04/06/2010, Prakash pkpalai at gmail.com wrote: Hi All, Can someone help me what would be the solution for following scenario? There are two responses get generated (say X.aspx and Y.aspx) upon a request. The value of the Location parameter in the HTTP Header Manager of X.aspx (POST Method used)contains the URL: Y.aspx?ID=abcdf Y.aspx contains the send parameter that is ID Jmeter does not capture the value of the Location parameter in the HTTP Header JMeter captures all headers that it receives; check the response in View Results Tree Listener. Managet of X.aspx during the recording(I found the header details of X.aspx contains the Location parameter using Fiddler). How can I set the dynamic values generated by the system for the Location parameter in the HTTP Header Manager and would capture the value of variable (ID) using regular expression from the header of X.aspx and assign it in the send parameters of Y.aspx? Why not use follow redirect? Any help to get the solution will be appreciated. Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscribe at jakarta.apache.org For additional commands, e-mail: jmeter-user-help at jakarta.apache.org Hi, Ofcourse, JMeter captures header details that it receives. But in this specific context, it does not capture the value of Location parameter which contains the dynamically generated URL that needs to be redirected.. I am using Follow Redirects but how to capture the value of the send parameter (that is Location) for Y.aspx that supposed to be present in the HTTP Header Manager of X.aspx? What has the Header Manager got to do with this? The Header Manager is used to send additional headers. The normal way to capture page content is to use: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor Thanks, Prakash - 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: How to capture dynamic values from HTTP Header Manager
sebb sebbaz at gmail.com writes: On 04/06/2010, Prakash pkpalai at gmail.com wrote: sebb sebbaz at gmail.com writes: On 04/06/2010, Prakash pkpalai at gmail.com wrote: Hi All, Can someone help me what would be the solution for following scenario? There are two responses get generated (say X.aspx and Y.aspx) upon a request. The value of the Location parameter in the HTTP Header Manager of X.aspx (POST Method used)contains the URL: Y.aspx?ID=abcdf Y.aspx contains the send parameter that is ID Jmeter does not capture the value of the Location parameter in the HTTP Header JMeter captures all headers that it receives; check the response in View Results Tree Listener. Managet of X.aspx during the recording(I found the header details of X.aspx contains the Location parameter using Fiddler). How can I set the dynamic values generated by the system for the Location parameter in the HTTP Header Manager and would capture the value of variable (ID) using regular expression from the header of X.aspx and assign it in the send parameters of Y.aspx? Why not use follow redirect? Any help to get the solution will be appreciated. Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscribe at jakarta.apache.org For additional commands, e-mail: jmeter-user-help at jakarta.apache.org Hi, Ofcourse, JMeter captures header details that it receives. But in this specific context, it does not capture the value of Location parameter which contains the dynamically generated URL that needs to be redirected.. I am using Follow Redirects but how to capture the value of the send parameter (that is Location) for Y.aspx that supposed to be present in the HTTP Header Manager of X.aspx? What has the Header Manager got to do with this? The Header Manager is used to send additional headers. The normal way to capture page content is to use: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Ex pression_Extractor Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscribe at jakarta.apache.org For additional commands, e-mail: jmeter-user-help at jakarta.apache.org Hi, Let me explain you the exact context again: Steps: Suppose on specific action: There are two response files on following sequence: 1. X.aspx 2. Y.aspx HTTP-Header Manager of X.aspx contains following values: Accept-Language:en-us Accept: */* User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; etc.) Accept-Encoding: gzip, deflate UA-CPU:x86 Location: Dynamically generated URL- //Y.aspx?ID=abcdf which I can see when run thru fiddler but does find from the response header of X.aspx while run thru the Jmeter. The response content of X.aspx does not contain the value of the dynamic variable ID. Value of the ID is only present in the HTTP Header of X.aspx. To work redirect correctly for Y.aspx, I need to have the value of the ID that can be appended in the Y.aspx or ID can be used as the send parameter for Y.aspx. Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
Re: How to capture dynamic values from HTTP Header Manager
On 04/06/2010, Prakash pkpa...@gmail.com wrote: sebb sebbaz at gmail.com writes: On 04/06/2010, Prakash pkpalai at gmail.com wrote: sebb sebbaz at gmail.com writes: On 04/06/2010, Prakash pkpalai at gmail.com wrote: Hi All, Can someone help me what would be the solution for following scenario? There are two responses get generated (say X.aspx and Y.aspx) upon a request. The value of the Location parameter in the HTTP Header Manager of X.aspx (POST Method used)contains the URL: Y.aspx?ID=abcdf Y.aspx contains the send parameter that is ID Jmeter does not capture the value of the Location parameter in the HTTP Header JMeter captures all headers that it receives; check the response in View Results Tree Listener. Managet of X.aspx during the recording(I found the header details of X.aspx contains the Location parameter using Fiddler). How can I set the dynamic values generated by the system for the Location parameter in the HTTP Header Manager and would capture the value of variable (ID) using regular expression from the header of X.aspx and assign it in the send parameters of Y.aspx? Why not use follow redirect? Any help to get the solution will be appreciated. Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscribe at jakarta.apache.org For additional commands, e-mail: jmeter-user-help at jakarta.apache.org Hi, Ofcourse, JMeter captures header details that it receives. But in this specific context, it does not capture the value of Location parameter which contains the dynamically generated URL that needs to be redirected.. I am using Follow Redirects but how to capture the value of the send parameter (that is Location) for Y.aspx that supposed to be present in the HTTP Header Manager of X.aspx? What has the Header Manager got to do with this? The Header Manager is used to send additional headers. The normal way to capture page content is to use: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Ex pression_Extractor Thanks, Prakash - To unsubscribe, e-mail: jmeter-user-unsubscribe at jakarta.apache.org For additional commands, e-mail: jmeter-user-help at jakarta.apache.org Hi, Let me explain you the exact context again: Steps: Suppose on specific action: There are two response files on following sequence: 1. X.aspx 2. Y.aspx HTTP-Header Manager of X.aspx contains following values: Accept-Language:en-us Accept: */* User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; etc.) Accept-Encoding: gzip, deflate UA-CPU:x86 Location: Dynamically generated URL- //Y.aspx?ID=abcdf which I can see when run thru fiddler but does find from the response header of X.aspx while run thru the Jmeter. The HTTP Header Manager is used to add certain headers to the requests sent by JMeter. It does not make sense to send a Location header *to* the server; the Location header is sent *by* the server. The response content of X.aspx does not contain the value of the dynamic variable ID. Value of the ID is only present in the HTTP Header of X.aspx. To work redirect correctly for Y.aspx, I need to have the value of the ID that can be appended in the Y.aspx or ID can be used as the send parameter for Y.aspx. If the Location: header is correctly set by the server, then JMeter will follow it if you enable following. Regarding extracting the ID from a response - did you read: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Regular_Expression_Extractor Also have a look at: http://wiki.apache.org/jakarta-jmeter/DifferentBehaviour Thanks, Prakash - 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: HTTP Header Manager uses old variable values?
Hi sebb, of course the CSV Dataset Config element is the swiss army knife for jmeter users ;-) but for these use cases I don't like it because I have to make sure that I never use keys twice to be able to map the logs later to the backend logs. Very cool would be a REST Dataset Config element or a JDBC Dataset Config element to delegate logic execution and to handle unique keys in a central service. I should experience more with the Bean Shell component to find a way to get this done. Thanks a lot anyway for your excellent and promt support Heiko - Ursprüngliche Mail - Von: sebb seb...@gmail.com An: JMeter Users List jmeter-user@jakarta.apache.org Gesendet: Mittwoch, 13. Januar 2010 17:44:44 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: HTTP Header Manager uses old variable values? On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: sebb, thanks a lot - that works !!! ;-) For everybody who tries to populate a GUID into a HTTP-Header variable here is the full solution: define a user variable: MyGUIDScript = var chars = '0123456789abcdef'.split(''); var uuid = [], rnd = Math.random, r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] = '4'; for (var i = 0; i 36; i++) { if (!uuid[i]) {r = 0 | rnd()*16; uuid[i] = chars[(i == 19) ? (r 0x3) | 0x8 : r 0xf]; } }; uuid.join(''); In the HTTP Header Manager: X-GUID = ${__javaScript(${MyGUIDScript},GUID)} Since the code does not rely on any input from the server, you could use similar code to write the GUIDs to a file, and use the CSV Dataset Config element to read them. sebb schrieb: On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: Hi, when I use HTTP Header Manager to set HTTP header variables old values are used. Has anybody an idea what I'm doing wrong? Header Manager is a Configuration element, and is processed before the thread starts. You can use functions on the Test Plan to define variables. My Testplan: user defined variables: GUID = not set BSF PreProcessor: setting values to variable GUID Simple Controller HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} View Results Tree The results: HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf Request Headers: X-GUID: not set HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e Request Headers: X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf I tried with latest jmeter versions and also with the nightly build Thanks Heiko - 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 - 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: HTTP Header Manager uses old variable values?
On 14/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: Hi sebb, of course the CSV Dataset Config element is the swiss army knife for jmeter users ;-) but for these use cases I don't like it because I have to make sure that I never use keys twice to be able to map the logs later to the backend logs. It's not possible the ensure uniqueness if you use random numbers, unless you keep track of evey number used so far which can take a lot of memory and affect the testing. However, if you generate the IDs in advance, the memory issue does not affect the tests. Very cool would be a REST Dataset Config element or a JDBC Dataset Config element to delegate logic execution and to handle unique keys in a central service. I should experience more with the Bean Shell component to find a way to get this done. Think of CSV Dataset as a poor man's database ... Thanks a lot anyway for your excellent and promt support Heiko - Ursprüngliche Mail - Von: sebb seb...@gmail.com An: JMeter Users List jmeter-user@jakarta.apache.org Gesendet: Mittwoch, 13. Januar 2010 17:44:44 GMT +01:00 Amsterdam/Berlin/Bern/Rom/Stockholm/Wien Betreff: Re: HTTP Header Manager uses old variable values? On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: sebb, thanks a lot - that works !!! ;-) For everybody who tries to populate a GUID into a HTTP-Header variable here is the full solution: define a user variable: MyGUIDScript = var chars = '0123456789abcdef'.split(''); var uuid = [], rnd = Math.random, r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] = '4'; for (var i = 0; i 36; i++) { if (!uuid[i]) {r = 0 | rnd()*16; uuid[i] = chars[(i == 19) ? (r 0x3) | 0x8 : r 0xf]; } }; uuid.join(''); In the HTTP Header Manager: X-GUID = ${__javaScript(${MyGUIDScript},GUID)} Since the code does not rely on any input from the server, you could use similar code to write the GUIDs to a file, and use the CSV Dataset Config element to read them. sebb schrieb: On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: Hi, when I use HTTP Header Manager to set HTTP header variables old values are used. Has anybody an idea what I'm doing wrong? Header Manager is a Configuration element, and is processed before the thread starts. You can use functions on the Test Plan to define variables. My Testplan: user defined variables: GUID = not set BSF PreProcessor: setting values to variable GUID Simple Controller HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} View Results Tree The results: HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf Request Headers: X-GUID: not set HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e Request Headers: X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf I tried with latest jmeter versions and also with the nightly build Thanks Heiko - 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 - 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
HTTP Header Manager uses old variable values?
Hi, when I use HTTP Header Manager to set HTTP header variables old values are used. Has anybody an idea what I'm doing wrong? My Testplan: user defined variables: GUID = not set BSF PreProcessor: setting values to variable GUID Simple Controller HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} View Results Tree The results: HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf Request Headers: X-GUID: not set HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e Request Headers: X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf I tried with latest jmeter versions and also with the nightly build Thanks Heiko - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
Re: HTTP Header Manager uses old variable values?
On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: Hi, when I use HTTP Header Manager to set HTTP header variables old values are used. Has anybody an idea what I'm doing wrong? Header Manager is a Configuration element, and is processed before the thread starts. You can use functions on the Test Plan to define variables. My Testplan: user defined variables: GUID = not set BSF PreProcessor: setting values to variable GUID Simple Controller HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} View Results Tree The results: HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf Request Headers: X-GUID: not set HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e Request Headers: X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf I tried with latest jmeter versions and also with the nightly build Thanks Heiko - 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: HTTP Header Manager uses old variable values?
On 13/01/2010, Andrey Pohilko a...@fininfor.ru wrote: Hi, I have a question - how can I use function in test plan to set variable in runtime? Which component type I should use to do that? If you want to ask a new question, please start a new thread with a relevant subject. - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
Re: HTTP Header Manager uses old variable values?
sebb, thanks a lot - that works !!! ;-) For everybody who tries to populate a GUID into a HTTP-Header variable here is the full solution: define a user variable: MyGUIDScript = var chars = '0123456789abcdef'.split(''); var uuid = [], rnd = Math.random, r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] = '4'; for (var i = 0; i 36; i++) { if (!uuid[i]) {r = 0 | rnd()*16; uuid[i] = chars[(i == 19) ? (r 0x3) | 0x8 : r 0xf]; } }; uuid.join(''); In the HTTP Header Manager: X-GUID = ${__javaScript(${MyGUIDScript},GUID)} sebb schrieb: On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: Hi, when I use HTTP Header Manager to set HTTP header variables old values are used. Has anybody an idea what I'm doing wrong? Header Manager is a Configuration element, and is processed before the thread starts. You can use functions on the Test Plan to define variables. My Testplan: user defined variables: GUID = not set BSF PreProcessor: setting values to variable GUID Simple Controller HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} View Results Tree The results: HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf Request Headers: X-GUID: not set HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e Request Headers: X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf I tried with latest jmeter versions and also with the nightly build Thanks Heiko - 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: HTTP Header Manager uses old variable values?
On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: sebb, thanks a lot - that works !!! ;-) For everybody who tries to populate a GUID into a HTTP-Header variable here is the full solution: define a user variable: MyGUIDScript = var chars = '0123456789abcdef'.split(''); var uuid = [], rnd = Math.random, r; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] = '4'; for (var i = 0; i 36; i++) { if (!uuid[i]) {r = 0 | rnd()*16; uuid[i] = chars[(i == 19) ? (r 0x3) | 0x8 : r 0xf]; } }; uuid.join(''); In the HTTP Header Manager: X-GUID = ${__javaScript(${MyGUIDScript},GUID)} Since the code does not rely on any input from the server, you could use similar code to write the GUIDs to a file, and use the CSV Dataset Config element to read them. sebb schrieb: On 13/01/2010, Heiko Robert heiko.rob...@ecm4u.de wrote: Hi, when I use HTTP Header Manager to set HTTP header variables old values are used. Has anybody an idea what I'm doing wrong? Header Manager is a Configuration element, and is processed before the thread starts. You can use functions on the Test Plan to define variables. My Testplan: user defined variables: GUID = not set BSF PreProcessor: setting values to variable GUID Simple Controller HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} HTTP Request ${GUID} HTTP Header Manager: setting X-GUID = ${GUID} View Results Tree The results: HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=472c63c2-63d5-44c4-a717-9252e2a7f8bf Request Headers: X-GUID: not set HTTP Request 472c63c2-63d5-44c4-a717-9252e2a7f8bf GET http://www.apache.org/?X-GUID=e6df3a7d-e054-444b-9ef8-7c9c2803821e Request Headers: X-GUID: 472c63c2-63d5-44c4-a717-9252e2a7f8bf I tried with latest jmeter versions and also with the nightly build Thanks Heiko - 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 - To unsubscribe, e-mail: jmeter-user-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-user-h...@jakarta.apache.org
HTTP Header Manager?
Hi all, I've been attempting to send some custom Header fields in test, yet for some reason what ever I try, the values I put in the HTTP Header Manager are simply being ignored (i.e. they are never sent). I have had the HTTP Header Manager specified at 3 different scores to the HTTP Request Node: 1) Above (the thread group) 2) Same Level (but placed above in the tree) 3) Added as child to Http Request What am I missing? -- View this message in context: http://old.nabble.com/HTTP-Header-Manager--tp26600411p26600411.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
Re: HTTP Header Manager?
hi as far as I know all should work. What headers are you adding? can you show an example What makes you think they aren't being sent (i..e did you add a view results tree and check the values in the request?) regards deepak On Tue, Dec 1, 2009 at 2:45 PM, danomano dshopk...@earthlink.net wrote: Hi all, I've been attempting to send some custom Header fields in test, yet for some reason what ever I try, the values I put in the HTTP Header Manager are simply being ignored (i.e. they are never sent). I have had the HTTP Header Manager specified at 3 different scores to the HTTP Request Node: 1) Above (the thread group) 2) Same Level (but placed above in the tree) 3) Added as child to Http Request What am I missing? -- View this message in context: http://old.nabble.com/HTTP-Header-Manager--tp26600411p26600411.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
Re: HTTP Header Manager?
Interesting, I learned today that it is in fact ignoring 1 header value specifically: namely: Authorization if I have this field populated, it will not get sent with the requests, but any fields I add will get sent with the requests... any thoughts? danomano wrote: Hi all, I've been attempting to send some custom Header fields in test, yet for some reason what ever I try, the values I put in the HTTP Header Manager are simply being ignored (i.e. they are never sent). I have had the HTTP Header Manager specified at 3 different scores to the HTTP Request Node: 1) Above (the thread group) 2) Same Level (but placed above in the tree) 3) Added as child to Http Request What am I missing? -- View this message in context: http://old.nabble.com/HTTP-Header-Manager--tp26600411p26601044.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
Re: HTTP Header Manager?
On 02/12/2009, danomano dshopk...@earthlink.net wrote: Deepak Shetty wrote: hi as far as I know all should work. What headers are you adding? can you show an example What makes you think they aren't being sent (i..e did you add a view results tree and check the values in the request?) regards deepak Yes I am using the View Results Tree. I am currently sending 2 headers values for a PUT Rest call, namely: Content-Type: application/xml,charset=UTF-8 Authorization: Basic SOMEGARBAGE The Authorization header never makes it through.. Because that's what the Authorization Manager is for ... -- View this message in context: http://old.nabble.com/HTTP-Header-Manager--tp26600411p26601045.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
HTTP Header Manager
when do we add a http header manager. -- View this message in context: http://www.nabble.com/HTTP-Header-Manager-tp21200407p21200407.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
Re: test plan stop working after adding a HTTP Header Manager
It turns out that the subsequent http request, after the initial http request and is matched with an http link parser, did not have a broken pattern and so somehow that problem only showed any symptoms (other than logged errors) after I added the header manager. Once I fixed the http request pattern the header manager worked properly. Strange thing is that the http request worked sometimes but not all the time. Hope this makes sense. --- sebb [EMAIL PROTECTED] wrote: What do you mean no longer works ? Do the samples return errors? Or perhaps no samples are generated? Have you checked jmeter.log? Any messages in the console window? Are there any other Header Managers in the test plan? On 12/10/2007, Richard Hubbell [EMAIL PROTECTED] wrote: I've got a spider-like test plan that recurses to a limite d depth. Some sites reject the default User-Agent and so I added a Header Manager to alter the User-Agent string. But after I add the Header Manager my test plan no longer works. I don't see anything in logs. Any ideas? Is it a scope problem? I moved the Header Manager around to have a different scope but didn't matter. Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV. http://tv.yahoo.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] Pinpoint customers who are looking for what you sell. http://searchmarketing.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: test plan stop working after adding a HTTP Header Manager
What do you mean no longer works ? Do the samples return errors? Or perhaps no samples are generated? Have you checked jmeter.log? Any messages in the console window? Are there any other Header Managers in the test plan? On 12/10/2007, Richard Hubbell [EMAIL PROTECTED] wrote: I've got a spider-like test plan that recurses to a limite d depth. Some sites reject the default User-Agent and so I added a Header Manager to alter the User-Agent string. But after I add the Header Manager my test plan no longer works. I don't see anything in logs. Any ideas? Is it a scope problem? I moved the Header Manager around to have a different scope but didn't matter. Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV. http://tv.yahoo.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]
test plan stop working after adding a HTTP Header Manager
I've got a spider-like test plan that recurses to a limite d depth. Some sites reject the default User-Agent and so I added a Header Manager to alter the User-Agent string. But after I add the Header Manager my test plan no longer works. I don't see anything in logs. Any ideas? Is it a scope problem? I moved the Header Manager around to have a different scope but didn't matter. Tonight's top picks. What will you watch tonight? Preview the hottest shows on Yahoo! TV. http://tv.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
On Mon, 1 Nov 2004 17:14:02 +0100, Coret Bob [EMAIL PROTECTED] wrote: Hi all, I want to force my proxy server to fetch the pages from the webserver instead of the cache. This can be achieved by adding the header Cache-control: no-cache. Do I have to add this header to all HTTP requests (in the Browser-derived headers element) or do I just add one extra HTTP Header Manager within the Thread Group? In the latter case: will this header value be added to all requests or will it override the headers of the HTTP requests? At present, if more than one Header Manager is in scope, there is no control over which one is used, so yes, you will need to add it to all the existing Browser-derived Header Managers. Unfortunately fixing this is non-trivial. See bug 31503. BTW, is it a know bug that you can't delete headers? The Delete button is always disabled in the HTTP Header Manager. There is a work-round - just add a new row, and the delete button is then enabled. But I've now fixed it in CVS (2.0 branch) so that the Delete/Save buttons are enabled. Regards, Bob Coret - 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]
HTTP Header Manager
Hi all, I want to force my proxy server to fetch the pages from the webserver instead of the cache. This can be achieved by adding the header Cache-control: no-cache. Do I have to add this header to all HTTP requests (in the Browser-derived headers element) or do I just add one extra HTTP Header Manager within the Thread Group? In the latter case: will this header value be added to all requests or will it override the headers of the HTTP requests? BTW, is it a know bug that you can't delete headers? The Delete button is always disabled in the HTTP Header Manager. Regards, Bob Coret - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
Perhaps it would be worth adding an option to the regex extractor to allow it to look at headers? S. - Original Message - From: Michael Stover [EMAIL PROTECTED] To: JMeter Users List [EMAIL PROTECTED] Sent: Wednesday, May 12, 2004 8:31 PM Subject: Re: HTTP Header Manager Is that a cookie? Have you tried using the cookie manager? The regex extractor doesn't look at the headers - they are held separately from the html body response. A component or function that read response headers and made the values available as variables is what you need if this is a non-cookie response header. Such a thing doesn't exist as far as I know, but it'd be easy to write. [snip] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
Good point. Yes, I can use variables from the user defined variables in the root test plan. However, what I was trying to do was to use the Regex Extractor to assign a dynamic value to a reference name and try using it in the HTTP Header Manager (which I hoped would look up the variable before every HTTP sampler execution and refresh the value). Ryo Can you verify that you can add a variable to the Header Manager via a user-defined variable (ala from the Test Plan root element)? If so, then it would seem likely that the value you were using was faulty, maybe a bad regular expression. Hard to say since you didn't say how where your dynamic value comes from. Post your test plan is the best way to get help. -Mike On Tue, 2004-05-11 at 19:34, Ryo Sode wrote: No one's got a clue? Ryo Hi guys, I am a bit stuck here. Is there a way to using a dynamic value in HTTP Header Manager or is that impossible according to the spec? I am trying to dynamically specify the Value in a particular HTTP header that I added in HTTP header manager, based on the response coming back from the previous request. I tried inserting ${[my-value} expression in the Value field under HTTP Header Manager. but looking at actual request that gets sent out, I see that the ${xxx} expression isn't calculated. Any help is appreciated. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ryo Sode SQA Lead Engineer Internet Division FileMaker Inc. TEL 408.987.7500 AIM ScreenName: ryosode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ryo Sode SQA Lead Engineer Internet Division FileMaker Inc. TEL 408.987.7500 AIM ScreenName: ryosode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
I suspected that would be the case. In which case, the problem is most like in your use of the regular expression extractor, either placement, syntax of the regex, or naming of the resulting variables. As I said, you'll have to post your test plan with the details to get some advice on all this. -Mike On Wed, 2004-05-12 at 13:24, Ryo Sode wrote: Good point. Yes, I can use variables from the user defined variables in the root test plan. However, what I was trying to do was to use the Regex Extractor to assign a dynamic value to a reference name and try using it in the HTTP Header Manager (which I hoped would look up the variable before every HTTP sampler execution and refresh the value). Ryo Can you verify that you can add a variable to the Header Manager via a user-defined variable (ala from the Test Plan root element)? If so, then it would seem likely that the value you were using was faulty, maybe a bad regular expression. Hard to say since you didn't say how where your dynamic value comes from. Post your test plan is the best way to get help. -Mike On Tue, 2004-05-11 at 19:34, Ryo Sode wrote: No one's got a clue? Ryo Hi guys, I am a bit stuck here. Is there a way to using a dynamic value in HTTP Header Manager or is that impossible according to the spec? I am trying to dynamically specify the Value in a particular HTTP header that I added in HTTP header manager, based on the response coming back from the previous request. I tried inserting ${[my-value} expression in the Value field under HTTP Header Manager. but looking at actual request that gets sent out, I see that the ${xxx} expression isn't calculated. Any help is appreciated. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ryo Sode SQA Lead Engineer Internet Division FileMaker Inc. TEL 408.987.7500 AIM ScreenName: ryosode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ryo Sode SQA Lead Engineer Internet Division FileMaker Inc. TEL 408.987.7500 AIM ScreenName: ryosode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Stover [EMAIL PROTECTED] Apache Software Foundation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
Is that a cookie? Have you tried using the cookie manager? The regex extractor doesn't look at the headers - they are held separately from the html body response. A component or function that read response headers and made the values available as variables is what you need if this is a non-cookie response header. Such a thing doesn't exist as far as I know, but it'd be easy to write. Also, this is the second time you've include square brackets in your variable name - ${[ref name]}. That would not be a valid variable name if that's a literal value. Also, Id= does not match id= -Mike On Wed, 2004-05-12 at 15:03, Ryo Sode wrote: Hey Mike, Thanks. Here's the kind of dummy test file. I actually figured out that the first request will always contain the actual string ${[ref name]} stuck right in the HTTP header because regex extractor hasn't even kicked in at that point. In the second request, I do get the default value in place of where I wanted the value to be. So it might just be a problem with my regex itself. Basically, with the web app I am working with, the server responds to my request with a session id in the HTTP Header that looks like this: SESSION-ID: id=006C9BD4BB61F0220009 So I tried extracting the id=006C9BD4BB61F0220009 part by having regex like this: Id=\S{24} Does that look right? Once this works, all I have to do is have something like this in my HTTP request header and keep the same session id throughout my test. SESSION-REQUEST: id=006C9BD4BB61F0220009 Thanks again for your help. Ryo __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Stover [EMAIL PROTECTED] Apache Software Foundation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
Is that a cookie? Have you tried using the cookie manager? The regex extractor doesn't look at the headers - they are held separately from the html body response. Yeah, I was starting to suspect that was the reason why A component or function that read response headers and made the values available as variables is what you need if this is a non-cookie response header. Such a thing doesn't exist as far as I know, but it'd be easy to write. Hm... Would you direct me in the right direction as far as writing a new component for JMeter? I have been thinking about writing new compoenents for Jmeter, but maybe this is a good excuse to get down and do it. Also, this is the second time you've include square brackets in your variable name - ${[ref name]}. That would not be a valid variable name if that's a literal value. Also, Id= does not match id= Yeah, that was my typo. You may have noticed, I couldn't share the stuff I do so I had to mock up the Jmeter file that looked like mine. Sorry about that. Ryo -Mike On Wed, 2004-05-12 at 15:03, Ryo Sode wrote: Hey Mike, Thanks. Here's the kind of dummy test file. I actually figured out that the first request will always contain the actual string ${[ref name]} stuck right in the HTTP header because regex extractor hasn't even kicked in at that point. In the second request, I do get the default value in place of where I wanted the value to be. So it might just be a problem with my regex itself. Basically, with the web app I am working with, the server responds to my request with a session id in the HTTP Header that looks like this: SESSION-ID: id=006C9BD4BB61F0220009 So I tried extracting the id=006C9BD4BB61F0220009 part by having regex like this: Id=\S{24} Does that look right? Once this works, all I have to do is have something like this in my HTTP request header and keep the same session id throughout my test. SESSION-REQUEST: id=006C9BD4BB61F0220009 Thanks again for your help. Ryo __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ryo Sode SQA Lead Engineer Internet Division FileMaker Inc. TEL 408.987.7500 AIM ScreenName: ryosode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
A function is simplest - you don't have to write a gui. There is some support for automatic guis if you make a full-blown post-processor component, but you'll have to ask Jordi about that. you could make a function like ${__httpHeader(KEY)} So, to write that, you would copy the basics from the other functions (such as org.apache.jmeter.functions.Property2). Also refer to org.apache.jmeter.functions.RegexFunction to see how to get access to the server response data and to see how values are inserted into JMeter's context (if you want to do that - you should). It's often nice to make a function, get it working, then, if you like it, make it a component, which is often easier to use. -Mike On Wed, 2004-05-12 at 16:22, Ryo Sode wrote: Is that a cookie? Have you tried using the cookie manager? The regex extractor doesn't look at the headers - they are held separately from the html body response. Yeah, I was starting to suspect that was the reason why A component or function that read response headers and made the values available as variables is what you need if this is a non-cookie response header. Such a thing doesn't exist as far as I know, but it'd be easy to write. Hm... Would you direct me in the right direction as far as writing a new component for JMeter? I have been thinking about writing new compoenents for Jmeter, but maybe this is a good excuse to get down and do it. Also, this is the second time you've include square brackets in your variable name - ${[ref name]}. That would not be a valid variable name if that's a literal value. Also, Id= does not match id= Yeah, that was my typo. You may have noticed, I couldn't share the stuff I do so I had to mock up the Jmeter file that looked like mine. Sorry about that. Ryo -Mike On Wed, 2004-05-12 at 15:03, Ryo Sode wrote: Hey Mike, Thanks. Here's the kind of dummy test file. I actually figured out that the first request will always contain the actual string ${[ref name]} stuck right in the HTTP header because regex extractor hasn't even kicked in at that point. In the second request, I do get the default value in place of where I wanted the value to be. So it might just be a problem with my regex itself. Basically, with the web app I am working with, the server responds to my request with a session id in the HTTP Header that looks like this: SESSION-ID: id=006C9BD4BB61F0220009 So I tried extracting the id=006C9BD4BB61F0220009 part by having regex like this: Id=\S{24} Does that look right? Once this works, all I have to do is have something like this in my HTTP request header and keep the same session id throughout my test. SESSION-REQUEST: id=006C9BD4BB61F0220009 Thanks again for your help. Ryo __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ryo Sode SQA Lead Engineer Internet Division FileMaker Inc. TEL 408.987.7500 AIM ScreenName: ryosode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Stover [EMAIL PROTECTED] Apache Software Foundation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
Sweet. I'll look into this. Ryo A function is simplest - you don't have to write a gui. There is some support for automatic guis if you make a full-blown post-processor component, but you'll have to ask Jordi about that. you could make a function like ${__httpHeader(KEY)} So, to write that, you would copy the basics from the other functions (such as org.apache.jmeter.functions.Property2). Also refer to org.apache.jmeter.functions.RegexFunction to see how to get access to the server response data and to see how values are inserted into JMeter's context (if you want to do that - you should). It's often nice to make a function, get it working, then, if you like it, make it a component, which is often easier to use. -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
No one's got a clue? Ryo Hi guys, I am a bit stuck here. Is there a way to using a dynamic value in HTTP Header Manager or is that impossible according to the spec? I am trying to dynamically specify the Value in a particular HTTP header that I added in HTTP header manager, based on the response coming back from the previous request. I tried inserting ${[my-value} expression in the Value field under HTTP Header Manager. but looking at actual request that gets sent out, I see that the ${xxx} expression isn't calculated. Any help is appreciated. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ryo Sode SQA Lead Engineer Internet Division FileMaker Inc. TEL 408.987.7500 AIM ScreenName: ryosode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTTP Header Manager
Can you verify that you can add a variable to the Header Manager via a user-defined variable (ala from the Test Plan root element)? If so, then it would seem likely that the value you were using was faulty, maybe a bad regular expression. Hard to say since you didn't say how where your dynamic value comes from. Post your test plan is the best way to get help. -Mike On Tue, 2004-05-11 at 19:34, Ryo Sode wrote: No one's got a clue? Ryo Hi guys, I am a bit stuck here. Is there a way to using a dynamic value in HTTP Header Manager or is that impossible according to the spec? I am trying to dynamically specify the Value in a particular HTTP header that I added in HTTP header manager, based on the response coming back from the previous request. I tried inserting ${[my-value} expression in the Value field under HTTP Header Manager. but looking at actual request that gets sent out, I see that the ${xxx} expression isn't calculated. Any help is appreciated. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Ryo Sode SQA Lead Engineer Internet Division FileMaker Inc. TEL 408.987.7500 AIM ScreenName: ryosode - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Stover [EMAIL PROTECTED] Apache Software Foundation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
HTTP Header Manager
Hi, I have Version 1.8 of JMeter. I have recorded a scenario against a test server. I now want to run that recording against a production server. However the referer attribute in the Browser-derived headers node still refers to the test server. I am using a HTTP Request Defaults node which I thought might be used to replace the domain name in the referer value as it already does with the domain name in all my HTTP Request nodes Is it possible to use the HTTP Header Manager to replace the domain name part of the referer value in the Browser-derived headers? Regards, Eugene Software Developer Email: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: HTTP Header Manager
A better way to do it is to use user-defined variables. By doing this, you can use the same variable name in HTTP Requests, HTTP Header Manager - just about everywhere. Also, if you define your user-defined variables before recording using the proxy, JMeter will substitute the values for you automatically. However, yes, the HTTP Header Manager should work to add in specific headers, but the header in question must be deleted from the specific Header Manager. -Mike On 10 Dec 2002 at 14:43, Eugene Grant wrote: Hi, I have Version 1.8 of JMeter. I have recorded a scenario against a test server. I now want to run that recording against a production server. However the referer attribute in the Browser-derived headers node still refers to the test server. I am using a HTTP Request Defaults node which I thought might be used to replace the domain name in the referer value as it already does with the domain name in all my HTTP Request nodes Is it possible to use the HTTP Header Manager to replace the domain name part of the referer value in the Browser-derived headers? Regards, Eugene Software Developer Email: [EMAIL PROTECTED] _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Michael Stover [EMAIL PROTECTED] Yahoo IM: mstover_ya ICQ: 152975688 AIM: mstover777 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problem using http header manager
I've been tracing through exchanges between jmeter and my server and noticed that the http header Host has no value. In my test plan I set the value for Host in the http header manager. Thread Simple Controller HTTP Request Browser-derived headers (removed Host) HTTP Header Manager (only header set is Host) When I look at the line trace I find Host: \r\n where I expect to see Host: nozzle\r\n. Is anyone else seeing this issue? I built jmeter from the 8/14 source code distribution. I'm using java 1.4.0 (build 1.4.0-b92). Regards, Don -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: problem using http header manager
Donald, I tried this, and I got a similar result as you, but it has to do with the GUI, not with JMeter's testing code. Basically, you need to hit enter after typing in the value of the host header in the GUI. That value field isn't registering, probably because you type it in and then mouse to another part of the GUI. A stupid little problem that I've fixed elsewhere, but never here. -Mike On 14 Aug 2002 at 11:45, Donald Stinchfield wrote: I've been tracing through exchanges between jmeter and my server and noticed that the http header Host has no value. In my test plan I set the value for Host in the http header manager. Thread Simple Controller HTTP Request Browser-derived headers (removed Host) HTTP Header Manager (only header set is Host) When I look at the line trace I find Host: \r\n where I expect to see Host: nozzle\r\n. Is anyone else seeing this issue? I built jmeter from the 8/14 source code distribution. I'm using java 1.4.0 (build 1.4.0-b92). Regards, Don -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Michael Stover [EMAIL PROTECTED] Yahoo IM: mstover_ya ICQ: 152975688 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: problem using http header manager
Excellent Mike. Tested out perfectly. Thanks. -Original Message- From: Mike Stover [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 12:26 PM To: JMeter Users List Subject: Re: problem using http header manager Donald, I tried this, and I got a similar result as you, but it has to do with the GUI, not with JMeter's testing code. Basically, you need to hit enter after typing in the value of the host header in the GUI. That value field isn't registering, probably because you type it in and then mouse to another part of the GUI. A stupid little problem that I've fixed elsewhere, but never here. -Mike On 14 Aug 2002 at 11:45, Donald Stinchfield wrote: I've been tracing through exchanges between jmeter and my server and noticed that the http header Host has no value. In my test plan I set the value for Host in the http header manager. Thread Simple Controller HTTP Request Browser-derived headers (removed Host) HTTP Header Manager (only header set is Host) When I look at the line trace I find Host: \r\n where I expect to see Host: nozzle\r\n. Is anyone else seeing this issue? I built jmeter from the 8/14 source code distribution. I'm using java 1.4.0 (build 1.4.0-b92). Regards, Don -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Michael Stover [EMAIL PROTECTED] Yahoo IM: mstover_ya ICQ: 152975688 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]