Last week, I had to do some performance testing on a Drupal site. Performance testing can be done with JMeter (http://jakarta.apache.org/jmeter/), but the difficult thing was to create a login session from JMeter to Drupal.
Installation
The first step: install JMeter
$ sudo aptitude install jmeter
Just for the record, I'm using this version:
$ dpkg -l | grep jmeter ii jmeter 2.3.4-2ubuntu1 Load testing and performance measurement app ii jmeter-help 2.3.4-2ubuntu1 Load testing and performance measurement app ii jmeter-http 2.3.4-2ubuntu1 Load testing and performance measurement app
Configuration
- On the "Testplan" icon, click right and "Add" a "Threadgroup"
- In "Thread properties", define the "total number of users" which are accessing your site + a "Ramp up Period" and how many times this action should run
- Next, install an "HTTP Cookie Manager" in the "Thread Group". This cookie manager will send a cookie along the HTTP request, to be able to login on the site
- Set "Cookie Policy" to "Compatibility"
- Login to Drupal in your favorite browser (such as Firefox)
- Open the list of cookies and search for some name as: "SESScc6c90d4c6f532ab4343b8b404cdf01d"
- Add a line in JMeter with: name, value, domain, path such as in the cookie which can be viewed in Firefox
- Next, install an "HTTP Request defaults" element
- Specify "domain" and "path"
- Finally, install a "View Results Tree" element, which can debug all HTTP requests
Comments
Is it possible here to check the load when a lot of users are using the site?
Hi,
Can you be more specific when you talk about "the load"?
You mean CPU performance? Memory usages? I/O? Network usage?
Jochen
Add new comment