You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by piranha <pi...@gmail.com> on 2010/08/24 05:13:48 UTC

How to add multiple values from a file to the end of a URL

Using JMeter, can anyone let me know the procedure to add the values from a
file to the end of a URL.

i.e., if there are 10 values in csv file, my HTTP Request should run 10
times, adding new value to the relative URL path.

For Ex :

If the values in the csv file are : llink1, link2, link3 ..... 

corresponding URLs should be : 

HTTP Request Default : http://myurl.com
HTTP Requests:

/link1 
/link2 
/link3 ..... 

Please help me out.
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-add-multiple-values-from-a-file-to-the-end-of-a-URL-tp2649550p2649550.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How to add multiple values from a file to the end of a URL

Posted by piranha <pi...@gmail.com>.
Hi Felix,

Thanks for your detailed explanation. Right now, it is little confusing to
me, as i'm a java developer and completely new to Testing world. I guess i
need to go through all the topics you mentioned. 
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-add-multiple-values-from-a-file-to-the-end-of-a-URL-tp2649550p2797230.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How to add multiple values from a file to the end of a URL

Posted by Felix Frank <ff...@mpexnet.de>.
Hi,

sorry I didn't get back, the issue is rather involved and also a bit off
topic.

On 08/24/10 14:38, piranha wrote:
> 
> Hello Felix,
> 
> I didn't exactly get you. Can you tell me:
> 1) How can i set my browser to use my local Jmeter proxy?

It's the normal step for recording a test plan, refer to the Jmeter
Manual. Typically, you tell the browser to use the localhost with port
8080 as proxy server.

> 2) how can i make reverse proxy listen to particular port 80? 

Basically you want to configure (say) nginx to act like a local
webserver and just listen to port 80.
Use its mod_proxy to forward requests to where they actually are meant
to get (i.e. the server you want to test).

As you still need to pass the actual proxy, you will require an
additional squid instance after all.
Install squid and configure it to listen to yet another local port
(default ist 3128) and act as a "transparent proxy", chaining with your
network's proxy.
nginx then needs to forward its requests to squid instead of the real
server you need to reach. But nginx *will* have to take care of
inserting the correct Host: headers.

This should work, though I never tried this specific setup.

All this can't really be explained in a short mail, so if you absolutely
have to record test plans through a web proxy in your network, I advise
to read up on the topics mentioned above and make your setup step by step.

Cheers,
Felix

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How to add multiple values from a file to the end of a URL

Posted by piranha <pi...@gmail.com>.
Hello Felix,

I didn't exactly get you. Can you tell me:
1) How can i set my browser to use my local Jmeter proxy?
2) how can i make reverse proxy listen to particular port 80? 

Could you explain me every step you mentioned, because i didn't exactly
understand what you are trying to explain me.


-- 
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-add-multiple-values-from-a-file-to-the-end-of-a-URL-tp2649550p2651155.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How to add multiple values from a file to the end of a URL

Posted by Felix Frank <ff...@mpexnet.de>.
Hi,

if the proxy won't chain, you may resort to a more complex solution. I
used something similar to record HTTPS back in the 2.3 day.

1. Set you browser to use your local Jmeter proxy.
2. Have a reverse proxy listen to port 80 on one of your IP addresses
(it makes sense to use IP aliasing and assign a dedicated address to
your NIC for this). I used nginx to great effect. Have it forward
requests to the server to which you are recording.
3. Instead of the target server's domain name, use the IP address on
which your reverse proxy is listening.

My old setup was somewhat more involved and included stunnel and squid,
but that was for decrypting SSL. You should be fine with only a reverse
proxy.

If you *do* need to include SSL traffic, then you have a problem that
requires more tinkering.

HTH,
Felix

