You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Benedict Breuer <be...@gmail.com> on 2009/08/17 22:53:45 UTC

URL-file as JMeter-Input

I have a file that consists of URLs in each line. I want to use this
file as the list of URLs that JUnit should HTTP-GET. For example with
wget I would use it as in

wget -i url-file.txt

One solution would be of cause to set up JMeter in Proxy mode, wget as
above through the proxy and replay the test with JMeter. But isn't
there a direct way to tell JMeter to read a file of URLs as input?

I took a look at the CSV element and this thread:
http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/200906.mbox/%3C22888211.1271245246122165.JavaMail.nobrien@olympia%3E

but couldn't figure out how to use it. One of my problems is that the
HTTP Request Sampler  takes Host and Path separated, not as one
string. I don't want to pipe my URL-file through some sed-script in
order to split the URLS into hostname/path. Any ideas?

This seams to be a frequent standard-problem, yet I can't find it in
any Tutorial or FAQ.

Thanks,

Benedict

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


Re: URL-file as JMeter-Input

Posted by Benedict Breuer <be...@gmail.com>.
On Mon, Aug 17, 2009 at 11:03 PM, Deepak Shetty<sh...@gmail.com> wrote:

> if the host field is empty and the url with host is specified in the path ,
> it does work correctly.

[..]

> Thread Group (Control Threads and iterations)
>   HttpSampler
>   CSV Data Set Config  (read to variable)

Yes, that worked!

Thanks,

Benedict

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


Re: URL-file as JMeter-Input

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
if the host field is empty and the url with host is specified in the path ,
it does work correctly.(and if it didnt you could use javascript or
beanshell to split the host from the path)
You would either have
Thread Group (Control Threads and iterations)
   HttpSampler
   CSV Data Set Config  (read to variable)

OR

Thread Group (Control threads)
   While (variable is not <EOF>)
     HttpSampler
     CSV Data Set Config (read to variable)

You have various options on the CSV data set config that control what
happens when you have read the last row

regards
deepak

On Mon, Aug 17, 2009 at 1:53 PM, Benedict Breuer
<be...@gmail.com>wrote:

> I have a file that consists of URLs in each line. I want to use this
> file as the list of URLs that JUnit should HTTP-GET. For example with
> wget I would use it as in
>
> wget -i url-file.txt
>
> One solution would be of cause to set up JMeter in Proxy mode, wget as
> above through the proxy and replay the test with JMeter. But isn't
> there a direct way to tell JMeter to read a file of URLs as input?
>
> I took a look at the CSV element and this thread:
>
> http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-user/200906.mbox/%3C22888211.1271245246122165.JavaMail.nobrien@olympia%3E
>
> but couldn't figure out how to use it. One of my problems is that the
> HTTP Request Sampler  takes Host and Path separated, not as one
> string. I don't want to pipe my URL-file through some sed-script in
> order to split the URLS into hostname/path. Any ideas?
>
> This seams to be a frequent standard-problem, yet I can't find it in
> any Tutorial or FAQ.
>
> Thanks,
>
> Benedict
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>