|
Using JMeter for PeopleSoft Performance Testing |
|
|
Thursday, 12 October 2006 |
JMeter is an open source performance testing tool for web applications. I've had some success lately using it to execute performance test in my PeopleSoft HRMS and ELM environments, and I thought I'd share what I found to make it work with PeopleSoft.
Acquiring JMeter
You can download JMeter from http://jakarta.apache.org/site/downloads/index.html#jmeter_binaries. Just download the binary zip file. There's no install program, just unzip it to your C:\Program Files directory. Launch it with C:\Program Files\jakarta-jmeter-2.2\bin\jmeter.bat.
Entering the required elements
When you first open JMeter the screen looks like this:

Right click the Test Plan, select Add > Thread Group. A thread group represents a test script.

Right click the new Thread Group, and click Add, then Config Element and choose an HTTP Request Default.

Select the HTTP Request Default object. Enter the server name that you’ll be using, the port number, and the default protocol.

Right-click the Thread Group again, select Add > Config Elements and select an HTTP Cookie Manager. The Cookie Manager will allow JMeter to keep up with PeopleSoft cookies and handle the sign-out correctly.

Once again, right-click the Thread Group, select Add > Listener > Aggregate Report. This will provide some basic statistics about your test.
This next step is optional, but I like to add a timer to my script so that I can add latency between the requests to simulate “think time” of real users. Right-click the thread group, select Timer, and choose a timer. I generally pick the Constant timer because it provides a simple delay between requests, but more sophisticated timers are available. Check out the include_controller_tutorial.pdf document in the docs/usermanual directory for more info.

Activating the HTTP Proxy Server
Under Workbench, add a Non Test Element called HTTP Proxy Server.

The HTTP Proxy Server creates an internet proxy server that will run on your computer. You’ll point your browser to it, and it will record all traffic that passes through it into your JMeter script.
Click the new HTTP Proxy Server that you created.

Fill in this form as follows:
- Set Port 8080 (or whatever works on your computer).
- Target Controller = Thread Plan > Thread Group
- Grouping: This is a matter of opinion, but I like to see separators between groups or groups under new controllers. Basically a group translates to all of the junk that happens between clicks, so it’s nice to see where the clicks start and end
- Patterns to exclude: Depending on the kind of test you want to run, you may want to exclude certain files that are irrelevant to the outcome of the test. For example, if you’re testing performance of a PeopleCode function you might want to exclude image and javascript files. If you want to see overall web server performance, you might include everything. Entering “.\*.gif” will exclude GIF files
- Click start to start the proxy server.
Configuring your browser
Before you can use the proxy server, you’ll need to configure your browser to use it. In Internet Explorer, click Tools > Internet Options, then click the Connections tab and LAN settings. Use localhost as the server, and port 8080 as the port.

If you use Firefox, go to Tools > Options, click the Connection Settings button, and the server and port to localhost:8080.

Now your proxy server is running and your web server is configured to use it. From this point forward, every URL that you visit will be recorded in your JMeter test script.
JMeter’s proxy server does have one significant limitation: It cannot decrypt SSL (https) traffic. So you’ll have to record your test script with http calls. However, I believe it can play it back with SSL if you change the protocol on your HTTP Request Defaults object.
Recording the script
Anyway, it’s time to record the script. In this example I pasted in my URL and hit enter. Then I logged on, navigated to Process Monitor, hit Refresh, and Signed out.

Now you can record whatever functionality you like. I think it’s a good idea to record the sign in since the subsequent actions will be dependent on the sign in. I also like to sign out at the end of a test script, just to keep sessions from stacking up in the application server. If too many idle sessions accumulate, the application server can stop functioning.

When you’re finished recording, go back to JMeter and click the Stop button on your Proxy Server.

One note about this version of JMeter: If you want to start recording again, it’s a good idea to save your test script, close it, and come back in. I’ve had problems where new activity didn’t get recorded until I did that.
Running the script
Finally, to play back your test script, click Run and Start.

If you want to see if your script really works, log on to PSAdmin and check the client status. You should see your user show up as a client, then disappear as the script signs off.
To simulate multiple connections, click on the Thread Group element.

The Number of Threads (users) indicates how many of users to ramp up to. The Ramp-Up period tells how long it should take before all users are active. The Loop Count tells how many times to cycle through thes script.
Hopefully that will get you started. I’ve barely scratched the surface as to what JMeter can do. For example, if you’d like to use JMeter to read data from a comma-delimited file and insert it into different fields in PeopleSoft, read up on the CSV Data Set Config object. You can also install Jmeter on multiple workstations in different locations, and remotely launch tests from there.
Comments () |
 |
|
|
|
|
|
Last Updated ( Saturday, 14 October 2006 )
|