Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I am using JMeter to do performance testing of a site.

I need to test various links of a site (no need to login) with 100 users and loop it for some number of times. I want to put those links in a CSV file, so that all the links to be tested are read from the file.

How do I accomplish this task using JMeter?

Thanks in advance.

share|improve this question
3  
add comment

2 Answers 2

You can use Access Log Sampler, it allows to read URL's which are stored in text file.

What you need to do, is:

  1. Grab URL's which you need from site. This can be made with different tools. For Windows I've used Xenu's Link Sleuth, but there are a number of alternatives both for Mac and Linux.
  2. Create new test plan in Jmeter and add Access Log Sampler to Thread Group;
  3. Set up text file with URL's from item 1 as Log file.

Access Log Sampler will take URL's one after another from log file.

More details in guide from our jmeter library

P.S. I'm working for Blazemeter as developer of plugin for Jmeter.

share|improve this answer
2  
Hi Dzmitry, as a general rule link-only answers are frowned upon. Could you provide a summary of the article here, so others will have information that gives them confidence that leaving the site will give them the answer they're looking for? Also, this is the second of three answers to link to the Blazemeter blog; if you have an affiliation with a particular site, it must be made clear in the answer. –  corsiKa Mar 28 '13 at 17:23
add comment

I'll assume you're just using JMeter as a type of Web Crawler with a fixed set of pages to consume, and you're only measuring response times and http status.

  1. Create a thread group of 100 users
  2. Place a CSV Data Set Config under the thread group
    1. The CSV contains one URL per line
    2. The CSV loads into a parameter named "URL"
  3. A HTTP Sampler is used where the hostname is set to ${URL}
    1. Specify any assertions you need, eg "200" http response
  4. Run it and see how it goes

Heres some pictures of the setup in JMeter using the default samplers and config elements;

  1. Create the threadgroup:

  2. Create the CSV Reader enter image description here

  3. Create the HTTP Sampler enter image description here

  4. Have an assertion checking you get a decent response enter image description here

  5. Optionally record the responses for review

The CSV File i'm using looks like:

$ cat urls.csv 
/
/
/robots.txt
/imghp?hl=en&tab=wi
/imghp?hl=en&tab=wi
/intl/en/options/
/intl/en/about/products/
/intl/en/about/products/
/history/optout?hl=en
com/history/optout?hl=en
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.