On 08/24/10 06:03, Deepak Shetty wrote:
> New topic should be new email .
> Is the site you want to check on your internet or intranet? If intranet then
> you dont need your internet proxy and you can temporarily change the
> settings while recording your tests and then revert them when you are done.
> If the site is on the internet then JMeter Proxy doesn't support chaining as
> far as I know. However you can try specify -DhttpProxyHost and
> -DhttProxyPort (with values for your internet proxy)while starting up JMeter
> and configure your IE to use JMeter as the proxy. Might work havent tried.
> 
> regards
> deepak
> 
> 
> 
> On Mon, Aug 23, 2010 at 8:50 PM, piranha <pi...@gmail.com> wrote:
> 
>>
>> thnx for ur solution Deepak, i'll try it and let u know.
>>
>> Also, i have one more doubt regarding JMeter Proxy server,  I'm using
>> JMeter
>> from behind a firewall/proxy server in my Office machine.
>>
>> In Internet Explorer, LAN settings are already set to use Proxy Server on
>> port 8080. If i change the port number, i get disconnected from the
>> internet.
>>
>> How can i use JMeter to load a web application using proxy server? What
>> chnages i need to make? ...

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How to add multiple values from a file to the end of a URL

Posted by Deepak Shetty <sh...@gmail.com>.
New topic should be new email .
Is the site you want to check on your internet or intranet? If intranet then
you dont need your internet proxy and you can temporarily change the
settings while recording your tests and then revert them when you are done.
If the site is on the internet then JMeter Proxy doesn't support chaining as
far as I know. However you can try specify -DhttpProxyHost and
-DhttProxyPort (with values for your internet proxy)while starting up JMeter
and configure your IE to use JMeter as the proxy. Might work havent tried.

regards
deepak



On Mon, Aug 23, 2010 at 8:50 PM, piranha <pi...@gmail.com> wrote:

>
> thnx for ur solution Deepak, i'll try it and let u know.
>
> Also, i have one more doubt regarding JMeter Proxy server,  I'm using
> JMeter
> from behind a firewall/proxy server in my Office machine.
>
> In Internet Explorer, LAN settings are already set to use Proxy Server on
> port 8080. If i change the port number, i get disconnected from the
> internet.
>
> How can i use JMeter to load a web application using proxy server? What
> chnages i need to make? ...
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/How-to-add-multiple-values-from-a-file-to-the-end-of-a-URL-tp2649550p2650713.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How to add multiple values from a file to the end of a URL

Posted by piranha <pi...@gmail.com>.
thnx for ur solution Deepak, i'll try it and let u know.

Also, i have one more doubt regarding JMeter Proxy server,  I'm using JMeter
from behind a firewall/proxy server in my Office machine.

In Internet Explorer, LAN settings are already set to use Proxy Server on
port 8080. If i change the port number, i get disconnected from the
internet.

How can i use JMeter to load a web application using proxy server? What
chnages i need to make? ...
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-add-multiple-values-from-a-file-to-the-end-of-a-URL-tp2649550p2650713.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: How to add multiple values from a file to the end of a URL

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
then that is straight forward. Use a CSV Data Set Config. If your CSV only
has one column , then in the field called Variable Names specify a single
value e.g. url (should have as many names here as you have columns in CSV).
Then in your Sampler use ${url}.

The other thing is how you want to iterate over your values.
Thread Group
+WhileController  = ${__javaScript("${url}"!="<EOF>")}
++HTTP Sampler (path = ${url})
++CSV Data Set Config (Variable Names = url , Recycle = false , Stop Thread
= false , Sharing Mode = depends on what you want to do  - Usually All
threads or Current thread)


regards
deepak

On Mon, Aug 23, 2010 at 8:34 PM, piranha <pi...@gmail.com> wrote:

>
> Hi Deepak,
>
> thnx for ur reply.
>
> URLs should be :
>
> Req1 : /link1
> Req2 : /link2
> Req3 : /link3
>
> link1, link2, link3 should be read from csv file ...
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/How-to-add-multiple-values-from-a-file-to-the-end-of-a-URL-tp2649550p2650704.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: How to add multiple values from a file to the end of a URL

Posted by piranha <pi...@gmail.com>.
Hi Deepak,

thnx for ur reply.

URLs should be :

Req1 : /link1
Req2 : /link2
Req3 : /link3

link1, link2, link3 should be read from csv file ... 
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-add-multiple-values-from-a-file-to-the-end-of-a-URL-tp2649550p2650704.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org